home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / shar349.zip / os2 / notes.os2 < prev    next >
Text File  |  1993-05-11  |  5KB  |  150 lines

  1. Notes on the OS/2 port.
  2.  
  3.  
  4. Return-Path: <ian+@transarc.com>
  5. Date: Mon, 10 May 1993 10:40:45 -0400 (EDT)
  6. From: Ian_Stewartson@transarc.com
  7. To: Darrel R Hankerson <hankedr@mail.auburn.edu>
  8. Subject: Re: -s option
  9.  
  10. Hi Darrel,
  11.  
  12. >The beta of 2.2 has been working very nicely for me.  There is an older
  13. >"problem" which came up again during work on shar 3.49.
  14. >
  15. >As I understand the -s option of sh, the lines
  16. >  sh -s -c < file.shar
  17. >should be equivalent to
  18. >  sh file.shar -c
  19. >
  20. >I may be misreading sh.man; however, the source for unshar 3.49 apparently
  21. >indicates that the first line above should work. The sources give:
  22. >
  23. >  if(!(shpr = popen((c_flag ? "sh -s -c" : "sh"),"w")))
  24.  
  25. Yes, this is a bug.  The Bourne shell appears to support the functionality
  26. as you describe it (and as described in the sh.man).  However, it is
  27. implemented as the functionality is described for the the ksh.
  28.  
  29. I'll try and fix it 'sometime' unless it's urgent.  I'm sort of a bit
  30. tied up working for the client.
  31.  
  32.  
  33. Regards
  34.  
  35. Ian Stewartson
  36.  
  37. Email:  istewart@datlog.co.uk.
  38. Mail:   Data Logic Limited, Queens House,
  39.         Kymberley Road, Harrow, Middlesex, HA1 1YR. UK
  40.  
  41. Currently, somewhere in Pittsburgh, USA.
  42. ---
  43. Nothing that a British citizen says to a foreigner is taken seriously by
  44. Her Majesty's Government, which recognises that the extingencies of life
  45. in Darkest Abroad may force one to say all sorts of bizarre things to the
  46. natives, and none of which actually mean anything (Paul Roberts).
  47.  
  48. =============================================================================
  49.  
  50.  
  51. Date: Mon, 10 May 1993 06:11:28 +0200
  52. From: Darrel R Hankerson <hankedr@mail.auburn.edu>
  53. Subject: popen(), -Zomf, and quoted strings
  54. Sender: emx-list@ludd.luth.se
  55.  
  56. I have a working port of shar and unshar 3.49, using MSC, but there are
  57. two problems with EMX/gcc 0.8f:
  58.  
  59. 1. -Zomf -Zmt leads to sys3171. Omitting the -Z options fixes this. I have
  60. not examined very thoroughly, but I suspect a problem with popen().
  61.  
  62.  
  63. 2. It seems that no combination of \ and \" will permit quoted strings
  64. to be passed properly using popen(). Example:
  65.   
  66.    sprintf(line,"file %s | egrep -c \"text|shell\"",file);
  67.    fpsource = popen(line,"r");
  68.  
  69. This kind of quoting works under MSC 6.00A, but I cannot find a fix for
  70. EMX/gcc.
  71.  
  72. Suggestions?
  73.  
  74. --Darrel Hankerson hankedr@mail.auburn.edu
  75.  
  76.  
  77. =============================================================================
  78.  
  79. From: Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
  80. Date: Tue, 11 May 93 14:19:12 +0200
  81. To: hankedr@mail.auburn.edu
  82. In-Reply-To: Darrel R Hankerson's message of Mon, 10 May 1993 06:10:34 +0200 
  83. Subject: popen(), -Zomf, and quoted strings
  84.  
  85. Try a bigger stack.  The default is way too small with -Zomf.
  86.  
  87.  
  88. =============================================================================
  89.  
  90. Date: Tue, 11 May 93 08:54:45 CDT
  91. From: Darrel R Hankerson <hankedr>
  92. To: mattes@azu.informatik.uni-stuttgart.de
  93. In-Reply-To: Eberhard Mattes's message of Tue, 11 May 93 14:19:12 +0200 
  94. Subject: popen(), -Zomf, and quoted strings
  95.  
  96. >   Try a bigger stack.  The default is way too small with -Zomf.
  97.  
  98. Thanks for the fast reply!  The paragraph in emxdev.doc beginning
  99. "When using method (E3)" lead me to believe that the stacksize
  100. problem was with -Zsys.  I should have looked more carefully--sorry.
  101.  
  102. I still have problems with quoted args in popen. I want to do something like
  103.   popen("compress -c \"t/file\"")
  104.  
  105. Rommel noted the problem in his port of "man".  He changed the '/' to '\\'.
  106. This might be a solution, but not quite desirable in other parts of the code.
  107.  
  108. Note that this is somehow a problem only with emx+4os2; it works if
  109.  
  110.   1. using MSC (with cmd or 4os2)
  111.   2. using Stewartson's sh (and COMSPEC=/bin/sh).
  112.   3. using cmd.exe
  113.  
  114. Thanks again.
  115.  
  116. --Darrel Hankerson hankedr@mail.auburn.edu
  117.  
  118. =============================================================================
  119.  
  120. From: Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
  121. Date: Tue, 11 May 93 16:49:38 +0200
  122. To: hankedr@mail.auburn.edu
  123. In-Reply-To: Darrel R Hankerson's message of Tue, 11 May 93 08:54:45 CDT 
  124. Subject: popen(), -Zomf, and quoted strings
  125.  
  126. Looks like a problem in 4OS2.  I'll check it.
  127.  
  128.  
  129. =============================================================================
  130.  
  131. Date: Tue, 11 May 93 19:43:01 CDT
  132. From: Darrel R Hankerson <hankedr>
  133. To: mattes@azu.informatik.uni-stuttgart.de
  134. In-Reply-To: Eberhard Mattes's message of Tue, 11 May 93 16:49:38 +0200
  135. Subject: popen(), -Zomf, and quoted strings
  136.  
  137. >   Looks like a problem in 4OS2.  I'll check it.
  138.  
  139. Earlier, I said that the problem was only with emx+4os2. This is not quite
  140. correct. I had forgotten about the "grep" problem mentioned in my original
  141. post:
  142.  
  143.   sprintf(line,"file %s | egrep -c \"text|shell\"",file);
  144.   fpsource = popen(line,"r");
  145.  
  146. The above works fine in the MSC version (with 4os2 || cmd || sh), but does
  147. not work with emx (I have tried other combinations of \\ and \").
  148.  
  149. --Darrel Hankerson hankedr@mail.auburn.edu or hank@ducvax.auburn.edu
  150.