Fri, 04 Mar 2016 14:48:28 +0100
adjusted copyright info
universe@22 | 1 | /* |
universe@22 | 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
universe@22 | 3 | * |
universe@35 | 4 | * Copyright 2016 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 | |
olaf@24 | 50 | #define C2HTML_C 0 |
olaf@24 | 51 | #define C2HTML_JAVA 1 |
olaf@24 | 52 | |
universe@22 | 53 | typedef struct { |
universe@22 | 54 | char* outfilename; |
universe@22 | 55 | char* headerfile; |
universe@22 | 56 | char* footerfile; |
universe@22 | 57 | char* infilename; |
universe@22 | 58 | int highlight; |
olaf@24 | 59 | int showlinenumbers; |
universe@22 | 60 | } settings_t; |
universe@22 | 61 | |
universe@22 | 62 | typedef struct { |
universe@22 | 63 | size_t count; |
universe@22 | 64 | size_t capacity; |
universe@22 | 65 | size_t maxlinewidth; |
universe@22 | 66 | char** lines; |
universe@22 | 67 | } inputfile_t; |
universe@22 | 68 | |
olaf@24 | 69 | typedef size_t(*fmt_write_func)(const void*, size_t, size_t, void*); |
universe@22 | 70 | |
universe@22 | 71 | #ifdef __cplusplus |
universe@22 | 72 | } |
universe@22 | 73 | #endif |
universe@22 | 74 | |
universe@22 | 75 | #endif /* C2HTML_H */ |
universe@22 | 76 |