diff options
| author | xHire <xhire@tuxportal.cz> | 2009-05-26 00:44:42 +0200 |
|---|---|---|
| committer | xHire <xhire@tuxportal.cz> | 2009-05-26 01:12:04 +0200 |
| commit | 409083e69d4bb9d8b1eb492b3474c86e093f2de8 (patch) | |
| tree | 741e3214c07578cde88e700895f203706284017c /src/base/director.c | |
| parent | b992c007c186fddf31f67a7ed0bd5789cfb9b85e (diff) | |
Rewritten messages/comments in code of base
Rectified the coding style in code of base
Diffstat (limited to 'src/base/director.c')
| -rw-r--r-- | src/base/director.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/base/director.c b/src/base/director.c index 2e6a24a..66cef0c 100644 --- a/src/base/director.c +++ b/src/base/director.c @@ -1,4 +1,3 @@ - #include <dirent.h> #include <sys/types.h> #include <stdlib.h> @@ -30,14 +29,13 @@ director_t *director_load(char *s) new->list = list_new(); #ifndef __WIN32__ - if (s[0] == '/') + if (s[0] == '/') { #else - if (s[1] == ':') + if (s[1] == ':') { #endif strcpy(path, s); - - else { - // this is really correct aproach + } else { + /* this is really correct aproach */ getcwd(path, STR_PATH_SIZE); strcat(path, "/"); strcat(path, s); @@ -52,15 +50,16 @@ director_t *director_load(char *s) return NULL; } - while ((item = readdir(dir)) != NULL) + while ((item = readdir(dir)) != NULL) { list_add(new->list, strdup(item->d_name)); + } closedir(dir); return new; } -void director_destroy(director_t * p) +void director_destroy(director_t *p) { assert(p != NULL); |