[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Text collation
From: |
Ludovic Courtès |
Subject: |
Re: Text collation |
Date: |
Wed, 13 Dec 2006 10:28:07 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Kevin Ryde <address@hidden> writes:
> address@hidden (Ludovic Courtès) writes:
>>
>> +/* Throw an exception corresponding to error ERR. */
>> +static void inline
>> +scm_locale_error (const char *func_name, int err)
>> +{
>> + SCM s_err;
>> +
>> + s_err = scm_from_int (err);
>> + scm_error (scm_system_error_key, func_name,
>> + "Failed to install locale",
>> + scm_cons (scm_strerror (s_err), SCM_EOL),
>> + scm_cons (s_err, SCM_EOL));
>> +}
>
> This doesn't display,
>
> <unnamed port>:3:1: In procedure string-locale<? in expression
> (string-locale<?
> "x" "y" ...):
> <unnamed port>:3:1: Failed to install locale
> Exception during displaying of error: misc-error
> ABORT: (system-error)
That's on a system where `USE_GNU_LOCALE_API' is not defined, right?
> It'd be good if it was a standard SCM_SYSERROR and was detected on
> creating a locale.
It's not an `SCM_SYSERROR' because the error code is provided by
variable ERR, not by ERRNO. That said, it could use `SCM_SYSERROR_MSG'.
In order to detect locale unavailability upon locale create on non-GNU
systems, it would have to try to actually install the locale first. I
guess we can do it, although that adds a bit of overhead.
> Incidentally, in the fallback code there seems to be something fishy
> after a failed install. If you try to use the offending locale object
> a second time it succeeds.
Hmm, weird. Is the locale in question available on your system? I'll
give it a try.
Thanks,
Ludovic.
Re: Text collation, Kevin Ryde, 2006/12/12
Re: Text collation, Kevin Ryde, 2006/12/12
Re: Text collation, Kevin Ryde, 2006/12/12
- Re: Text collation,
Ludovic Courtès <=