home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / programm / 13021 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.6 KB  |  32 lines

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