#ifndef BOOKLOUPE_H #define BOOKLOUPE_H /* special characters */ #define CHAR_SPACE 32 #define CHAR_TAB 9 #define CHAR_LF 10 #define CHAR_CR 13 #define CHAR_DQUOTE 34 #define CHAR_SQUOTE 39 #define CHAR_OPEN_SQUOTE 96 #define CHAR_TILDE 126 #define CHAR_ASTERISK 42 #define CHAR_FORESLASH 47 #define CHAR_CARAT 94 #define CHAR_UNDERSCORE '_' #define CHAR_OPEN_CBRACK '{' #define CHAR_CLOSE_CBRACK '}' #define CHAR_OPEN_RBRACK '(' #define CHAR_CLOSE_RBRACK ')' #define CHAR_OPEN_SBRACK '[' #define CHAR_CLOSE_SBRACK ']' #define CHAR_LS_QUOTE 0x2018 #define CHAR_RS_QUOTE 0x2019 #define CHAR_LD_QUOTE 0x201C #define CHAR_RD_QUOTE 0x201D #define CHAR_IS_SQUOTE(c) ((c)==CHAR_SQUOTE || (c)==CHAR_OPEN_SQUOTE || \ (c)==CHAR_LS_QUOTE || (c)==CHAR_RS_QUOTE) #define CHAR_IS_DQUOTE(c) ((c)==CHAR_DQUOTE || (c)==CHAR_LD_QUOTE || \ (c)==CHAR_RD_QUOTE) #define CHAR_IS_APOSTROPHE(c) ((c)==CHAR_SQUOTE || (c)==CHAR_RS_QUOTE) /* longest and shortest normal PG line lengths */ #define LONGEST_PG_LINE 75 #define WAY_TOO_LONG 80 #define SHORTEST_PG_LINE 55 enum { ECHO_SWITCH, SQUOTE_SWITCH, TYPO_SWITCH, QPARA_SWITCH, PARANOID_SWITCH, LINE_END_SWITCH, OVERVIEW_SWITCH, STDOUT_SWITCH, HEADER_SWITCH, WEB_SWITCH, VERBOSE_SWITCH, MARKUP_SWITCH, USERTYPO_SWITCH, DP_SWITCH, DUMP_CONFIG_SWITCH, SWITNO }; enum { DOS_NEWLINES, UNIX_NEWLINES, OS9_NEWLINES, }; struct dash_results { long base,space,non_PG_space,PG_space; }; struct first_pass_results { long firstline,astline; long footerline,totlen,binlen,alphalen,endquote_count,shortline,dotcomma; long fslashline,hyphens,longline,verylongline,htmcount,standalone_digit; long spacedash; struct dash_results emdash; int newlines; int Dutchcount,Frenchcount; }; struct warnings { int shortline,longline,bin,dash,dotcomma,ast,fslash,digit,hyphen; int endquote,newlines; gboolean isDutch,isFrench; }; struct line_properties { unsigned int len,blen; gunichar start; }; struct parities { int dquote,squote; }; extern gboolean pswit[SWITNO]; extern long cnt_quote,cnt_brack,cnt_bin,cnt_odd,cnt_long,cnt_short,cnt_punct; extern long cnt_dash,cnt_word,cnt_html,cnt_lineend,cnt_spacend,linecnt; extern long checked_linecnt; #endif /* BOOKOUPE_H */