This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
re: PATCH: binutils + i18n
- To: matthew green <mrg at cygnus dot com>
- Subject: re: PATCH: binutils + i18n
- From: Bruno Haible <haible at ilog dot fr>
- Date: Sat, 20 Oct 2001 18:25:09 +0200 (CEST)
- Cc: Nick Clifton <nickc at cambridge dot redhat dot com>, binutils at sourceware dot cygnus dot com, cgen at sources dot redhat dot com
- References: <m3adyz50d0.fsf@north-pole.nickc.cambridge.redhat.com><13112.1002709936@cygnus.com>
matthew green wrote on 10 October:
> my point is that locale shouldn't matter for a gas parser,
> except it's error messages. whatever the locale, the input
> should be treated identically...
You are right, and my patch does exactly what you want.
Before this patch, the regular expression looked like
"move[ \t\n]*" and used case-insensitive comparison inside regexec,
i.e. it called tolower/toupper, which are locale dependent.
With the patch, the regular expression looks like
"[mM][oO][vV][eE][ \t\n]*" and uses case-sensitive comparison inside
regexec, i.e. no locale dependent calls. Also the conversion from
"move" to "[mM][oO][vV][eE]" uses the macros from "safe-ctype.h" which
are locale independent.
Bruno