Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: math and locale



On Nov 21,  1:14pm, Clint Adams wrote:
} Subject: Re: PATCH: math and locale
}
} > I'm mildly concerned that setting and restoring the locale is an excessive
} > overhead, especially if it's a no-op (prev_local is already "POSIX" or "C").
} > Can anyone reassure me?
} 
} I see that the setlocale code is a bit meatier than I would have expected.

I am mostly concerned about things like re-opening (or worse, reading) of
external locale-definition files.

} I'm also beginning to wonder if prev_locale won't get clobbered somehow.

Oo, ick.

} > I also wonder whether "C" would not be a better choice than "POSIX" here.
} 
} On sheer byte count or by some other criterion?

(1) That it's more likely to be supported correctly, and (2) that it is
after all C-like expression parsing that math.c is attempting to peform.

It further occurs to me that it might be bad even to have output formatting
controlled by LC_NUMERIC, given the tendency of scripts to do things like

	eval $(print ...)

Where *exactly* would LC_NUMERIC make any difference in pws-9 ?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author