🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.apple2.gno
Article #456

Still having problems with getopt (mkdir 1.1 buggy!)

#456
From: James L. Brookes
Date: Thu, 07 Jan 1993 23:39
23 lines
1667 bytes
Whelp, I thought everything was fixed, but I am still having problems
with getopt and restartability.

The problem occurs when I call mkdir with more than one wrong option flag.
For example, 'mkdir -abcd foo'.  The message it gives me is proper, ie
it doesn't like the 'a' flag.  Unfortunatly, the next three executions of
mkdir barf too!.  No matter how I call mkdir it dies with flags 'b' 'c' and
'd' before it will work again.

I've initialized all the variables that are in getopt.h, without any 
success.  When I execute mkdir the second time, argv[1] is "-p" (I 
call it with 'mkdir -p foo/bar').  I set optarg to argv[1], so that
shouldn't be a problem...

Any suggestions?  

PS: There is another (unrelated) bug with mkdir when you use the recursive
flag on a path with no seperator.  This has been fixed.
-- 
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|          James Brookes            | Inet: bb252@cleveland.freenet.edu |
|``What, me worry?'' - A. E. Neuman |   jamesb@cscihp.ecst.csuchico.edu |
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Technical Details
Message-ID: <1iievlINN2e9@charnel.ecst.csuchico.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!nic.csu.net!koko.csustan.edu!rat!charnel!jamesb
References: <1ignuuINNhb@charnel.ecst.csuchico.edu> <C0Hynu.Ko8@CAM.ORG> <1iieksINN2dr@charnel.ecst.csuchico.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!nic.csu.net!koko.csustan.edu!rat!charnel!jamesb
Newsgroups: comp.sys.apple2.gno
Subject: Still having problems with getopt (mkdir 1.1 buggy!)
Message-ID: <1iievlINN2e9@charnel.ecst.csuchico.edu>
From: jamesb@ecst.csuchico.edu (James L. Brookes)
Date: 7 Jan 1993 23:39:33 GMT
References: <1ignuuINNhb@charnel.ecst.csuchico.edu> <C0Hynu.Ko8@CAM.ORG> <1iieksINN2dr@charnel.ecst.csuchico.edu>
Organization: California State University, Chico
NNTP-Posting-Host: hairball.ecst.csuchico.edu
Lines: 23