🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.d
Article #4977

Re: vt100clock

#4977
From: Jeff Beadles;X2568;61-215
Date: Wed, 10 May 1989 20:30
33 lines
1635 bytes
In article <7150@bsu-cs.bsu.edu> neubauer@bsu-cs.bsu.edu (Paul Neubauer) writes:
>I tried to compile Joel Spolsky's vt100clock program from Vol. 6, Issue 98,
>archived as clock.msk.  I am running on a BSD 4.3 system, if that is any
>help.  The command 'cc vt100clock.c' produced the output:

>Undefined:
>_cuserid

>Can anybody tell me (1) what it does, (2) if there is a BSD equivalent or
>near-equivalent, and/or (3) what to do about it?  

>Thanks much.

Well, here's what I have in my manual...  cuserid(3S)

#include <stdio.h>
char *cuserid(s)
char *s;

Generate a string representation of the login name of the owner of the
current process.  If s is a NULL pointer, then cuserid will allocate space
for the login name.  If not, then cuserid expects s to be an array of at
least L_cuserid characters.  (Defined in stdio.h)  If an error, a null
pointer is returned if called with a null pointer, else s[0]='\0'

Something could be easily make with getpwuid(getuid()) to return the
desired results.

	-Jeff

--
Jeff Beadles		Utek Sustaining Engineering, Tektronix Inc.
jeff@quark.WV.TEK.COM
Technical Details
Message-ID: <3291@orca.WV.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!tektronix!orca!quark!jeff
References: <7150@bsu-cs.bsu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wasatch!cs.utexas.edu!uunet!tektronix!orca!quark!jeff
From: jeff@quark.WV.TEK.COM (Jeff Beadles;X2568;61-215)
Newsgroups: comp.sources.d
Subject: Re: vt100clock
Keywords: cuserid()?, BSD, SysV
Message-ID: <3291@orca.WV.TEK.COM>
Date: 10 May 89 20:30:53 GMT
References: <7150@bsu-cs.bsu.edu>
Sender: nobody@orca.WV.TEK.COM
Reply-To: jeff@quark.WV.TEK.COM (Jeff Beadles)
Distribution: na
Organization: Tektronix, Inc., Wilsonville, OR
Lines: 33