home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4746 comp.unix.shell:4750 comp.unix.misc:4211
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!pki-nbg!hitkw14!smr
- From: smr@pki-nbg.philips.de (Stephen Riehm)
- Newsgroups: comp.unix.wizards,comp.unix.shell,comp.unix.misc
- Subject: Re: The Problem with UNIX
- Message-ID: <smr.722003971@hitkw14>
- Date: 17 Nov 92 12:39:31 GMT
- References: <1992Nov11.194557.16258@yarc.uucp> <1992Nov12.204710.5808@reed.edu> <1992Nov14.145943.1288@global.hacktic.nl> <1992Nov16.234721.3224@nic.csu.net>
- Sender: news@pki-nbg.philips.de
- Reply-To: smr@pki-nbg.philips.de
- Lines: 38
-
- oleg@gd. (Oleg Kibirev) writes:
-
- > Seriously, I would really appreciate a call like eprintf that accepts
- > the same arguments as printf but also has staff like %n for program
- > name, %m for message, %p for callers PID etc. This would encourage people
- > to use more meaningful diagnostics.
-
- It already exists:
- fprintf(stderr,"%s[%d]: %s\n", argv[0], (int)getpid(), "message");
-
- Of course there are the usual 50,000 different ways of formatting this
- same line, but the code is there, the problem is that people don't use
- it. The second problem is that there are guys out there who get
- wonderful new schemes in their heads, and insist that everyone working
- on their project use this wonderful new scheme (I do this sometimes,
- but I am leveling out in my young age), there is no STANDARD way of
- producing errors, printing to stderr is about as close as you get. I
- really feel that it just takes a very small amount of clear thinking
- combined with an even smaller amount of effort to do it RIGHT (but
- according to whose definition of RIGHT?).
-
- Of course if you really want to "sell the product", you should be
- using NLS (or some equivalent), then your code is reduced when
- printing errors, and you don't need to change the code to use it with
- heaps of different languages.
-
- while on the subject of international character sets, to read the name
- of my city in my .sig below, you will need the ISO-8859-1 (latin1)
- character set :-) (ASCII + 1 bit)
-
- catchya
-
- -----------------------------------------------------------------
- Stephen Riehm Configuration Management _-_|\
- smr@pki-nbg.philips.de Philips Kommunikations Industrie / \
- Work: +49 911 526 2975 N|rnberg, Germany \_.-.!/
- Fax: +49 911 526 3678 "I was there, now I am here!" v
- "My company speaks another language, I CAN'T speak on its' behalf"
-