| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sfluid.h" char * get_login (void)
Returns the identity of the currently-logged user. The returned string is in a static buffer. Returns NULL if no user is currently logged-in.
{ #if (defined (__WINDOWS__)) # if (defined (WIN32)) ULONG user_name_max = 255; static char user_name [256]; if (!GetUserName (user_name, &user_name_max)) strncpy (user_name, "unknown", sizeof (user_name)); return (user_name); # else return ("none"); # endif #elif (defined (__UNIX__) || defined (__OS2__) || defined (__VMS__)) return (getlogin ()); #endif }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |