Commit ade667c5 authored by Stefan Pasteiner's avatar Stefan Pasteiner

added makefile and did som quirks on xsptt.c

parent 64585366
build: ./src/xsptt.c
mkdir -p build
gcc `xml2-config --cflags --libs` ./src/xsptt.c -o ./build/xsptt
clean:
rm -rf ./build
touch ./src/xsptt.c
......@@ -87,13 +87,18 @@ int main(int argc, char **argv)
Action_t action = {COPY_FILES, NULL, 0, 0};
char str_buffer[1024];
if (argc != 3)
if (argc != 4)
{
printf("ERROR: missing arguments.\n");
return(1);
}
if (strcmp(argv[1],"copy") != 0 )
{
printf("ERROR: unknown action");
}
action.dest = argv[2];
action.dest = argv[3];
/*
* this initialize the library and check potential ABI mismatches
......@@ -103,16 +108,16 @@ int main(int argc, char **argv)
LIBXML_TEST_VERSION
/*parse the file and get the DOM */
doc = xmlReadFile(argv[1], NULL, 0);
doc = xmlReadFile(argv[2], NULL, 0);
if (doc == NULL) {
printf("ERROR: could not parse file %s\n", argv[1]);
printf("ERROR: could not parse file %s\n", argv[2]);
return(1);
}
//TODO: make depedef System and ifdef's
strcpy(str_buffer, "mkdir \"");
strcat(str_buffer, argv[2]);
strcat(str_buffer, argv[3]);
strcat(str_buffer, "\"");
system(str_buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment