src/c2html.h

Thu, 23 Jan 2014 14:17:06 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 23 Jan 2014 14:17:06 +0100
changeset 22
f463693b5eeb
child 24
e43dee5892f4
permissions
-rw-r--r--

added command line parameters for header and footer file

universe@22 1 /*
universe@22 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@22 3 *
universe@22 4 * Copyright 2014 Mike Becker. All rights reserved.
universe@22 5 *
universe@22 6 * Redistribution and use in source and binary forms, with or without
universe@22 7 * modification, are permitted provided that the following conditions are met:
universe@22 8 *
universe@22 9 * 1. Redistributions of source code must retain the above copyright
universe@22 10 * notice, this list of conditions and the following disclaimer.
universe@22 11 *
universe@22 12 * 2. Redistributions in binary form must reproduce the above copyright
universe@22 13 * notice, this list of conditions and the following disclaimer in the
universe@22 14 * documentation and/or other materials provided with the distribution.
universe@22 15 *
universe@22 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@22 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@22 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
universe@22 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
universe@22 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
universe@22 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
universe@22 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
universe@22 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
universe@22 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
universe@22 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
universe@22 26 * POSSIBILITY OF SUCH DAMAGE.
universe@22 27 *
universe@22 28 */
universe@22 29
universe@22 30 #ifndef C2HTML_H
universe@22 31 #define C2HTML_H
universe@22 32
universe@22 33 #include <stdio.h>
universe@22 34 #include <stdlib.h>
universe@22 35 #include <string.h>
universe@22 36 #include <fcntl.h>
universe@22 37 #include <unistd.h>
universe@22 38 #include <ctype.h>
universe@22 39
universe@22 40 #include "javacodegen.h"
universe@22 41 #include "ccodegen.h"
universe@22 42
universe@22 43 #ifdef __cplusplus
universe@22 44 extern "C" {
universe@22 45 #endif
universe@22 46
universe@22 47
universe@22 48 #define INPUTBUF_SIZE 2048
universe@22 49
universe@22 50 typedef struct {
universe@22 51 char* outfilename;
universe@22 52 char* headerfile;
universe@22 53 char* footerfile;
universe@22 54 char* infilename;
universe@22 55 int highlight;
universe@22 56 } settings_t;
universe@22 57
universe@22 58 typedef struct {
universe@22 59 size_t count;
universe@22 60 size_t capacity;
universe@22 61 size_t maxlinewidth;
universe@22 62 char** lines;
universe@22 63 } inputfile_t;
universe@22 64
universe@22 65
universe@22 66 #ifdef __cplusplus
universe@22 67 }
universe@22 68 #endif
universe@22 69
universe@22 70 #endif /* C2HTML_H */
universe@22 71

mercurial