Changeset 3489:8f6a8b0ac453 in roaraudio for libroarpulse


Ignore:
Timestamp:
02/14/10 18:17:25 (10 years ago)
Author:
phi
Branch:
default
Message:

some more prototypes, implemented some of them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroarpulse/util.c

    r2579 r3489  
    7070} 
    7171 
     72/** Return the current username in the specified string buffer. */ 
     73char *pa_get_user_name(char *s, size_t l); 
     74 
     75/** Return the current hostname in the specified buffer. */ 
     76char *pa_get_host_name(char *s, size_t l); 
     77 
     78/** Return the fully qualified domain name in s */ 
     79char *pa_get_fqdn(char *s, size_t l); 
     80 
     81/** Return the home directory of the current user */ 
     82char *pa_get_home_dir(char *s, size_t l) { 
     83 char * home = getenv("HOME"); 
     84 
     85 if ( home == NULL ) 
     86  return NULL; 
     87 
     88 strncpy(s, home, l); 
     89 
     90 s[l-1] = 0; 
     91 
     92 return s; 
     93} 
     94 
     95/** Wait t milliseconds */ 
     96int pa_msleep(unsigned long t) { 
     97#ifdef ROAR_TARGET_WIN32 
     98 Sleep(t); 
     99#else 
     100 usleep(1000*t); 
     101#endif 
     102 return 0; 
     103} 
     104 
    72105//ll 
Note: See TracChangeset for help on using the changeset viewer.