--- iocccsize.orig.c 2018-01-13 10:01:16.000000000 -0600 +++ iocccsize.c 2018-01-14 16:23:57.000000000 -0600 @@ -181,6 +181,7 @@ { STRLEN("#ident"), "#ident" }, { STRLEN("#if"), "#if" }, { STRLEN("#ifdef"), "#ifdef" }, + { STRLEN("#ifndef"), "#ifndef" }, /* XXX bugfix */ { STRLEN("#include"), "#include" }, { STRLEN("#line"), "#line" }, { STRLEN("#pragma"), "#pragma" }, @@ -225,7 +226,7 @@ { STRLEN("float"), "float" }, { STRLEN("for"), "for" }, { STRLEN("goto"), "goto" }, - { STRLEN("I"), "I" }, + /* { STRLEN("I"), "I" }, */ /* XXX seriously? */ { STRLEN("if"), "if" }, { STRLEN("inline"), "inline" }, { STRLEN("int"), "int" }, @@ -365,6 +366,7 @@ int lcount, wcount, bcount; int is_comment, is_word, dquote, escape; int count, keywords, saved, kw_saved; + int squote; /* Start of buffer sentinel. */ buf[0] = ' '; @@ -374,6 +376,7 @@ keywords = kw_saved = 0; lcount = wcount = bcount = 0; is_comment = is_word = dquote = escape = 0; + squote = 0; /* * "no matter how well you may think you understand this code, @@ -422,6 +425,15 @@ } } + else if (squote) { + if (escape) + escape = 0; + else if (*p == '\\') + escape = 1; + else if (*p == '\'') + squote = 0; + } + /* Not quote string. */ else { /* In C comment block? */ @@ -499,6 +511,11 @@ } } + /* Open single quote string? */ + else if (*p == '\'') { + squote = 1; + } + /* Open quoted string? */ else if (*p == '"') { dquote = 1;