]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Update astyle
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 7 Jan 2019 23:30:45 +0000 (18:30 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 7 Jan 2019 23:30:45 +0000 (18:30 -0500)
25 files changed:
.astylerc
Sources/libMultiMarkdown/aho-corasick.c
Sources/libMultiMarkdown/aho-corasick.h
Sources/libMultiMarkdown/char.c
Sources/libMultiMarkdown/char_lookup.c
Sources/libMultiMarkdown/critic_markup.c
Sources/libMultiMarkdown/d_string.c
Sources/libMultiMarkdown/file.c
Sources/libMultiMarkdown/file.h
Sources/libMultiMarkdown/html.c
Sources/libMultiMarkdown/include/libMultiMarkdown.h
Sources/libMultiMarkdown/include/token.h
Sources/libMultiMarkdown/itmz-parser.c
Sources/libMultiMarkdown/itmz-reader.c
Sources/libMultiMarkdown/latex.c
Sources/libMultiMarkdown/mmd.c
Sources/libMultiMarkdown/mmd.h
Sources/libMultiMarkdown/object_pool.h
Sources/libMultiMarkdown/opendocument-content.c
Sources/libMultiMarkdown/opml-parser.c
Sources/libMultiMarkdown/opml-reader.c
Sources/libMultiMarkdown/rng.c
Sources/libMultiMarkdown/stack.h
Sources/libMultiMarkdown/writer.h
Sources/multimarkdown/main.c

index 4db6063f789f0fd5b6ea140004869f9911263da7..a234a42178396fe0dcd05fbb5b6a75bf9aacd2b9 100644 (file)
--- a/.astylerc
+++ b/.astylerc
@@ -21,7 +21,7 @@
 # Indent pre-processor directives
 --indent-preproc-block
 --indent-preproc-define
-#--indent-preproc-cond
+# --indent-preproc-cond
 
 
 # Line endings
 
 
 # Pointers/References
+--align-pointer=middle
 --align-reference=name
 
 
+# Line endings
+--lineend=linux
+
+
 # Excludes
 --exclude="Sources/libMultiMarkdown/scanners.c"
 --exclude="Sources/libMultiMarkdown/parser.c"
index 90cd8bcb6feed37f752b0fcfb4f422f74cff2ee2..772776bb5302ce9e274e612d95992b63bd69da64 100644 (file)
@@ -157,7 +157,7 @@ bool trie_insert(trie * a, const char * key, unsigned short match_type) {
 
 
 #ifdef TEST
-void Test_trie_insert(CuTest* tc) {
+void Test_trie_insert(CuTest * tc) {
        trie * a = trie_new(0);
 
        CuAssertIntEquals(tc, kTrieStartingSize, a->capacity);
@@ -227,7 +227,7 @@ unsigned short trie_search_match_type(trie * a, const char * query) {
 
 
 #ifdef TEST
-void Test_trie_search(CuTest* tc) {
+void Test_trie_search(CuTest * tc) {
        trie * a = trie_new(0);
 
        trie_insert(a, "foo", 42);
@@ -309,7 +309,7 @@ void ac_trie_prepare(trie * a) {
 
 
 #ifdef TEST
-void Test_trie_prepare(CuTest* tc) {
+void Test_trie_prepare(CuTest * tc) {
        trie * a = trie_new(0);
 
        trie_insert(a, "a", 1);
@@ -519,7 +519,7 @@ match * ac_trie_leftmost_longest_search(trie * a, const char * source, size_t st
 
 
 #ifdef TEST
-void Test_aho_trie_search(CuTest* tc) {
+void Test_aho_trie_search(CuTest * tc) {
        trie * a = trie_new(0);
 
        trie_insert(a, "foo", 42);
index fec780d4ae6b0003c51c2b4fd7d52872fcf15262..d41d0c82cb52e8ac976d54170d0c9568ebec7203 100644 (file)
@@ -73,7 +73,7 @@ struct trie {
        size_t                          size;                           // How many nodes are in use?
        size_t                          capacity;                       // How many nodes can we hold
 
-       trie_node *                     node;                           // Pointer to stack of nodes
+       trie_node       *               node;                           // Pointer to stack of nodes
 };
 
 typedef struct trie trie;
@@ -83,8 +83,8 @@ struct match {
        size_t                          start;                          // Starting offset for this match
        size_t                          len;                            // Length for this match
        unsigned short          match_type;                     // Match type
-       struct match *          next;                           // Pointer to next match in list
-       struct match *          prev;                           // Pointer to previous match in list
+       struct match    *       next;                           // Pointer to next match in list
+       struct match    *       prev;                           // Pointer to previous match in list
 };
 
 typedef struct match match;
index 902768aac85040d1f413e903d639753908ea9c75..286cf6f471ae1641a7d4c8572568967a31c40995 100644 (file)
@@ -111,7 +111,7 @@ int char_is_windows_line_ending(char * c) {
 }
 
 #ifdef TEST
-void Test_char_is_windows_line_ending(CuTest* tc) {
+void Test_char_is_windows_line_ending(CuTest * tc) {
        char * test = "\r\n\n";
 
        CuAssertIntEquals(tc, 1, char_is_windows_line_ending(&test[0]));
index dc9604410e4ed04f365cba9a339f896b5600e89c..952954485ce0907fdc1da159a4c9161995fbb1f2 100644 (file)
@@ -67,7 +67,7 @@
 
 #define USE_EXTENDED_ASCII_disabled 1
 
-int main( int argc, char** argv ) {
+int main( int argc, char ** argv ) {
        unsigned char table[256] = {0};
 
        // Define punctuation
index 3f14be1bf7a55015ac448eb985d56d9b52799833..162aa12e984dcdd8a0227d8c70596da3395134d6 100644 (file)
@@ -346,7 +346,7 @@ void mmd_critic_markup_reject(DString * d) {
 
 
 #ifdef TEST
-void Test_critic(CuTest* tc) {
+void Test_critic(CuTest * tc) {
 #ifdef kUseObjectPool
        token_pool_init();
 #endif
index efbcc95af963c6708f5fba074fa522978d267831..941be7f8f344745a5ca77f94dd704d86a1cdf69d 100644 (file)
 // Some operating systems do not supply vasprintf() -- standardize on this
 // replacement from:
 //             https://github.com/esp8266/Arduino/issues/1954
-int vasprintf(char** strp, const char* fmt, va_list ap) {
+int vasprintf(char ** strp, const char * fmt, va_list ap) {
        va_list ap2;
        va_copy(ap2, ap);
 
 #if (defined(_WIN32) || defined(__WIN32__))
-       char *tmp = NULL;
+       char * tmp = NULL;
        int size = vsnprintf(tmp, 0, fmt, ap2);
 #else
        char tmp[1];
@@ -103,7 +103,7 @@ int vasprintf(char** strp, const char* fmt, va_list ap) {
 
        va_end(ap2);
        size += 1;
-       *strp = (char*)malloc(size * sizeof(char));
+       *strp = (char *)malloc(size * sizeof(char));
        return vsnprintf(*strp, size, fmt, ap);
 }
 
@@ -116,8 +116,8 @@ int vasprintf(char** strp, const char* fmt, va_list ap) {
 
 
 /// Create a new dynamic string
-DString* d_string_new(const char * startingString) {
-       DString* newString = malloc(sizeof(DString));
+DString * d_string_new(const char * startingString) {
+       DString * newString = malloc(sizeof(DString));
 
        if (!newString) {
                return NULL;
@@ -151,7 +151,7 @@ DString* d_string_new(const char * startingString) {
 
 
 #ifdef TEST
-void Test_d_string_new(CuTest* tc) {
+void Test_d_string_new(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -176,12 +176,12 @@ void Test_d_string_new(CuTest* tc) {
 
 
 /// Free dynamic string
-char* d_string_free(DString * ripString, bool freeCharacterData) {
+char * d_string_free(DString * ripString, bool freeCharacterData) {
        if (ripString == NULL) {
                return NULL;
        }
 
-       char* returnedString = ripString->str;
+       char * returnedString = ripString->str;
 
        if (freeCharacterData) {
                if (ripString->str != NULL) {
@@ -213,7 +213,7 @@ static void ensureStringBufferCanHold(DString * baseString, size_t newStringSize
                                }
                        }
 
-                       char *temp;
+                       char * temp;
                        temp = realloc(baseString->str, newBufferSize);
 
                        if (temp == NULL) {
@@ -231,7 +231,7 @@ static void ensureStringBufferCanHold(DString * baseString, size_t newStringSize
 
 
 #ifdef TEST
-void Test_ensureStringBufferCanHold(CuTest* tc) {
+void Test_ensureStringBufferCanHold(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -277,7 +277,7 @@ void d_string_append(DString * baseString, const char * appendedString) {
 
 
 #ifdef TEST
-void Test_d_string_append(CuTest* tc) {
+void Test_d_string_append(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -312,7 +312,7 @@ void d_string_append_c(DString * baseString, char appendedCharacter) {
 
 
 #ifdef TEST
-void Test_d_string_append_c(CuTest* tc) {
+void Test_d_string_append_c(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -343,7 +343,7 @@ void d_string_append_c_array(DString * baseString, const char * appendedChars, s
                                size_t newSizeNeeded = baseString->currentStringLength + bytes;
                                ensureStringBufferCanHold(baseString, newSizeNeeded);
 
-                               memcpy((void*)baseString->str + baseString->currentStringLength, appendedChars, bytes);
+                               memcpy((void *)baseString->str + baseString->currentStringLength, appendedChars, bytes);
 
                                baseString->currentStringLength = newSizeNeeded;
                                baseString->str[newSizeNeeded] = '\0';
@@ -354,7 +354,7 @@ void d_string_append_c_array(DString * baseString, const char * appendedChars, s
 
 
 #ifdef TEST
-void Test_d_string_append_c_array(CuTest* tc) {
+void Test_d_string_append_c_array(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -388,7 +388,7 @@ void d_string_append_printf(DString * baseString, const char * format, ...) {
                va_list args;
                va_start(args, format);
 
-               char* formattedString = NULL;
+               char * formattedString = NULL;
                vasprintf(&formattedString, format, args);
 
                if (formattedString != NULL) {
@@ -402,7 +402,7 @@ void d_string_append_printf(DString * baseString, const char * format, ...) {
 
 
 #ifdef TEST
-void Test_d_string_append_printf(CuTest* tc) {
+void Test_d_string_append_printf(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -445,7 +445,7 @@ void d_string_prepend(DString * baseString, const char * prependedString) {
 
 
 #ifdef TEST
-void Test_d_string_prepend(CuTest* tc) {
+void Test_d_string_prepend(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -489,7 +489,7 @@ void d_string_insert(DString * baseString, size_t pos, const char * insertedStri
 
 
 #ifdef TEST
-void Test_d_string_insert(CuTest* tc) {
+void Test_d_string_insert(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -534,7 +534,7 @@ void d_string_insert_c(DString * baseString, size_t pos, char insertedCharacter)
 
 
 #ifdef TEST
-void Test_d_string_insert_c(CuTest* tc) {
+void Test_d_string_insert_c(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -583,7 +583,7 @@ void d_string_insert_c_array(DString * baseString, size_t pos, const char * inse
 
 
 #ifdef TEST
-void Test_d_string_insert_c_array(CuTest* tc) {
+void Test_d_string_insert_c_array(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -613,7 +613,7 @@ void d_string_insert_printf(DString * baseString, size_t pos, const char * forma
                va_list args;
                va_start(args, format);
 
-               char* formattedString = NULL;
+               char * formattedString = NULL;
                vasprintf(&formattedString, format, args);
 
                if (formattedString != NULL) {
@@ -627,7 +627,7 @@ void d_string_insert_printf(DString * baseString, size_t pos, const char * forma
 
 
 #ifdef TEST
-void Test_d_string_insert_printf(CuTest* tc) {
+void Test_d_string_insert_printf(CuTest * tc) {
        char * test = "foo";
 
        DString * result = d_string_new(test);
@@ -671,7 +671,7 @@ void d_string_erase(DString * baseString, size_t pos, size_t len) {
 
 
 #ifdef TEST
-void Test_d_string_erase(CuTest* tc) {
+void Test_d_string_erase(CuTest * tc) {
        char * test = "foobar";
 
        DString * result = d_string_new(test);
@@ -727,7 +727,7 @@ char * d_string_copy_substring(DString * d, size_t start, size_t len) {
 
 
 #ifdef TEST
-void Test_d_string_copy_substring(CuTest* tc) {
+void Test_d_string_copy_substring(CuTest * tc) {
        char * test = "foobar";
 
        DString * result = d_string_new(test);
@@ -803,7 +803,7 @@ long d_string_replace_text_in_range(DString * d, size_t pos, size_t len, const c
 
 
 #ifdef TEST
-void Test_d_string_replace_text_in_range(CuTest* tc) {
+void Test_d_string_replace_text_in_range(CuTest * tc) {
        char * test = "foobarfoobarfoo";
        long delta = 0;
 
index 59dc736df22101abaddc63fd428405a5aa19fafa..65de2d1e46711884e2003b842bb5494c80123c79 100644 (file)
@@ -191,7 +191,7 @@ bool is_separator(char c) {
 
 
 #ifdef TEST
-void Test_is_separator(CuTest* tc) {
+void Test_is_separator(CuTest * tc) {
        char * test = "a/\\";
 
 #if defined(__WIN32)
@@ -301,7 +301,7 @@ char * path_from_dir_base(const char * dir, const char * base) {
 
 
 #ifdef TEST
-void Test_path_from_dir_base(CuTest* tc) {
+void Test_path_from_dir_base(CuTest * tc) {
        char dir[10] = "/foo";
        char base[10] = "bar";
 
@@ -359,7 +359,7 @@ void split_path_file(char ** dir, char ** file, const char * path) {
 
 
 #ifdef TEST
-void Test_split_path_file(CuTest* tc) {
+void Test_split_path_file(CuTest * tc) {
        char * dir, * file;
 
        char * path = "/foo/bar.txt";
@@ -388,15 +388,15 @@ void Test_split_path_file(CuTest* tc) {
 // Let compiler know where to find GetFullPathName()
 #include <windows.h>
 
-char *realpath(const char *path, char *resolved_path) {
+char * realpath(const char * path, char * resolved_path) {
        DWORD  retval = 0;
        DWORD  dwBufSize = 0; // Just in case MAX_PATH differs from PATH_MAX
-       TCHAR  *buffer = NULL;
+       TCHAR buffer = NULL;
 
        if (resolved_path == NULL) {
                // realpath allocates appropiate bytes if resolved_path is null. This is to mimic realpath behavior
                dwBufSize = PATH_MAX; // Use windows PATH_MAX constant, because we are in Windows context now.
-               buffer = (char*)malloc(dwBufSize);
+               buffer = (char *)malloc(dwBufSize);
 
                if (buffer == NULL) {
                        return NULL; // some really weird is going on...
index 1cc351e95f50e455ea1826e3f22eb690019e37c2..2fdff1d716dd5b36d673193710e753f03eb4a476 100644 (file)
@@ -147,7 +147,7 @@ char * absolute_path_for_argument(const char * arg);
 
 #if (defined(_WIN32) || defined(__WIN32__))
        // Windows does not know realpath(), so we need a "windows port"
-       char *realpath(const char *path, char *resolved_path);
+       char * realpath(const char * path, char * resolved_path);
 #endif
 
 #endif
index 8f9359cd2613a307036f6c1a5b086c9d3840e0f0..1bc97e1843af7175a12a0ff7c2f31a88bd05e274 100644 (file)
@@ -259,8 +259,8 @@ void mmd_print_localized_char_html(DString * out, unsigned short type, scratch_p
 }
 
 
-static char * strip_dimension_units(char *original) {
-       char *result;
+static char * strip_dimension_units(char * original) {
+       char * result;
        int i;
 
        result = my_strdup(original);
index 3e63c9ad1ebec4c5ded2e898bccfa3949ae647ca..44f9f30073f4ee2adc3f7d57221b0b1c66e6566a 100644 (file)
@@ -211,7 +211,7 @@ struct stack * mmd_d_string_transclusion_manifest(DString * source, const char *
 
 /// Create MMD Engine using an existing DString (A new copy is *not* made)
 mmd_engine * mmd_engine_create_with_dstring(
-       DString *               d,
+       DString         *       d,
        unsigned long   extensions
 );
 
@@ -262,11 +262,11 @@ void mmd_engine_convert_to_file(mmd_engine * e, short format, const char * direc
 
 
 /// Convert OPML to text without modifying original engine source
-DString  mmd_engine_convert_opml_to_text(mmd_engine * e);
+DString  * mmd_engine_convert_opml_to_text(mmd_engine * e);
 
 
 /// Convert ITMZ to text without modifying original engine source
-DString  mmd_engine_convert_itmz_to_text(mmd_engine * e);
+DString  * mmd_engine_convert_itmz_to_text(mmd_engine * e);
 
 
 /// Convert MMD text to specified format using DString as a container for block of data
index e8a80c0bae7c52027769a2fab302454631482cc6..d1859c748621bf570d5f96e99897c97602e551b6 100644 (file)
@@ -85,13 +85,13 @@ struct token {
        size_t                          start;                  //!< Starting offset in the source string
        size_t                          len;                    //!< Length of the token in the source string
 
-       struct token *          next;                   //!< Pointer to next token in the chain
-       struct token *          prev;                   //!< Pointer to previous marker in the chain
-       struct token *          child;                  //!< Pointer to child chain
+       struct token    *       next;                   //!< Pointer to next token in the chain
+       struct token    *       prev;                   //!< Pointer to previous marker in the chain
+       struct token    *       child;                  //!< Pointer to child chain
 
-       struct token *          tail;                   //!< Pointer to last token in the chain
+       struct token    *       tail;                   //!< Pointer to last token in the chain
 
-       struct token *          mate;                   //!< Pointer to other token in matched pair
+       struct token    *       mate;                   //!< Pointer to other token in matched pair
 };
 
 typedef struct token token;
index 8533b4f45ffacecc1f36181d9774dd42101b9131..c766134e14d0259e042ff830da486c786094a70c 100644 (file)
@@ -274,7 +274,7 @@ typedef struct yyStackEntry yyStackEntry;
 /* The state of the parser is completely contained in an instance of
 ** the following structure */
 struct yyParser {
-       yyStackEntry *yytos;          /* Pointer to top element of the stack */
+       yyStackEntry * yytos;         /* Pointer to top element of the stack */
 #ifdef YYTRACKMAXSTACKDEPTH
        int yyhwm;                    /* High-water mark of the stack */
 #endif
@@ -284,7 +284,7 @@ struct yyParser {
        ITMZARG_SDECL                /* A place to hold %extra_argument */
 #if YYSTACKDEPTH<=0
        int yystksz;                  /* Current side of the stack */
-       yyStackEntry *yystack;        /* The parser's stack */
+       yyStackEntry * yystack;       /* The parser's stack */
        yyStackEntry yystk0;          /* First stack entry */
 #else
        yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
@@ -294,8 +294,8 @@ typedef struct yyParser yyParser;
 
 #ifndef NDEBUG
        #include <stdio.h>
-       static FILE *yyTraceFILE = 0;
-       static char *yyTracePrompt = 0;
+       static FILE * yyTraceFILE = 0;
+       static char * yyTracePrompt = 0;
 #endif /* NDEBUG */
 
 #ifndef NDEBUG
@@ -316,7 +316,7 @@ typedef struct yyParser yyParser;
 ** Outputs:
 ** None.
 */
-void ITMZTrace(FILE *TraceFILE, char *zTracePrompt) {
+void ITMZTrace(FILE * TraceFILE, char * zTracePrompt) {
        yyTraceFILE = TraceFILE;
        yyTracePrompt = zTracePrompt;
 
@@ -331,7 +331,7 @@ void ITMZTrace(FILE *TraceFILE, char *zTracePrompt) {
 #ifndef NDEBUG
 /* For tracing shifts, the names of all terminals and nonterminals
 ** are required.  The following table supplies these names */
-static const char *const yyTokenName[] = {
+static const char * const yyTokenName[] = {
        "$",             "ITMZ_ITHOUGHTS_OPEN",  "ITMZ_ITHOUGHTS_CLOSE",  "ITMZ_TOPICS_OPEN",
        "ITMZ_TOPICS_CLOSE",  "ITMZ_TOPIC_OPEN",  "ITMZ_TOPIC_CLOSE",  "ITMZ_TOPIC_PREAMBLE",
        "ITMZ_TOPIC_METADATA",  "ITMZ_TOPIC_SELF_CLOSE",  "ITMZ_RELATIONSHIPS_OPEN",  "ITMZ_RELATIONSHIPS_CLOSE",
@@ -343,7 +343,7 @@ static const char *const yyTokenName[] = {
 #ifndef NDEBUG
 /* For tracing reduce actions, the names of all rules are required.
 */
-static const char *const yyRuleName[] = {
+static const char * const yyRuleName[] = {
        /*   0 */ "doc ::= doc_ithoughts",
        /*   1 */ "doc_ithoughts ::= ITMZ_ITHOUGHTS_OPEN itmz_topics_section itmz_relationships ITMZ_ITHOUGHTS_CLOSE",
        /*   2 */ "doc_ithoughts ::= ITMZ_ITHOUGHTS_OPEN itmz_relationships ITMZ_ITHOUGHTS_CLOSE",
@@ -369,10 +369,10 @@ static const char *const yyRuleName[] = {
 ** Try to increase the size of the parser stack.  Return the number
 ** of errors.  Return 0 on success.
 */
-static int yyGrowStack(yyParser *p) {
+static int yyGrowStack(yyParser * p) {
        int newSize;
        int idx;
-       yyStackEntry *pNew;
+       yyStackEntry * pNew;
 
        newSize = p->yystksz * 2 + 100;
        idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
@@ -426,9 +426,9 @@ static int yyGrowStack(yyParser *p) {
 ** A pointer to a parser.  This pointer is used in subsequent calls
 ** to ITMZ and ITMZFree.
 */
-void *ITMZAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)) {
-       yyParser *pParser;
-       pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
+void * ITMZAlloc(void * (*mallocProc)(YYMALLOCARGTYPE)) {
+       yyParser * pParser;
+       pParser = (yyParser *)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
 
        if ( pParser ) {
 #ifdef YYTRACKMAXSTACKDEPTH
@@ -464,9 +464,9 @@ void *ITMZAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)) {
 ** directives of the input grammar.
 */
 static void yy_destructor(
-       yyParser *yypParser,    /* The parser */
+       yyParser * yypParser,   /* The parser */
        YYCODETYPE yymajor,     /* Type code for object to destroy */
-       YYMINORTYPE *yypminor   /* The object to be destroyed */
+       YYMINORTYPE * yypminor  /* The object to be destroyed */
 ) {
        ITMZARG_FETCH;
 
@@ -494,8 +494,8 @@ static void yy_destructor(
 ** If there is a destructor routine associated with the token which
 ** is popped from the stack, then call it.
 */
-static void yy_pop_parser_stack(yyParser *pParser) {
-       yyStackEntry *yytos;
+static void yy_pop_parser_stack(yyParser * pParser) {
+       yyStackEntry * yytos;
        assert( pParser->yytos != 0 );
        assert( pParser->yytos > pParser->yystack );
        yytos = pParser->yytos--;
@@ -520,10 +520,10 @@ static void yy_pop_parser_stack(yyParser *pParser) {
 ** assumed that the input pointer is never NULL.
 */
 void ITMZFree(
-       void *p,                    /* The parser to be deleted */
-       void (*freeProc)(void*)     /* Function used to reclaim memory */
+       void * p,                   /* The parser to be deleted */
+       void (*freeProc)(void *)    /* Function used to reclaim memory */
 ) {
-       yyParser *pParser = (yyParser*)p;
+       yyParser * pParser = (yyParser *)p;
 #ifndef YYPARSEFREENEVERNULL
 
        if ( pParser == 0 ) {
@@ -543,15 +543,15 @@ void ITMZFree(
        }
 
 #endif
-       (*freeProc)((void*)pParser);
+       (*freeProc)((void *)pParser);
 }
 
 /*
 ** Return the peak depth of the stack for a parser.
 */
 #ifdef YYTRACKMAXSTACKDEPTH
-int ITMZStackPeak(void *p) {
-       yyParser *pParser = (yyParser*)p;
+int ITMZStackPeak(void * p) {
+       yyParser * pParser = (yyParser *)p;
        return pParser->yyhwm;
 }
 #endif
@@ -561,7 +561,7 @@ int ITMZStackPeak(void *p) {
 ** look-ahead token iLookAhead.
 */
 static unsigned int yy_find_shift_action(
-       yyParser *pParser,        /* The parser */
+       yyParser * pParser,       /* The parser */
        YYCODETYPE iLookAhead     /* The look-ahead token */
 ) {
        int i;
@@ -669,7 +669,7 @@ static int yy_find_reduce_action(
 /*
 ** The following routine is called if the stack overflows.
 */
-static void yyStackOverflow(yyParser *yypParser) {
+static void yyStackOverflow(yyParser * yypParser) {
        ITMZARG_FETCH;
        yypParser->yytos--;
 #ifndef NDEBUG
@@ -695,7 +695,7 @@ static void yyStackOverflow(yyParser *yypParser) {
 ** Print tracing information for a SHIFT action
 */
 #ifndef NDEBUG
-static void yyTraceShift(yyParser *yypParser, int yyNewState) {
+static void yyTraceShift(yyParser * yypParser, int yyNewState) {
        if ( yyTraceFILE ) {
                if ( yyNewState < YYNSTATE ) {
                        fprintf(yyTraceFILE, "%sShift '%s', go to state %d\n",
@@ -715,12 +715,12 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState) {
 ** Perform a shift action.
 */
 static void yy_shift(
-       yyParser *yypParser,          /* The parser to be shifted */
+       yyParser * yypParser,         /* The parser to be shifted */
        int yyNewState,               /* The new state to shift in */
        int yyMajor,                  /* The major token to shift in */
        ITMZTOKENTYPE yyMinor        /* The minor token to shift in */
 ) {
-       yyStackEntry *yytos;
+       yyStackEntry * yytos;
        yypParser->yytos++;
 #ifdef YYTRACKMAXSTACKDEPTH
 
@@ -784,19 +784,19 @@ static const struct {
        { 16, 0 },
 };
 
-static void yy_accept(yyParser*);  /* Forward Declaration */
+static void yy_accept(yyParser *); /* Forward Declaration */
 
 /*
 ** Perform a reduce action and the shift that must immediately
 ** follow the reduce.
 */
 static void yy_reduce(
-       yyParser *yypParser,         /* The parser */
+       yyParser * yypParser,        /* The parser */
        unsigned int yyruleno        /* Number of the rule by which to reduce */
 ) {
        int yygoto;                     /* The next state */
        int yyact;                      /* The next action */
-       yyStackEntry *yymsp;            /* The top of the parser's stack */
+       yyStackEntry * yymsp;           /* The top of the parser's stack */
        int yysize;                     /* Amount to pop the stack */
        ITMZARG_FETCH;
        yymsp = yypParser->yytos;
@@ -909,7 +909,7 @@ static void yy_reduce(
 */
 #ifndef YYNOERRORRECOVERY
 static void yy_parse_failed(
-       yyParser *yypParser           /* The parser */
+       yyParser * yypParser          /* The parser */
 ) {
        ITMZARG_FETCH;
 #ifndef NDEBUG
@@ -938,7 +938,7 @@ static void yy_parse_failed(
 ** The following code executes when a syntax error first occurs.
 */
 static void yy_syntax_error(
-       yyParser *yypParser,           /* The parser */
+       yyParser * yypParser,          /* The parser */
        int yymajor,                   /* The major type of the error token */
        ITMZTOKENTYPE yyminor         /* The minor type of the error token */
 ) {
@@ -968,7 +968,7 @@ static void yy_syntax_error(
 ** The following is executed when the parser accepts
 */
 static void yy_accept(
-       yyParser *yypParser           /* The parser */
+       yyParser * yypParser          /* The parser */
 ) {
        ITMZARG_FETCH;
 #ifndef NDEBUG
@@ -1011,7 +1011,7 @@ static void yy_accept(
 ** None.
 */
 void ITMZ(
-       void *yyp,                   /* The parser */
+       void * yyp,                  /* The parser */
        int yymajor,                 /* The major token code number */
        ITMZTOKENTYPE yyminor       /* The value for the token */
        ITMZARG_PDECL               /* Optional %extra_argument parameter */
@@ -1024,9 +1024,9 @@ void ITMZ(
 #ifdef YYERRORSYMBOL
        int yyerrorhit = 0;   /* True if yymajor has invoked an error */
 #endif
-       yyParser *yypParser;  /* The parser */
+       yyParser * yypParser; /* The parser */
 
-       yypParser = (yyParser*)yyp;
+       yypParser = (yyParser *)yyp;
        assert( yypParser->yytos != 0 );
 #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
        yyendofinput = (yymajor == 0);
@@ -1172,7 +1172,7 @@ void ITMZ(
 #ifndef NDEBUG
 
        if ( yyTraceFILE ) {
-               yyStackEntry *i;
+               yyStackEntry * i;
                char cDiv = '[';
                fprintf(yyTraceFILE, "%sReturn. Stack=", yyTracePrompt);
 
index 8ac08d6c788fef54a2835d2cbd9c83085c38940b..b3160ad604bfe4a6deddc6320eb02664108fe3fa 100644 (file)
 void * ITMZAlloc(void *);
 void ITMZ(void *, int, void *, void *);
 void ITMZFree(void *, void *);
-void ITMZTrace(FILE *stream, char *zPrefix);
+void ITMZTrace(FILE * stream, char * zPrefix);
 
 
 #define print(x) d_string_append(out, x)
@@ -192,7 +192,7 @@ token * tokenize_itmz_string(mmd_engine * e, size_t start, size_t len) {
 
 void parse_itmz_token_chain(mmd_engine * e, token * chain) {
 
-       void* pParser = ITMZAlloc (malloc);             // Create a parser (for lemon)
+       void * pParser = ITMZAlloc (malloc);            // Create a parser (for lemon)
        token * walker = chain->next;                           // Walk the existing tree
        token * remainder;                                                      // Hold unparsed tail of chain
 
index 7dc213e7d9f61baab7f98ddb9e9fea5fd3b6de71..936b79f29220b440b8e1915b57db275ec22cef81 100644 (file)
@@ -310,8 +310,8 @@ void mmd_export_link_latex(DString * out, const char * source, token * text, lin
 }
 
 
-static char * correct_dimension_units(char *original) {
-       char *result;
+static char * correct_dimension_units(char * original) {
+       char * result;
        int i;
 
        result = my_strdup(original);
index 6c39c6bdbafb50c5446f991cd95cab7dd3d5e583..0f4c63fd58502bdc7eee126fbf3ce90325b0ce6f 100644 (file)
@@ -82,7 +82,7 @@
 void * ParseAlloc(void *);
 void Parse(void *, int, void *, void *);
 void ParseFree(void *, void *);
-void ParseTrace(FILE *stream, char *zPrefix);
+void ParseTrace(FILE * stream, char * zPrefix);
 
 void mmd_pair_tokens_in_block(token * block, token_pair_engine * e, stack * s);
 
@@ -1137,7 +1137,7 @@ void mmd_parse_token_chain(mmd_engine * e, token * chain) {
 
        e->recurse_depth++;
 
-       void* pParser = ParseAlloc (malloc);            // Create a parser (for lemon)
+       void * pParser = ParseAlloc (malloc);           // Create a parser (for lemon)
        token * walker = chain->child;                          // Walk the existing tree
        token * remainder;                                                      // Hold unparsed tail of chain
 
@@ -2883,7 +2883,7 @@ DString * mmd_d_string_convert_opml_to_text(DString * source) {
 
 
 /// Convert OPML to text without modifying original engine source
-DString  mmd_engine_convert_opml_to_text(mmd_engine * e) {
+DString  * mmd_engine_convert_opml_to_text(mmd_engine * e) {
        DString * original = d_string_new("");
        d_string_append_c_array(original, e->dstr->str, e->dstr->currentStringLength);
 
@@ -2932,7 +2932,7 @@ DString * mmd_d_string_convert_itmz_to_text(DString * source) {
 
 
 /// Convert ITMZ to text without modifying original engine source
-DString  mmd_engine_convert_itmz_to_text(mmd_engine * e) {
+DString  * mmd_engine_convert_itmz_to_text(mmd_engine * e) {
        DString * original = d_string_new("");
        d_string_append_c_array(original, e->dstr->str, e->dstr->currentStringLength);
 
index 2f3622a08a58bc20fd57a415abd44a619a14a85e..026b17f1817fc40af547de0d56d4de71011a3cb4 100644 (file)
 
 
 struct mmd_engine {
-       DString *                               dstr;
-       token *                                 root;
+       DString                 *               dstr;
+       token           *                       root;
        unsigned long                   extensions;
        unsigned short                  recurse_depth;
 
        bool                                    allow_meta;
 
-       token_pair_engine *             pairings1;
-       token_pair_engine *             pairings2;
-       token_pair_engine *             pairings3;
-       token_pair_engine *             pairings4;
-
-       stack *                                 abbreviation_stack;
-       stack *                                 citation_stack;
-       stack *                                 definition_stack;
-       stack *                                 footnote_stack;
-       stack *                                 glossary_stack;
-       stack *                                 header_stack;
-       stack *                                 link_stack;
-       stack *                                 metadata_stack;
-       stack *                                 table_stack;
+       token_pair_engine       *       pairings1;
+       token_pair_engine       *       pairings2;
+       token_pair_engine       *       pairings3;
+       token_pair_engine       *       pairings4;
+
+       stack           *                       abbreviation_stack;
+       stack           *                       citation_stack;
+       stack           *                       definition_stack;
+       stack           *                       footnote_stack;
+       stack           *                       glossary_stack;
+       stack           *                       header_stack;
+       stack           *                       link_stack;
+       stack           *                       metadata_stack;
+       stack           *                       table_stack;
 
        short                                   language;
        short                                   quotes_lang;
 
-       struct asset *                  asset_hash;
+       struct asset    *               asset_hash;
 
        int                                             random_seed_base_labels;
 };
@@ -111,8 +111,8 @@ void is_list_loose(token * list);
 
 
 struct asset {
-       char *                          url;
-       char *                          asset_path;
+       char            *               url;
+       char            *               asset_path;
        UT_hash_handle          hh;
 };
 
index ba0c133eea92d1d1a9445022d1ba924154f8d7fd..3716940bb1f253492c0c45401b18e05aeb44bb3a 100644 (file)
@@ -63,9 +63,9 @@
 
 /// Structure for an object allocator pool
 struct pool {
-       stack *                 allocated;              //!< Stack of pointers to slabs that have been allocated
-       void *                  next;                   //!< Pointer to next available memory for allocation
-       void *                  last;                   //!< Pointer to end of available memory
+       stack   *               allocated;              //!< Stack of pointers to slabs that have been allocated
+       void    *               next;                   //!< Pointer to next available memory for allocation
+       void    *               last;                   //!< Pointer to end of available memory
        short                   object_size;    //!< Size of individual objects to be allocated
 
        char                    _PADDING[6];    //!< pad struct for alignment
index 4110849bd409ae564d583faa4e381ef98bb78a4a..ba0dd6826df83e49f26a767ddd2cda002456b2c5 100644 (file)
@@ -546,8 +546,8 @@ void mmd_export_link_opendocument(DString * out, const char * source, token * te
 }
 
 
-static char * correct_dimension_units(char *original) {
-       char *result;
+static char * correct_dimension_units(char * original) {
+       char * result;
        int i;
 
        result = my_strdup(original);
index 410b6d141e000f5550725bfab65623727410ac8b..88bc73572fab9580afa1f72fbe869de090a5d10e 100644 (file)
@@ -273,7 +273,7 @@ typedef struct yyStackEntry yyStackEntry;
 /* The state of the parser is completely contained in an instance of
 ** the following structure */
 struct yyParser {
-       yyStackEntry *yytos;          /* Pointer to top element of the stack */
+       yyStackEntry * yytos;         /* Pointer to top element of the stack */
 #ifdef YYTRACKMAXSTACKDEPTH
        int yyhwm;                    /* High-water mark of the stack */
 #endif
@@ -283,7 +283,7 @@ struct yyParser {
        OPMLARG_SDECL                /* A place to hold %extra_argument */
 #if YYSTACKDEPTH<=0
        int yystksz;                  /* Current side of the stack */
-       yyStackEntry *yystack;        /* The parser's stack */
+       yyStackEntry * yystack;       /* The parser's stack */
        yyStackEntry yystk0;          /* First stack entry */
 #else
        yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
@@ -293,8 +293,8 @@ typedef struct yyParser yyParser;
 
 #ifndef NDEBUG
        #include <stdio.h>
-       static FILE *yyTraceFILE = 0;
-       static char *yyTracePrompt = 0;
+       static FILE * yyTraceFILE = 0;
+       static char * yyTracePrompt = 0;
 #endif /* NDEBUG */
 
 #ifndef NDEBUG
@@ -315,7 +315,7 @@ typedef struct yyParser yyParser;
 ** Outputs:
 ** None.
 */
-void OPMLTrace(FILE *TraceFILE, char *zTracePrompt) {
+void OPMLTrace(FILE * TraceFILE, char * zTracePrompt) {
        yyTraceFILE = TraceFILE;
        yyTracePrompt = zTracePrompt;
 
@@ -330,7 +330,7 @@ void OPMLTrace(FILE *TraceFILE, char *zTracePrompt) {
 #ifndef NDEBUG
 /* For tracing shifts, the names of all terminals and nonterminals
 ** are required.  The following table supplies these names */
-static const char *const yyTokenName[] = {
+static const char * const yyTokenName[] = {
        "$",             "OPML_XML",      "OPML_WSNL",     "OPML_OPML_OPEN",
        "OPML_OPML_CLOSE",  "OPML_HEAD_OPEN",  "OPML_HEAD_CLOSE",  "OPML_TITLE_OPEN",
        "OPML_TITLE_CLOSE",  "OPML_BODY_OPEN",  "OPML_BODY_CLOSE",  "OPML_OUTLINE_OPEN",
@@ -344,7 +344,7 @@ static const char *const yyTokenName[] = {
 #ifndef NDEBUG
 /* For tracing reduce actions, the names of all rules are required.
 */
-static const char *const yyRuleName[] = {
+static const char * const yyRuleName[] = {
        /*   0 */ "doc ::= doc_xml",
        /*   1 */ "doc_xml ::= OPML_XML doc_opml",
        /*   2 */ "doc_xml ::= doc_opml",
@@ -373,10 +373,10 @@ static const char *const yyRuleName[] = {
 ** Try to increase the size of the parser stack.  Return the number
 ** of errors.  Return 0 on success.
 */
-static int yyGrowStack(yyParser *p) {
+static int yyGrowStack(yyParser * p) {
        int newSize;
        int idx;
-       yyStackEntry *pNew;
+       yyStackEntry * pNew;
 
        newSize = p->yystksz * 2 + 100;
        idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
@@ -430,9 +430,9 @@ static int yyGrowStack(yyParser *p) {
 ** A pointer to a parser.  This pointer is used in subsequent calls
 ** to OPML and OPMLFree.
 */
-void *OPMLAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)) {
-       yyParser *pParser;
-       pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
+void * OPMLAlloc(void * (*mallocProc)(YYMALLOCARGTYPE)) {
+       yyParser * pParser;
+       pParser = (yyParser *)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
 
        if ( pParser ) {
 #ifdef YYTRACKMAXSTACKDEPTH
@@ -468,9 +468,9 @@ void *OPMLAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)) {
 ** directives of the input grammar.
 */
 static void yy_destructor(
-       yyParser *yypParser,    /* The parser */
+       yyParser * yypParser,   /* The parser */
        YYCODETYPE yymajor,     /* Type code for object to destroy */
-       YYMINORTYPE *yypminor   /* The object to be destroyed */
+       YYMINORTYPE * yypminor  /* The object to be destroyed */
 ) {
        OPMLARG_FETCH;
 
@@ -498,8 +498,8 @@ static void yy_destructor(
 ** If there is a destructor routine associated with the token which
 ** is popped from the stack, then call it.
 */
-static void yy_pop_parser_stack(yyParser *pParser) {
-       yyStackEntry *yytos;
+static void yy_pop_parser_stack(yyParser * pParser) {
+       yyStackEntry * yytos;
        assert( pParser->yytos != 0 );
        assert( pParser->yytos > pParser->yystack );
        yytos = pParser->yytos--;
@@ -524,10 +524,10 @@ static void yy_pop_parser_stack(yyParser *pParser) {
 ** assumed that the input pointer is never NULL.
 */
 void OPMLFree(
-       void *p,                    /* The parser to be deleted */
-       void (*freeProc)(void*)     /* Function used to reclaim memory */
+       void * p,                   /* The parser to be deleted */
+       void (*freeProc)(void *)    /* Function used to reclaim memory */
 ) {
-       yyParser *pParser = (yyParser*)p;
+       yyParser * pParser = (yyParser *)p;
 #ifndef YYPARSEFREENEVERNULL
 
        if ( pParser == 0 ) {
@@ -547,15 +547,15 @@ void OPMLFree(
        }
 
 #endif
-       (*freeProc)((void*)pParser);
+       (*freeProc)((void *)pParser);
 }
 
 /*
 ** Return the peak depth of the stack for a parser.
 */
 #ifdef YYTRACKMAXSTACKDEPTH
-int OPMLStackPeak(void *p) {
-       yyParser *pParser = (yyParser*)p;
+int OPMLStackPeak(void * p) {
+       yyParser * pParser = (yyParser *)p;
        return pParser->yyhwm;
 }
 #endif
@@ -565,7 +565,7 @@ int OPMLStackPeak(void *p) {
 ** look-ahead token iLookAhead.
 */
 static unsigned int yy_find_shift_action(
-       yyParser *pParser,        /* The parser */
+       yyParser * pParser,       /* The parser */
        YYCODETYPE iLookAhead     /* The look-ahead token */
 ) {
        int i;
@@ -673,7 +673,7 @@ static int yy_find_reduce_action(
 /*
 ** The following routine is called if the stack overflows.
 */
-static void yyStackOverflow(yyParser *yypParser) {
+static void yyStackOverflow(yyParser * yypParser) {
        OPMLARG_FETCH;
        yypParser->yytos--;
 #ifndef NDEBUG
@@ -699,7 +699,7 @@ static void yyStackOverflow(yyParser *yypParser) {
 ** Print tracing information for a SHIFT action
 */
 #ifndef NDEBUG
-static void yyTraceShift(yyParser *yypParser, int yyNewState) {
+static void yyTraceShift(yyParser * yypParser, int yyNewState) {
        if ( yyTraceFILE ) {
                if ( yyNewState < YYNSTATE ) {
                        fprintf(yyTraceFILE, "%sShift '%s', go to state %d\n",
@@ -719,12 +719,12 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState) {
 ** Perform a shift action.
 */
 static void yy_shift(
-       yyParser *yypParser,          /* The parser to be shifted */
+       yyParser * yypParser,         /* The parser to be shifted */
        int yyNewState,               /* The new state to shift in */
        int yyMajor,                  /* The major token to shift in */
        OPMLTOKENTYPE yyMinor        /* The minor token to shift in */
 ) {
-       yyStackEntry *yytos;
+       yyStackEntry * yytos;
        yypParser->yytos++;
 #ifdef YYTRACKMAXSTACKDEPTH
 
@@ -791,19 +791,19 @@ static const struct {
        { 24, 1 },
 };
 
-static void yy_accept(yyParser*);  /* Forward Declaration */
+static void yy_accept(yyParser *); /* Forward Declaration */
 
 /*
 ** Perform a reduce action and the shift that must immediately
 ** follow the reduce.
 */
 static void yy_reduce(
-       yyParser *yypParser,         /* The parser */
+       yyParser * yypParser,        /* The parser */
        unsigned int yyruleno        /* Number of the rule by which to reduce */
 ) {
        int yygoto;                     /* The next state */
        int yyact;                      /* The next action */
-       yyStackEntry *yymsp;            /* The top of the parser's stack */
+       yyStackEntry * yymsp;           /* The top of the parser's stack */
        int yysize;                     /* Amount to pop the stack */
        OPMLARG_FETCH;
        yymsp = yypParser->yytos;
@@ -919,7 +919,7 @@ static void yy_reduce(
 */
 #ifndef YYNOERRORRECOVERY
 static void yy_parse_failed(
-       yyParser *yypParser           /* The parser */
+       yyParser * yypParser          /* The parser */
 ) {
        OPMLARG_FETCH;
 #ifndef NDEBUG
@@ -948,7 +948,7 @@ static void yy_parse_failed(
 ** The following code executes when a syntax error first occurs.
 */
 static void yy_syntax_error(
-       yyParser *yypParser,           /* The parser */
+       yyParser * yypParser,          /* The parser */
        int yymajor,                   /* The major type of the error token */
        OPMLTOKENTYPE yyminor         /* The minor type of the error token */
 ) {
@@ -978,7 +978,7 @@ static void yy_syntax_error(
 ** The following is executed when the parser accepts
 */
 static void yy_accept(
-       yyParser *yypParser           /* The parser */
+       yyParser * yypParser          /* The parser */
 ) {
        OPMLARG_FETCH;
 #ifndef NDEBUG
@@ -1021,7 +1021,7 @@ static void yy_accept(
 ** None.
 */
 void OPML(
-       void *yyp,                   /* The parser */
+       void * yyp,                  /* The parser */
        int yymajor,                 /* The major token code number */
        OPMLTOKENTYPE yyminor       /* The value for the token */
        OPMLARG_PDECL               /* Optional %extra_argument parameter */
@@ -1034,9 +1034,9 @@ void OPML(
 #ifdef YYERRORSYMBOL
        int yyerrorhit = 0;   /* True if yymajor has invoked an error */
 #endif
-       yyParser *yypParser;  /* The parser */
+       yyParser * yypParser; /* The parser */
 
-       yypParser = (yyParser*)yyp;
+       yypParser = (yyParser *)yyp;
        assert( yypParser->yytos != 0 );
 #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
        yyendofinput = (yymajor == 0);
@@ -1182,7 +1182,7 @@ void OPML(
 #ifndef NDEBUG
 
        if ( yyTraceFILE ) {
-               yyStackEntry *i;
+               yyStackEntry * i;
                char cDiv = '[';
                fprintf(yyTraceFILE, "%sReturn. Stack=", yyTracePrompt);
 
index ccc75acecdb96d74f06507adf8a085d88ee8e8e0..bfa6d72d0593df3aed2983636086aec6f41dccd8 100644 (file)
 void * OPMLAlloc(void *);
 void OPML(void *, int, void *, void *);
 void OPMLFree(void *, void *);
-void OPMLTrace(FILE *stream, char *zPrefix);
+void OPMLTrace(FILE * stream, char * zPrefix);
 
 
 #define print(x) d_string_append(out, x)
@@ -190,7 +190,7 @@ token * tokenize_opml_string(mmd_engine * e, size_t start, size_t len) {
 
 void parse_opml_token_chain(mmd_engine * e, token * chain) {
 
-       void* pParser = OPMLAlloc (malloc);             // Create a parser (for lemon)
+       void * pParser = OPMLAlloc (malloc);            // Create a parser (for lemon)
        token * walker = chain->next;                           // Walk the existing tree
        token * remainder;                                                      // Hold unparsed tail of chain
 
index 0e208f5e6220721781502dea1b68046bfefbade0..27a9188f9a508ce7f5f35381d8d267e1b2af129a 100644 (file)
@@ -29,7 +29,7 @@ long ran_x[KK];                    /* the generator state */
        void ran_array(long aa[], int n)
 #else
        void ran_array(aa, n)   /* put n new random numbers in aa */
-       long *aa;   /* destination */
+       long * aa;  /* destination */
        int n;      /* array length (must be at least KK) */
 #endif
 {
@@ -58,7 +58,7 @@ long ran_x[KK];                    /* the generator state */
 #define QUALITY 1009 /* recommended quality level for high-res use */
 long ran_arr_buf[QUALITY];
 long ran_arr_dummy = -1, ran_arr_started = -1;
-long *ran_arr_ptr = &ran_arr_dummy; /* the next random number, or -1 */
+long * ran_arr_ptr = &ran_arr_dummy; /* the next random number, or -1 */
 
 #define TT  70   /* guaranteed separation between streams */
 #define is_odd(x)  ((x)&1)          /* units bit of x */
index 497713f7fa3e4e5a4c692ffe2fcec7f564309b59..a8c237d1168086e8887391421d15148a3270f32a 100644 (file)
@@ -62,7 +62,7 @@
 struct stack {
        size_t          size;                           //!< Number of objects currently in stack
        size_t          capacity;                       //!< Total current capacity for stack
-       void **         element;                        //!< Array of pointers to objects in stack
+       void    **      element;                        //!< Array of pointers to objects in stack
 };
 
 typedef struct stack stack;
index 774956453ea30ec8167e034e2d9bd95a8aec9bb9..fbe97c83671dea0b8b26ab3078e24bde238e3a91 100644 (file)
@@ -72,8 +72,8 @@
 #define kMaxTableColumns 48                                    //!< Maximum number of table columns for specifying alignment
 
 typedef struct {
-       struct link *           link_hash;
-       struct meta *           meta_hash;
+       struct link     *       link_hash;
+       struct meta     *       meta_hash;
 
        unsigned long           extensions;
        short                           output_format;
@@ -83,8 +83,8 @@ typedef struct {
        short                           skip_token;
 
        short                           footnote_para_counter;
-       stack *                         used_footnotes;
-       stack *                         inline_footnotes_to_free;
+       stack           *               used_footnotes;
+       stack           *               inline_footnotes_to_free;
        struct fn_holder *      footnote_hash;
        short                           footnote_being_printed;
 
@@ -93,19 +93,19 @@ typedef struct {
        int                             random_seed_base_labels;
        int                             label_counter;
 
-       stack *                         used_citations;
-       stack *                         inline_citations_to_free;
+       stack           *               used_citations;
+       stack           *               inline_citations_to_free;
        struct fn_holder *      citation_hash;
        short                           citation_being_printed;
-       char *                          bibtex_file;
+       char            *               bibtex_file;
 
-       stack *                         used_glossaries;
-       stack *                         inline_glossaries_to_free;
+       stack           *               used_glossaries;
+       stack           *               inline_glossaries_to_free;
        struct fn_holder *      glossary_hash;
        short                           glossary_being_printed;
 
-       stack *                         used_abbreviations;
-       stack *                         inline_abbreviations_to_free;
+       stack           *               used_abbreviations;
+       stack           *               inline_abbreviations_to_free;
        struct fn_holder *      abbreviation_hash;
 
        short                           language;
@@ -113,9 +113,9 @@ typedef struct {
 
        short                           base_header_level;
 
-       stack *                         header_stack;
+       stack           *               header_stack;
 
-       stack *                         outline_stack;
+       stack           *               outline_stack;
        short                           opml_item_closed;
 
        short                           recurse_depth;
@@ -127,27 +127,27 @@ typedef struct {
 
        short                           odf_para_type;
 
-       struct asset *          asset_hash;
+       struct asset    *       asset_hash;
        short                           store_assets;
        short                           remember_assets;
 } scratch_pad;
 
 
 struct attr {
-       char *                          key;
-       char *                          value;
-       struct attr *           next;
+       char            *               key;
+       char            *               value;
+       struct attr     *       next;
 };
 
 typedef struct attr attr;
 
 struct link {
-       token *                         label;
-       char *                          label_text;
-       char *                          clean_text;
-       char *                          url;
-       char *                          title;
-       attr *                          attributes;
+       token           *               label;
+       char    *                       label_text;
+       char            *               clean_text;
+       char            *               url;
+       char            *               title;
+       attr            *               attributes;
        short                           flags;
        UT_hash_handle          hh;
 };
@@ -162,10 +162,10 @@ enum link_flags {
 typedef struct link link;
 
 struct footnote {
-       token *                         label;
-       char *                          label_text;
-       char *                          clean_text;
-       token *                         content;
+       token           *               label;
+       char            *               label_text;
+       char            *               clean_text;
+       token           *               content;
        size_t                          count;
        bool                            free_para;
 
@@ -175,15 +175,15 @@ struct footnote {
 typedef struct footnote footnote;
 
 struct fn_holder {
-       footnote *                      note;
+       footnote        *               note;
        UT_hash_handle          hh;
 };
 
 typedef struct fn_holder fn_holder;
 
 struct meta {
-       char *                          key;
-       char *                          value;
+       char            *               key;
+       char            *               value;
        size_t                          start;
        UT_hash_handle          hh;
 };
@@ -191,9 +191,9 @@ struct meta {
 typedef struct meta meta;
 
 struct abbr {
-       char *                          abbr;
+       char            *               abbr;
        size_t                          abbr_len;
-       char *                          expansion;
+       char            *               expansion;
        size_t                          expansion_len;
        UT_hash_handle          hh;
 };
index d9c6d7647671f7c6b28c0192da0d0e600a327add..026dabfa7fd91b3446877a3b5dc8ffa1d07db5e1 100644 (file)
 #define kBUFFERSIZE 4096       // How many bytes to read at a time
 
 // argtable structs
-struct arg_lit *a_help, *a_version, *a_compatibility, *a_nolabels, *a_batch,
+struct arg_lit * a_help, *a_version, *a_compatibility, *a_nolabels, *a_batch,
                   *a_accept, *a_reject, *a_full, *a_snippet, *a_random, *a_unique, *a_meta,
                   *a_notransclude, *a_nosmart, *a_opml, *a_itmz;
-struct arg_str *a_format, *a_lang, *a_extract;
-struct arg_file *a_file, *a_o;
-struct arg_end *a_end;
-struct arg_rem *a_rem1, *a_rem2, *a_rem3, *a_rem4, *a_rem5, *a_rem6;
+struct arg_str * a_format, *a_lang, *a_extract;
+struct arg_file * a_file, *a_o;
+struct arg_end * a_end;
+struct arg_rem * a_rem1, *a_rem2, *a_rem3, *a_rem4, *a_rem5, *a_rem6;
 
 
 /// strdup() not available on all platforms
@@ -129,14 +129,14 @@ char * filename_with_extension(const char * original, const char * new_extension
 }
 
 
-int main(int argc, char** argv) {
+int main(int argc, char ** argv) {
        int exitcode = EXIT_SUCCESS;
        char * binname = "multimarkdown";
        short format = FORMAT_HTML;
        short language = LC_EN;
 
        // Initialize argtable structs
-       void *argtable[] = {
+       void * argtable[] = {
                a_help                  = arg_lit0(NULL, "help", "display this help and exit"),
                a_version               = arg_lit0(NULL, "version", "display version info and exit"),