home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / atari / st / tech / 4189 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  3.4 KB

  1. Path: sparky!uunet!mcsun!uknet!edcastle!dltest
  2. From: dltest@castle.ed.ac.uk (Kevin Davidson)
  3. Newsgroups: comp.sys.atari.st.tech
  4. Subject: Re: Problems with ARGV
  5. Summary: proposed ARGV extension a dodgy idea.
  6. Message-ID: <24299@castle.ed.ac.uk>
  7. Date: 30 Jul 92 09:08:49 GMT
  8. References: <9130026@hpbbrd.bbn.hp.com> <92211.111512RESCHKE@DMSWWU1A.UNI-MUENSTER.DE> <1992Jul29.130755.27902@mks.com>
  9. Followup-To: comp.sys.atari.tech
  10. Organization: Edinburgh University
  11. Lines: 72
  12.  
  13. ant@mks.com (Anthony Howe), babbling inanely in article <1992Jul29.130755.27902@mks.com>, claimed:
  14. >Julian F. Reschke writes:
  15. >>In article <9130026@hpbbrd.bbn.hp.com>, jensk@hpbbrd.bbn.hp.com (Jens Kilian)
  16. >>says:
  17. >>>    [Problem with NULL parameters to programs
  18. ......
  19. >
  20. >>Your proposal for an ARGV extension seems to work. If 'we' all (MiNT-Libs,
  21. >>and GNU-Libs, PureC startup code and so on) agree on this, that could be
  22. >>a solution...
  23. >
  24.   I don't think it will, see below.
  25.  
  26. >Well, I've been working on an ANSI/POSIX library for Sozobon C 1.2.  I've
  27. >provided my own C startup that supports ARGV.  If you're going to do
  28. >this, which seems reasonable, you'll have to pick a better name than
  29. >ARRGH for the env.var. since it has no meaning.  Something like
  30. >
  31. >    ARGV_EMPTY=index1, index2, ... indexN\0
  32. >
  33. >would be more acceptable.
  34. >
  35.  
  36.  So where does this environment variable go ? Before ARGV ? Then programs
  37. that don't understand will pass it onto their children, so we need *another*
  38. flag to say the information is valid. Yeeuch!
  39. After ARGV ? How do we tell we are after ARGV, if the double null is possibly
  40. just a null parameter ? The information we need is somewhere else...
  41. (Think about this:
  42.  
  43. prog.ttp arg1 "" ARGV_EMPTY=foo bar bletch
  44.  
  45. (yeah it's unlikely, but *possible*)
  46.  
  47. It looks like there should have been a length flag somewhere or maybe
  48. some other terminator than \0\0.
  49. The other solutions I've seen have problems too:
  50. 1) escape characters (\001 etc) will really confuse older programs.
  51. 2) adding spaces doesn't seem too bad, but there has to be a tidier fix
  52.    than this.
  53.  
  54. I'd say put a length flag or the value of argc somewhere. I'd suggest
  55. breaking MWC programs and putting "ARGV=argc\0arg1\0arg2\0\0arg4\0\0"
  56. if MiNT can pass open file descriptors to processes' children. I think
  57. something somewhere will be broken by whatever method we choose, and
  58. this one at least is aesthetically more pleasing.
  59.  
  60.  As an aside, who else is still using Sozobon 1.2 ? Can anyone tell me
  61. why I should move to Sozobon 2.0 or 1.33i ? What's the difference anyway ?
  62. What does Heat'n'serve mean ? Have either of these fixed all the short==int
  63. assumptions in the source that threw me when I built it as a Sun-based
  64. cross compiler ? (I seem to remember somewhere a `#define short int'
  65. somewhere !!!)
  66. I'd like to make sure my programs will run with MiNT (when I can afford
  67. to upgrade from 1 -crowded- meg), so is there a MiNT friendly libc ?
  68. (the dlibs I have uses tight loops for sleep() etc.)
  69.  
  70.  Is anybody out there using MiNT on a 1040st ? How ? What shell are
  71. you using ? Tcsh seems to be too big, and gulam doesn't understand job
  72. control. (I don't want to know about bourne-shell lookalikes I'm a BSD
  73. man.)
  74.  
  75. >-ant
  76. >-- 
  77. >ant@mks.com                                                   Anthony C Howe 
  78. >Mortice Kern Systems Inc. 35 King St. N., Waterloo, Ontario, Canada, N2J 6W9
  79. >"Nice legs.  For a human that is." - Worf (Q-pid)
  80.  
  81.  
  82.  
  83.     .Kevin.
  84. Kevin.Davidson@ed.ac.uk | dltest@castle.ed.ac.uk | dltest@festival.ed.ac.uk
  85.