home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / wizards / 4746 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  2.4 KB

  1. Xref: sparky comp.unix.wizards:4746 comp.unix.shell:4750 comp.unix.misc:4211
  2. 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
  3. From: smr@pki-nbg.philips.de (Stephen Riehm)
  4. Newsgroups: comp.unix.wizards,comp.unix.shell,comp.unix.misc
  5. Subject: Re: The Problem with UNIX
  6. Message-ID: <smr.722003971@hitkw14>
  7. Date: 17 Nov 92 12:39:31 GMT
  8. References: <1992Nov11.194557.16258@yarc.uucp> <1992Nov12.204710.5808@reed.edu> <1992Nov14.145943.1288@global.hacktic.nl> <1992Nov16.234721.3224@nic.csu.net>
  9. Sender: news@pki-nbg.philips.de
  10. Reply-To: smr@pki-nbg.philips.de
  11. Lines: 38
  12.  
  13. oleg@gd. (Oleg Kibirev) writes:
  14.  
  15. > Seriously, I would really appreciate a call like eprintf that accepts
  16. > the same arguments as printf but also has staff like %n for program
  17. > name, %m for message, %p for callers PID etc. This would encourage people
  18. > to use more meaningful diagnostics.
  19.  
  20. It already exists:
  21.     fprintf(stderr,"%s[%d]: %s\n", argv[0], (int)getpid(), "message");
  22.  
  23. Of course there are the usual 50,000 different ways of formatting this
  24. same line, but the code is there, the problem is that people don't use
  25. it. The second problem is that there are guys out there who get
  26. wonderful new schemes in their heads, and insist that everyone working
  27. on their project use this wonderful new scheme (I do this sometimes,
  28. but I am leveling out in my young age), there is no STANDARD way of
  29. producing errors, printing to stderr is about as close as you get. I
  30. really feel that it just takes a very small amount of clear thinking
  31. combined with an even smaller amount of effort to do it RIGHT (but
  32. according to whose definition of RIGHT?).
  33.  
  34. Of course if you really want to "sell the product", you should be
  35. using NLS (or some equivalent), then your code is reduced when
  36. printing errors, and you don't need to change the code to use it with
  37. heaps of different languages.
  38.  
  39. while on the subject of international character sets, to read the name
  40. of my city in my .sig below, you will need the ISO-8859-1 (latin1)
  41. character set :-) (ASCII + 1 bit)
  42.  
  43. catchya
  44.  
  45. -----------------------------------------------------------------
  46. Stephen Riehm        Configuration Management       _-_|\ 
  47. smr@pki-nbg.philips.de    Philips Kommunikations Industrie  /     \
  48. Work: +49 911 526 2975    N|rnberg, Germany          \_.-.!/
  49. Fax:  +49 911 526 3678    "I was there, now I am here!"           v 
  50. "My company speaks another language, I CAN'T speak on its' behalf"
  51.