🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #32539

Re: Megamax v1.1 Bug?

#32539
From: A Ness
Date: Sun, 15 May 1988 22:18
26 lines
1615 bytes
In article <May.12.20.53.04.1988.25733@topaz.rutgers.edu> paone@topaz.rutgers.edu (Phil Paone) writes:
>>
>I have been playing with my v1.1 of Megamax C and found what appears
>to be a bug in c lib.  argc is being initialized to 1 instead of 0 so
>even when no arguments are passed, argc is 1.  I went into the library
>and patched this up, but the argv also appears to be off.  Is this the
>case, or is this supposed to be different from UNIX's method of
>handling them (Yes, I know argv[0] does not work)?
>-- 

Excuse me if I'm wrong - but isnt it true that you have used an argument - 
ie.  the program name ? In fact I just tried it on two of our Un*x boxes
and this is indeed the case - argc should be >=1 argv[0] should be the
program name (I know it isnt on the ST),and argv[1]..argv[--argc] contains
the arguments. 

Andie Ness . Department of Computer Science ,Edinburgh University.

ARPA:  csan%ed.itspna@nss.cs.ucl.ac.uk   UUCP:  ...!uunet!mcvax!ukc!itspna!csan
         an%ed.lfcs@nss.cs.ucl.ac.uk

                   	JANET: csan@uk.ac.ed.itspna
				 an@uk.ac.ed.lfcs

% These are my own views and any resemblance to any coherent reasoning is
% probably a typo.
Technical Details
Message-ID: <1342@its63b.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!its63b!csan
References: <May.12.20.53.04.1988.25733@topaz.rutgers.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!its63b!csan
From: csan@its63b.ed.ac.uk (A Ness)
Newsgroups: comp.sys.atari.st
Subject: Re: Megamax v1.1 Bug?
Keywords: argc,argv
Message-ID: <1342@its63b.ed.ac.uk>
Date: 15 May 88 22:18:17 GMT
References: <May.12.20.53.04.1988.25733@topaz.rutgers.edu>
Reply-To: csan@itspna.ed.ac.uk (Andie)
Organization: Computer Science Department, Edinburgh University
Lines: 26