summaryrefslogtreecommitdiff
path: root/utils/newparser/newparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/newparser/newparser.c')
-rw-r--r--utils/newparser/newparser.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/utils/newparser/newparser.c b/utils/newparser/newparser.c
deleted file mode 100644
index f56fe6db84..0000000000
--- a/utils/newparser/newparser.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: tag_table.c 26346 2010-05-28 02:30:27Z jdgordon $
9 *
10 * Copyright (C) 2010 Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include <stdio.h>
23#include <stdlib.h>
24#include <stdbool.h>
25#include <string.h>
26#include <ctype.h>
27
28#include "skin_parser.h"
29#include "tag_table.h"
30#include "skin_structs.h"
31
32int handle_tree(struct skin *skin, struct skin_element* tree, struct line* line);
33void skin_render(struct skin_element* root);
34
35int main(int argc, char* argv[])
36{
37 char buffer[10*1024], temp[512];
38 FILE *in;
39 int filearg = 1, i=0;
40 if( (argc < 2) ||
41 strcmp(argv[1],"-h") == 0 ||
42 strcmp(argv[1],"--help") == 0 )
43 {
44 printf("Usage: %s infile \n", argv[0]);
45 return 0;
46 }
47
48 while ((argc > filearg) && argv[filearg][0] == '-')
49 {
50 i=1;
51 while (argv[filearg][i])
52 {
53 switch(argv[filearg][i])
54 {
55 }
56 i++;
57 }
58 filearg++;
59 }
60 if (argc == filearg)
61 {
62 printf("Missing input filename\n");
63 return 1;
64 }
65
66 in = fopen(argv[filearg], "r");
67 if (!in)
68 return 1;
69 while (fgets(temp, 512, in))
70 strcat(buffer, temp);
71 fclose(in);
72 filearg++;
73
74 struct skin_element* tree = skin_parse(buffer);
75 struct skin skin;
76 handle_tree(&skin, tree, NULL);
77 skin_render(tree);
78
79 skin_free_tree(tree);
80 return 0;
81}