diff --git a/odf.c b/odf.c new file mode 100644 index 00000000..6ebe8ced --- /dev/null +++ b/odf.c @@ -0,0 +1,179 @@ +/********************************************************************** + + odf.c - Utility routines to enable ODF support in peg-multimarkdown. + (c) 2011 Fletcher T. Penney (http://fletcherpenney.net/). + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License or the MIT + license. See LICENSE for details. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + ***********************************************************************/ + + +void print_odf_header(GString *out){ + + /* Insert required XML header */ + g_string_append_printf(out, +"\n" \ +"\n"); + + /* Font Declarations */ + g_string_append_printf(out, "\n" \ + " \n" \ + "\n"); + + /* Append basic style information */ + g_string_append_printf(out, "\n" \ + "\n" \ + " \n" \ + " \n" \ + "\n" \ + " \n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + " \n" \ + "\n" \ + "\n"); + + /* Automatic style information */ + g_string_append_printf(out, "" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + "\n" \ + "\n" \ + " \n" \ + "\n" \ + "\n" \ + " \n" \ + "\n"); +} + +void print_odf_footer(GString *out) { + g_string_append_printf(out, "\n\n"); +} + diff --git a/odf.h b/odf.h new file mode 100644 index 00000000..fbfe6fe1 --- /dev/null +++ b/odf.h @@ -0,0 +1,3 @@ +#include +#include +#include