46 lines
804 B
C
46 lines
804 B
C
/**
|
|
* Copyright (c) 2021 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#include "../utils/common.h"
|
|
#include "../utils/file.h"
|
|
#include "../utils/image.h"
|
|
#include "../utils/xml.h"
|
|
|
|
int main(int argc, char *argv[]) {
|
|
FILE *file;
|
|
char *in;
|
|
char *out;
|
|
char xmlBuffer[2048];
|
|
|
|
if(argc != 3) {
|
|
printf("Invalid number of arguments\n");
|
|
return 1;
|
|
}
|
|
|
|
// Set up strings
|
|
in = argv[1];
|
|
out = argv[2];
|
|
|
|
// Normalize slashes
|
|
fileNormalizeSlashes(in);
|
|
fileNormalizeSlashes(out);
|
|
|
|
|
|
// Read in XML file
|
|
file = fopen(in, "rb");
|
|
if(file == NULL) {
|
|
printf("Failed to open file!\n");
|
|
return 1;
|
|
}
|
|
assetReadString(file, xmlBuffer);
|
|
|
|
xmlnode_t node;
|
|
xmlParseElement(&node, xmlBuffer);
|
|
|
|
|
|
return 0;
|
|
} |