diff options
author | norly <ny-git@enpas.org> | 2013-02-15 00:10:58 +0000 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-02-15 00:10:58 +0000 |
commit | 2ddbfa53a31360e50565345a1ac08c0799c8243e (patch) | |
tree | 4425fb570559d1425f29c86effc66706b2ce1e91 /statuses/temp.c | |
parent | 9102c7c65421f2ef3e415c7e76a741657e34663b (diff) |
Reindent and restyle
Diffstat (limited to 'statuses/temp.c')
-rw-r--r-- | statuses/temp.c | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/statuses/temp.c b/statuses/temp.c index 5737e29..f2cece8 100644 --- a/statuses/temp.c +++ b/statuses/temp.c @@ -5,27 +5,30 @@ void status_temp(char *title, char *sysfile) { - char stline[16]; - int stfile; - ssize_t stlen; + char stline[16]; + int stfile; + ssize_t stlen; - stlen = fileRead(stline, sizeof(stline), sysfile); - if (stlen <= 0) - return; + stlen = fileRead(stline, sizeof(stline), sysfile); + if (stlen <= 0) { + return; + } - // Read a valid value? Sometimes we get garbage from sysfs... - if (stlen < 6 || stlen > 7) - { - printf(" ^fg(red)%sERROR ", title); - return; - } + /* + * Read a valid value? + * Sometimes we get garbage from sysfs... + */ + if (stlen < 6 || stlen > 7) { + printf(" ^fg(red)%sERROR ", title); + return; + } - fputs(" ^fg(#FF33FF)", stdout); - fputs(title, stdout); - fwrite(stline, 1, stlen - 4, stdout); - /* - fputs(".", stdout); - fwrite(&stline[stlen - 3], 1, 1, stdout); - */ - fputs("°C ", stdout); + fputs(" ^fg(#FF33FF)", stdout); + fputs(title, stdout); + fwrite(stline, 1, stlen - 4, stdout); + /* + fputs(".", stdout); + fwrite(&stline[stlen - 3], 1, 1, stdout); + */ + fputs("°C ", stdout); } |