aboutsummaryrefslogtreecommitdiff
path: root/someblocks.c
diff options
context:
space:
mode:
authorRaphael Robatsch <raphael-git@tapesoftware.net>2021-10-29 20:39:29 +0200
committerRaphael Robatsch <raphael-git@tapesoftware.net>2021-10-29 20:39:29 +0200
commitbf9cbfbf2ba34345f7d76d361a8f5da722a820b8 (patch)
tree9577c245954c3ac7106914a875a5082aa2b70350 /someblocks.c
parent968842909efb6fe34af62cc8936ce486eb86b3e5 (diff)
style: spaces -> tabs
Diffstat (limited to 'someblocks.c')
-rw-r--r--someblocks.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/someblocks.c b/someblocks.c
index 217043a..b4aa1c2 100644
--- a/someblocks.c
+++ b/someblocks.c
@@ -130,21 +130,21 @@ void psomebar()
{
if (!getstatus(statusstr[0], statusstr[1]))//Only write out if text has changed.
return;
- if (somebarFd < 0) {
- somebarFd = open(somebarPath, O_WRONLY|O_CLOEXEC);
- if (somebarFd < 0 && errno == ENOENT) {
- // assume somebar is not ready yet
- sleep(1);
- somebarFd = open(somebarPath, O_WRONLY|O_CLOEXEC);
- }
- if (somebarFd < 0) {
- perror("open");
- return;
- }
- }
- write(somebarFd, "status ", 7);
- write(somebarFd, statusstr[0], strlen(statusstr[0]));
- write(somebarFd, "\n", 1);
+ if (somebarFd < 0) {
+ somebarFd = open(somebarPath, O_WRONLY|O_CLOEXEC);
+ if (somebarFd < 0 && errno == ENOENT) {
+ // assume somebar is not ready yet
+ sleep(1);
+ somebarFd = open(somebarPath, O_WRONLY|O_CLOEXEC);
+ }
+ if (somebarFd < 0) {
+ perror("open");
+ return;
+ }
+ }
+ write(somebarFd, "status ", 7);
+ write(somebarFd, statusstr[0], strlen(statusstr[0]));
+ write(somebarFd, "\n", 1);
}
@@ -183,8 +183,8 @@ void termhandler()
void sigpipehandler()
{
- close(somebarFd);
- somebarFd = -1;
+ close(somebarFd);
+ somebarFd = -1;
}
int main(int argc, char** argv)
@@ -195,8 +195,8 @@ int main(int argc, char** argv)
else if (!strcmp("-p",argv[i]))
writestatus = pstdout;
}
- strcpy(somebarPath, getenv("XDG_RUNTIME_DIR"));
- strcat(somebarPath, "/somebar-0");
+ strcpy(somebarPath, getenv("XDG_RUNTIME_DIR"));
+ strcat(somebarPath, "/somebar-0");
delimLen = MIN(delimLen, strlen(delim));
delim[delimLen++] = '\0';
signal(SIGTERM, termhandler);