diff -r 000000000000 -r 7a62c77a0dbe bookloupe/bookloupe.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bookloupe/bookloupe.h Sat Sep 21 23:40:18 2013 +0100 @@ -0,0 +1,87 @@ +#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_IS_SQUOTE(c) ((c)==CHAR_SQUOTE || (c)==CHAR_OPEN_SQUOTE || \ + (c)==CHAR_LS_QUOTE || (c)==CHAR_RS_QUOTE) + +#define CHAR_IS_APOSTROPHE(c) ((c)==CHAR_SQUOTE || (c)==CHAR_RS_QUOTE) + +#define CHAR_IS_CLOSING_QUOTE(c) \ + ((c)==CHAR_DQUOTE || (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, + SWITNO +}; + +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,emdash,space_emdash,non_PG_space_emdash,PG_space_emdash; + int Dutchcount,Frenchcount; +}; + +struct warnings { + int shortline,longline,bin,dash,dotcomma,ast,fslash,digit,hyphen; + int endquote; + gboolean isDutch,isFrench; +}; + +struct line_properties { + unsigned int len,blen; + gunichar start; +}; + +struct parities { + int dquote,squote; +}; + +struct pending { + char *dquote,*squote,*rbrack,*sbrack,*cbrack,*unders; + long squot; +}; + +#endif /* BOOKOUPE_H */