This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

re: PATCH: binutils + i18n


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]