int
main (int argc, char** argv)
{
xml_g_set_prgname(argv[0]);
if (argc < 2)
{
g_printerr ("> %s filename [options]\n"
"\t the program reads a css file, scans for the\n"
"\t pcss conversion lines and spits out a list of \n"
"\t of these in an xml format\n"
"\t options: -hidden -empty\n",
g_get_prgname());
return 1;
} |
___ gchar *filename = 0;
const gchar *styleflag = "";
{ int i ; for (i=1; i < argc ; i++) {
if (argv[i][0] == '-') { styleflag = argv[i]; continue; } |
if (! filename) { filename = argv[i]; continue; } |
g_warning ("extra argument on commandline, ignored: %s", argv[i]);
} | } |
___ xml_GNode* node; GError* error = 0;
node = xml_tree_node_from_file (0, filename, &error);
if (error)
xml_g_show_error (&error, "after parsing file:\n\t'%s'", filename);
node = xml_pcss_preparse (node);
if (!strstr (styleflag, "-noparse"))
xml_pcss_parse (node);
if (!strstr (styleflag, "-noselectors"))
xml_pcss_tree_scan_selectors (node);
if (strstr (styleflag, "-list"))
xml_tree_dump_to_xml_file (node, 0,
1|xml_tree_dump_to_xml_flags (styleflag));
___ xml_GNode* tree = xml_pcss_prop_list_from (node);
xml_tree_dump_to_xml_file (tree, 0,
1|xml_tree_dump_to_xml_flags (styleflag));
____;
return 0;
____;____;
} |
|