diff options
author | james <> | 2008-03-02 10:37:56 +0000 |
---|---|---|
committer | james <> | 2008-03-02 10:37:56 +0000 |
commit | f23e17f2eac3f506afe9a1e44302112cc363b59f (patch) | |
tree | 2c8ced74467ecd189daee8e9b38238f7a0894de4 /apps | |
parent | 77b31c3e51edfefc9b82b7ba31944c4161997ef4 (diff) | |
download | sympathy-f23e17f2eac3f506afe9a1e44302112cc363b59f.tar.gz sympathy-f23e17f2eac3f506afe9a1e44302112cc363b59f.tar.bz2 sympathy-f23e17f2eac3f506afe9a1e44302112cc363b59f.zip |
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r-- | apps/sympathy.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c index e1ed6e6..0cbd75d 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.29 2008/03/02 10:37:56 james + * *** empty log message *** + * * Revision 1.28 2008/03/02 10:27:24 james * *** empty log message *** * @@ -150,11 +153,12 @@ fatal_moan (char *fmt, ...) char * -teedious_snprint (char *fmt, va_alist * ap) +teedious_snprintf (char *fmt, va_list ap) { - va_alist *aq; + va_list aq; int size = 1024; char *buf = malloc (size); + int n; if (!buf) fatal_moan ("malloc failed"); @@ -207,8 +211,7 @@ gloo_paths (char *dir, char *leaf) char * mome (char *fmt, ...) { - - char *rt, *home, *leaf; + char *ret, *home, *leaf; va_list ap; @@ -232,7 +235,7 @@ mome (char *fmt, ...) } -char * +Socket * find_socket (char *fmt, ...) { Socket *ret; @@ -295,8 +298,7 @@ list_sockets_in_dir (char *sockdir) int hostname_len = strlen (hostname); - if (!dir) - fatal_moan ("can't examine %s for sockets", sockdir); + if (!dir) return; rewinddir (dir); @@ -337,15 +339,18 @@ list_sockets (void) for (ptr = socket_dirs; *ptr; ptr++) { - if (*ptr == '~') { - h = mome (ptr + 1); + if (**ptr == '~') { + h = mome (*ptr + 1); } else { - h = strdup (*ptr); + h = *ptr; } if (!h) continue; + list_sockets_in_dir (h); + + if (**ptr == '~') free (h); } |