summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbhinav Prasai <abhinav.prsai@gmail.com>2025-08-24 23:56:07 +0100
committerAbhinav Prasai <abhinav.prsai@gmail.com>2025-08-24 23:56:07 +0100
commit4cae189cc6757cd6efd0f2edbe3b1aa7a95b78c8 (patch)
treeae56b239f3ba7bfd00916bee6478343ea9e4ed0e /src
parent517612fd2d9961b42152430575b4d608048e906b (diff)
change torun -> to_run in parser.c
Diffstat (limited to 'src')
-rw-r--r--src/parser.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/parser.c b/src/parser.c
index 32f9483..2fc4709 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -188,7 +188,7 @@ found:
char line[512];
int lineno = 0;
int should_floatn = 0;
- int torun = 0;
+ int to_run = 0;
/* Initialize should_float matrix */
for (int j = 0; j < 256; j++) {
@@ -429,7 +429,7 @@ found:
}
}
else if (!strcmp(key, "exec")) {
- if (torun >= 256) {
+ if (to_run >= 256) {
fprintf(stderr, "sxwmrc:%d: too many exec commands\n", lineno);
continue;
}
@@ -447,12 +447,12 @@ found:
continue;
}
- cfg->torun[torun] = strdup(cmd);
- if (!cfg->torun[torun]) {
+ cfg->to_run[to_run] = strdup(cmd);
+ if (!cfg->to_run[to_run]) {
fprintf(stderr, "sxwmrc:%d: failed to allocate memory for exec command\n", lineno);
goto cleanup_file;
}
- torun++;
+ to_run++;
}
else if (!strcmp(key, "can_swallow")) {
char *token = strtok(rest, ",");
@@ -615,8 +615,8 @@ cleanup_file:
free(cfg->open_in_workspace[j]);
}
}
- for (int i = 0; i < torun; i++) {
- free(cfg->torun[i]);
+ for (int i = 0; i < to_run; i++) {
+ free(cfg->to_run[i]);
}
return -1;
}