> From [EMAIL PROTECTED] Fri Aug 24 19:41:32 2001
> Date: Sat, 25 Aug 2001 11:17:48 +1000
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: LPRng: Re: lprng gettext
> From: [EMAIL PROTECTED] (Craig Small)
>
> On Fri, Aug 24, 2001 at 08:06:31AM -0700, User Papowell wrote:
> > > I've noticed that not all of yor messages are gettexted, so I'm modifying all
> > > you src/common/*.c programs in order to get them gettexted properly by adding
>
> Be careful fiddling with locales if you use scanf and friends, one
> setlocale() somewhere and it breaks them if they're looking for floats.
>
> Been there, got the bug reports to prove it (in procps, the uptimes etc
> are floatsi, had me confused as it worked fine for me). Just in case you
> start getting wierd bugs from people in France (or wherver else floats are
> 1,414 not 1.414
>
> - Craig
> --
> Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
> Eye-Net Consulting http://www.eye-net.com.au/ <[EMAIL PROTECTED]>
> MIEEE <[EMAIL PROTECTED]> Debian developer <[EMAIL PROTECTED]>
I went through LPRng with a fine tooth comb a couple of years ago, looking
for stuff exactly like this. This led me to remove all the 'normal' conversion
routines and replace them with strtol and similar routines.
strtod is used in lpd_rcvjob.c to read the file length, and the value
it reads is written by a corresponding 'sprintf( "%0.0f", )'.
This, is, as far as I can tell, the only place where it (or a routine)
using it, is used to extract a value that is 'critical' to the LPRng operation.
Things die in a horrible manner if the avlue it is reading has a fraction
and is simply not a long integer.
This, I think, should be bombproof enough.
Now, of course, if people are using PrintTool, PrintThis, PrintThat,
LPinfo, LPDisp, or other tools, they break BIG TIME if the lpq output
they are scanning is not in the EXACT format they expect, i.e. - English (or,
as people who read my stuff say, "Anguished English").
For this reason I generated a lpq -V option that put stuff out
in keyword/value form, and allows somebody to pick up the various
values by using the keyword/value format.
But the other 'user gui' folks did not like the idea and insisted
on parsing the output...
Sigh....
Patrick Powell
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------