Changeset 3489:8f6a8b0ac453 in roaraudio for libroarpulse/util.c
- Timestamp:
- 02/14/10 18:17:25 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroarpulse/util.c
r2579 r3489 70 70 } 71 71 72 /** Return the current username in the specified string buffer. */ 73 char *pa_get_user_name(char *s, size_t l); 74 75 /** Return the current hostname in the specified buffer. */ 76 char *pa_get_host_name(char *s, size_t l); 77 78 /** Return the fully qualified domain name in s */ 79 char *pa_get_fqdn(char *s, size_t l); 80 81 /** Return the home directory of the current user */ 82 char *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 */ 96 int 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 72 105 //ll
Note: See TracChangeset
for help on using the changeset viewer.