aboutsummaryrefslogtreecommitdiff
path: root/tools/themes.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/themes.c')
-rw-r--r--tools/themes.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/tools/themes.c b/tools/themes.c
index 7866286..69145c3 100644
--- a/tools/themes.c
+++ b/tools/themes.c
@@ -59,54 +59,6 @@ error(char* name)
}
int
-scmp(char* a, char* b)
-{
- int i, l = slen(a);
- if(l != slen(b))
- return 0;
- for(i = 0; i < l; ++i)
- if(a[i] != b[i])
- return 0;
- return 1;
-}
-
-char*
-scat(char* dest, const char* src)
-{
- char* ptr = dest + slen(dest);
- while(*src != '\0')
- *ptr++ = *src++;
- *ptr = '\0';
- return dest;
-}
-
-int
-parse2(FILE* f)
-{
- int i, id = 0, next = 0;
- long theme[9];
- char line[BUFLEN], hexs[BUFLEN], comb[1024];
- char* ptr;
- while(fgets(line, BUFLEN, f)) {
- scat(comb, line);
- }
-
- for(i = 0; i < slen(comb); ++i) {
- if(comb[i] != '#')
- continue;
- printf("%s ", sstr(comb, hexs, i, 7));
- id++;
- }
-
- if(id != 9)
- return error("Invalid theme");
- for(i = 0; i < 9; ++i) {
- printf("%ld ", theme[i]);
- }
- return 1;
-}
-
-int
parse(FILE* f)
{
int i, id = 0;
@@ -139,5 +91,5 @@ main(int argc, char* argv[])
return error("Invalid input.\n");
} else
input = stdin;
- return parse2(input);
+ return parse(input);
} \ No newline at end of file