home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
shar349.zip
/
os2
/
notes.os2
< prev
next >
Wrap
Text File
|
1993-05-11
|
5KB
|
150 lines
Notes on the OS/2 port.
Return-Path: <ian+@transarc.com>
Date: Mon, 10 May 1993 10:40:45 -0400 (EDT)
From: Ian_Stewartson@transarc.com
To: Darrel R Hankerson <hankedr@mail.auburn.edu>
Subject: Re: -s option
Hi Darrel,
>The beta of 2.2 has been working very nicely for me. There is an older
>"problem" which came up again during work on shar 3.49.
>
>As I understand the -s option of sh, the lines
> sh -s -c < file.shar
>should be equivalent to
> sh file.shar -c
>
>I may be misreading sh.man; however, the source for unshar 3.49 apparently
>indicates that the first line above should work. The sources give:
>
> if(!(shpr = popen((c_flag ? "sh -s -c" : "sh"),"w")))
Yes, this is a bug. The Bourne shell appears to support the functionality
as you describe it (and as described in the sh.man). However, it is
implemented as the functionality is described for the the ksh.
I'll try and fix it 'sometime' unless it's urgent. I'm sort of a bit
tied up working for the client.
Regards
Ian Stewartson
Email: istewart@datlog.co.uk.
Mail: Data Logic Limited, Queens House,
Kymberley Road, Harrow, Middlesex, HA1 1YR. UK
Currently, somewhere in Pittsburgh, USA.
---
Nothing that a British citizen says to a foreigner is taken seriously by
Her Majesty's Government, which recognises that the extingencies of life
in Darkest Abroad may force one to say all sorts of bizarre things to the
natives, and none of which actually mean anything (Paul Roberts).
=============================================================================
Date: Mon, 10 May 1993 06:11:28 +0200
From: Darrel R Hankerson <hankedr@mail.auburn.edu>
Subject: popen(), -Zomf, and quoted strings
Sender: emx-list@ludd.luth.se
I have a working port of shar and unshar 3.49, using MSC, but there are
two problems with EMX/gcc 0.8f:
1. -Zomf -Zmt leads to sys3171. Omitting the -Z options fixes this. I have
not examined very thoroughly, but I suspect a problem with popen().
2. It seems that no combination of \ and \" will permit quoted strings
to be passed properly using popen(). Example:
sprintf(line,"file %s | egrep -c \"text|shell\"",file);
fpsource = popen(line,"r");
This kind of quoting works under MSC 6.00A, but I cannot find a fix for
EMX/gcc.
Suggestions?
--Darrel Hankerson hankedr@mail.auburn.edu
=============================================================================
From: Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
Date: Tue, 11 May 93 14:19:12 +0200
To: hankedr@mail.auburn.edu
In-Reply-To: Darrel R Hankerson's message of Mon, 10 May 1993 06:10:34 +0200
Subject: popen(), -Zomf, and quoted strings
Try a bigger stack. The default is way too small with -Zomf.
=============================================================================
Date: Tue, 11 May 93 08:54:45 CDT
From: Darrel R Hankerson <hankedr>
To: mattes@azu.informatik.uni-stuttgart.de
In-Reply-To: Eberhard Mattes's message of Tue, 11 May 93 14:19:12 +0200
Subject: popen(), -Zomf, and quoted strings
> Try a bigger stack. The default is way too small with -Zomf.
Thanks for the fast reply! The paragraph in emxdev.doc beginning
"When using method (E3)" lead me to believe that the stacksize
problem was with -Zsys. I should have looked more carefully--sorry.
I still have problems with quoted args in popen. I want to do something like
popen("compress -c \"t/file\"")
Rommel noted the problem in his port of "man". He changed the '/' to '\\'.
This might be a solution, but not quite desirable in other parts of the code.
Note that this is somehow a problem only with emx+4os2; it works if
1. using MSC (with cmd or 4os2)
2. using Stewartson's sh (and COMSPEC=/bin/sh).
3. using cmd.exe
Thanks again.
--Darrel Hankerson hankedr@mail.auburn.edu
=============================================================================
From: Eberhard Mattes <mattes@azu.informatik.uni-stuttgart.de>
Date: Tue, 11 May 93 16:49:38 +0200
To: hankedr@mail.auburn.edu
In-Reply-To: Darrel R Hankerson's message of Tue, 11 May 93 08:54:45 CDT
Subject: popen(), -Zomf, and quoted strings
Looks like a problem in 4OS2. I'll check it.
=============================================================================
Date: Tue, 11 May 93 19:43:01 CDT
From: Darrel R Hankerson <hankedr>
To: mattes@azu.informatik.uni-stuttgart.de
In-Reply-To: Eberhard Mattes's message of Tue, 11 May 93 16:49:38 +0200
Subject: popen(), -Zomf, and quoted strings
> Looks like a problem in 4OS2. I'll check it.
Earlier, I said that the problem was only with emx+4os2. This is not quite
correct. I had forgotten about the "grep" problem mentioned in my original
post:
sprintf(line,"file %s | egrep -c \"text|shell\"",file);
fpsource = popen(line,"r");
The above works fine in the MSC version (with 4os2 || cmd || sh), but does
not work with emx (I have tried other combinations of \\ and \").
--Darrel Hankerson hankedr@mail.auburn.edu or hank@ducvax.auburn.edu