From: Fletcher T. Penney Date: Wed, 2 Oct 2019 17:36:36 +0000 (-0400) Subject: UPDATED: Make astyle X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fheads%2Fdevelop;p=multimarkdown UPDATED: Make astyle --- diff --git a/Sources/libMultiMarkdown/char.c b/Sources/libMultiMarkdown/char.c index 786eba5..921d427 100644 --- a/Sources/libMultiMarkdown/char.c +++ b/Sources/libMultiMarkdown/char.c @@ -65,8 +65,8 @@ static unsigned char smart_char_type[256] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 2, 2, 2, 2, 2, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 2, 2, 2, 2, 2, - 2,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132, - 132,132,132,132,132,132,132,132,132,132,132, 2, 2, 2, 2, 0, + 2, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -197,13 +197,13 @@ int char_is_whitespace_or_line_ending_or_punctuation(char c) { unsigned char * utf8_check(unsigned char * s) { while (*s) { if (*s < 0x80) - /* 0xxxxxxx */ + /* 0xxxxxxx */ { s++; } else if ((s[0] & 0xe0) == 0xc0) { /* 110XXXXx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || - (s[0] & 0xfe) == 0xc0) { /* overlong? */ + (s[0] & 0xfe) == 0xc0) { /* overlong? */ return s; } else { s += 2; @@ -211,22 +211,22 @@ unsigned char * utf8_check(unsigned char * s) { } else if ((s[0] & 0xf0) == 0xe0) { /* 1110XXXX 10Xxxxxx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || - (s[2] & 0xc0) != 0x80 || - (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) || /* overlong? */ - (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) || /* surrogate? */ - (s[0] == 0xef && s[1] == 0xbf && - (s[2] & 0xfe) == 0xbe)) { /* U+FFFE or U+FFFF? */ - return s; - } else { - s += 3; - } + (s[2] & 0xc0) != 0x80 || + (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) || /* overlong? */ + (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) || /* surrogate? */ + (s[0] == 0xef && s[1] == 0xbf && + (s[2] & 0xfe) == 0xbe)) { /* U+FFFE or U+FFFF? */ + return s; + } else { + s += 3; + } } else if ((s[0] & 0xf8) == 0xf0) { /* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || - (s[2] & 0xc0) != 0x80 || - (s[3] & 0xc0) != 0x80 || - (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) || /* overlong? */ - (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4) { /* > U+10FFFF? */ + (s[2] & 0xc0) != 0x80 || + (s[3] & 0xc0) != 0x80 || + (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) || /* overlong? */ + (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4) { /* > U+10FFFF? */ return s; } else { s += 4; diff --git a/Sources/libMultiMarkdown/char.h b/Sources/libMultiMarkdown/char.h index 9c4bab1..7aa1308 100644 --- a/Sources/libMultiMarkdown/char.h +++ b/Sources/libMultiMarkdown/char.h @@ -57,7 +57,7 @@ #define CHAR_SMART_STRING_H #ifdef TEST -#include "CuTest.h" + #include "CuTest.h" #endif /// Define character types diff --git a/Sources/libMultiMarkdown/include/token.h b/Sources/libMultiMarkdown/include/token.h index 770f7dc..6c00d04 100644 --- a/Sources/libMultiMarkdown/include/token.h +++ b/Sources/libMultiMarkdown/include/token.h @@ -68,7 +68,7 @@ /// This is easy with a command line utility, but complex in a multithreaded /// application. Unless you *really* know what you're doing, fully understand -/// threads and C memory management, you should probably disable object pools +/// threads and C memory management, you should probably disable object pools /// when creating a long-running GUI application. (I disable them in /// MultiMarkdown Composer, for example.) diff --git a/Sources/libMultiMarkdown/mmd.h b/Sources/libMultiMarkdown/mmd.h index 25d5690..48b009d 100644 --- a/Sources/libMultiMarkdown/mmd.h +++ b/Sources/libMultiMarkdown/mmd.h @@ -79,7 +79,7 @@ struct mmd_engine { stack * abbreviation_stack; stack * citation_stack; - stack * critic_stack; + stack * critic_stack; stack * definition_stack; stack * footnote_stack; stack * glossary_stack; diff --git a/Sources/libMultiMarkdown/writer.h b/Sources/libMultiMarkdown/writer.h index 45b9395..29cef5e 100644 --- a/Sources/libMultiMarkdown/writer.h +++ b/Sources/libMultiMarkdown/writer.h @@ -138,7 +138,7 @@ typedef struct { short store_assets; short remember_assets; - stack * critic_stack; + stack * critic_stack; } scratch_pad;