home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!rutgers!njitgw.njit.edu!tesla.njit.edu!erh0362
- From: erh0362@tesla.njit.edu (Elliotte Rusty Harold)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How do you acess chooser username??
- Message-ID: <1992Jul25.094008.1@tesla.njit.edu>
- Date: 25 Jul 92 14:40:08 GMT
- References: <1992Jul18.042927.5829@hellgate.utah.edu> <1992Jul18.190914.26404@mnemosyne.cs.du.edu> <1992Jul22.175943.14696@mtxinu.COM>
- Sender: news@njit.edu
- Organization: New Jersey Institute of Technology
- Lines: 19
- Nntp-Posting-Host: tesla
-
- In article <1992Jul22.175943.14696@mtxinu.COM>, larrym@mtxinu.COM (Larry Meyer - mac weenie) writes:
- > In article <1992Jul18.190914.26404@mnemosyne.cs.du.edu> tinsel@uiuc.edu writes:
- >>mshields%peruvian.utah.edu@cs.utah.edu (Michael S Shields) writes:
- >>
- >>>How do you do this?? I can't seem to find even a mention of the chooser user-
- >>>name anywhere.(IM, Think Reference, Prog. Primer). I know it can be done.
- >>
- Think C includes a function char* getlogin(void) intended to mimic the
- Unix function getlogin. It returns exactly what you're looking for, i.e. the
- username set in the chooser desk accessory. It's documented on p. 191 pf the
- Standard Libraries reference in the Think C 4 manuals. You'll need to
- #include<unix.h> and either add the Unix library to your project or the
- appropriate function from unixmisc.c to your source code. This is all under
- Think C 4.05. Details may have changed under 5.0 but I imagine at least the
- functionality is still there.
-
- Elliotte Rusty Harold Department of Applied Mathematics
- elharo@m.njit.edu New Jersey Institute of Technology
- erh0362@tesla.njit.edu Newark, NJ 07103
-