🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #228

Re: Bug in users command

#228
From: John F Haugh II
Date: Sat, 19 Jan 1991 19:34
24 lines
1822 bytes
In article <18928:Jan1916:26:3291@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:
>No. Unless I'm mistaken, the objects being passed in are pointers to
>arrays of char, while the objects expected are pointers to char. There
>is no implicit conversion that justifies this, though undoubtedly it
>works on most machines.

How does a pointer to an unknown number of characters differ from a
pointer to a known number of characters when passed as an argument?

qsort() invokes scmp() with the pointer to an array of UT_NAMESIZE
characters.  scmp() is expecting a pointer to a character, which is
coincidentally the same type object as "char a[UT_NAMESIZE]" since
any "array of type X" type parameters are converted to "pointer to
type X object" parameters.  I believe this is plainly specified
both by ANSI-C and K&R-Classic.

>Anyway, the 200-user limit is purely silly.

Agreed.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh@rpp386.cactus.org
"While you are here, your wives and girlfriends are dating handsome American
 movie and TV stars. Stars like Tom Selleck, Bruce Willis, and Bart Simpson."
Technical Details
Message-ID: <18965@rpp386.cactus.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!execu!sequoia!rpp386!jfh
References: <18947@rpp386.cactus.org> <1126:Jan1811:17:4091@kramden.acf.nyu.edu> <18958@rpp386.cactus.org> <18928:Jan1916:26:3291@kramden.acf.nyu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!execu!sequoia!rpp386!jfh
From: jfh@rpp386.cactus.org (John F Haugh II)
Newsgroups: comp.bugs.4bsd
Subject: Re: Bug in users command
Message-ID: <18965@rpp386.cactus.org>
Date: 19 Jan 91 19:34:22 GMT
References: <18947@rpp386.cactus.org> <1126:Jan1811:17:4091@kramden.acf.nyu.edu> <18958@rpp386.cactus.org> <18928:Jan1916:26:3291@kramden.acf.nyu.edu>
Reply-To: jfh@rpp386.cactus.org (John F Haugh II)
Organization: Lone Star Cafe and BBS Service
Lines: 24
X-Clever-Slogan: Recycle or Die.