diff options
author | Michael Stapelberg <michael+x200@stapelberg.de> | 2008-10-07 18:38:22 +0200 |
---|---|---|
committer | Michael Stapelberg <michael+x200@stapelberg.de> | 2008-10-07 18:38:22 +0200 |
commit | c5b50af38827e5e7f69d2d14b685481ea02c9fc4 (patch) | |
tree | 1def0b8d27fd6e846a782dfd51e902f2b297599f /wmiistatus.c | |
parent | 8f5d77d5e4d979acf21507c0e764a11709de8db5 (diff) |
More comments
Diffstat (limited to 'wmiistatus.c')
-rw-r--r-- | wmiistatus.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/wmiistatus.c b/wmiistatus.c index 1dd551e..546d042 100644 --- a/wmiistatus.c +++ b/wmiistatus.c @@ -68,6 +68,10 @@ static char *concat(const char *str1, const char *str2) { return concatbuf; } +/* + * Cleans wmii's /rbar directory by deleting all regular files + * + */ static void cleanup_rbar_dir() { struct dirent *ent; DIR *dir; @@ -86,6 +90,11 @@ static void cleanup_rbar_dir() { closedir(dir); } +/* + * Creates the specified file in wmii's /rbar directory with + * correct modes and initializes colors if colormode is enabled + * ' + */ static void create_file(const char *name) { char pathbuf[strlen(wmii_path)+256+1]; @@ -100,6 +109,10 @@ static void create_file(const char *name) { close(fd); } +/* + * Writes the given message in the corresponding file in wmii's /rbar directory + * + */ static void write_to_statusbar(const char *name, const char *message) { char pathbuf[strlen(wmii_path)+256+1]; @@ -111,6 +124,10 @@ static void write_to_statusbar(const char *name, const char *message) { close(fd); } +/* + * Writes an errormessage to statusbar + * + */ static void write_error_to_statusbar(const char *message) { cleanup_rbar_dir(); create_file("error"); |