Mercurial > libpst
comparison src/readpst.c @ 123:ab2a11e72250
more cleanup of #include files.
common.h is the only file allowed to include system .h files
unprotected by autoconf HAVE_ symbols. define.h is the only other file
allowed to include system .h files. define.h is never installed;
common.h is installed if we are building the shared library.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 03 Feb 2009 10:59:10 -0800 |
parents | bdb38b434c0a |
children | 23a36ac0514d |
comparison
equal
deleted
inserted
replaced
122:bdb38b434c0a | 123:ab2a11e72250 |
---|---|
10 #include "libstrfunc.h" | 10 #include "libstrfunc.h" |
11 #include "vbuf.h" | 11 #include "vbuf.h" |
12 | 12 |
13 #include "define.h" | 13 #include "define.h" |
14 #include "lzfu.h" | 14 #include "lzfu.h" |
15 | |
16 #ifdef HAVE_REGEX_H | |
17 #include <regex.h> | |
18 #endif | |
19 | 15 |
20 #define OUTPUT_TEMPLATE "%s" | 16 #define OUTPUT_TEMPLATE "%s" |
21 #define OUTPUT_KMAIL_DIR_TEMPLATE ".%s.directory" | 17 #define OUTPUT_KMAIL_DIR_TEMPLATE ".%s.directory" |
22 #define KMAIL_INDEX ".%s.index" | 18 #define KMAIL_INDEX ".%s.index" |
23 #define SEP_MAIL_FILE_TEMPLATE "%i" /* "%09i" */ | 19 #define SEP_MAIL_FILE_TEMPLATE "%i" /* "%09i" */ |
240 | 236 |
241 time_t now = time(NULL); | 237 time_t now = time(NULL); |
242 srand((unsigned)now); | 238 srand((unsigned)now); |
243 | 239 |
244 if (regcomp(&meta_charset_pattern, "<meta[^>]*content=\"[^>]*charset=([^>\";]*)[\";]", REG_ICASE | REG_EXTENDED)) { | 240 if (regcomp(&meta_charset_pattern, "<meta[^>]*content=\"[^>]*charset=([^>\";]*)[\";]", REG_ICASE | REG_EXTENDED)) { |
245 printf("cannot compile regex pattern\n"); | 241 printf("cannot compile regex pattern to find content charset in html bodies\n"); |
246 exit(3); | 242 exit(3); |
247 } | 243 } |
248 | 244 |
249 // command-line option handling | 245 // command-line option handling |
250 while ((c = getopt(argc, argv, "bCc:Dd:hko:qrSMVw"))!= -1) { | 246 while ((c = getopt(argc, argv, "bCc:Dd:hko:qrSMVw"))!= -1) { |