comparison src/readpstlog.c @ 118:0f1492b7fe8b

patch from Fridrich Strba for building on mingw and general cleanup of autoconf files add processing for pst files of type 0x0f start adding support for properly building and installing libpst.so and the header files required to use it. remove version.h since the version number is now in config.h more const correctness issues regarding getopt()
author Carl Byington <carl@five-ten-sg.com>
date Sat, 31 Jan 2009 12:12:36 -0800
parents 987aa872294e
children bdb38b434c0a
comparison
equal deleted inserted replaced
117:0a3d854b53f6 118:0f1492b7fe8b
1 #include "define.h" 1 #include "define.h"
2 2
3 #define BUF_SIZE 4096 3 #define BUF_SIZE 4096
4 4
5 int usage(); 5 void usage();
6 size_t get(void * buf, int size, unsigned int count, FILE *fp); 6 size_t get(void * buf, int size, unsigned int count, FILE *fp);
7 int split_args(char *args, int **targ); 7 int split_args(char *args, int **targ);
8 int is_in(int a, int *b, int c); 8 int is_in(int a, int *b, int c);
9 9
10 int main(int argc, char** argv) { 10 int main(int argc, char* const* argv) {
11 int identity = 0; 11 int identity = 0;
12 int level = 0; 12 int level = 0;
13 int x, ptr, stop=0, flag; 13 int x, ptr, stop=0, flag;
14 char *fname, *buf, rec_type; 14 char *fname, *buf, rec_type;
15 unsigned char version; 15 unsigned char version;
188 exit(1); 188 exit(1);
189 } 189 }
190 return z; 190 return z;
191 } 191 }
192 192
193 int usage() { 193 void usage() {
194 printf("readlog -t[show_type] -x[exclude_type] -f[format] filename\n"); 194 printf("readlog -t[show_type] -x[exclude_type] -f[format] filename\n");
195 printf("\tformat:\n\t\tt: text log format\n"); 195 printf("\tformat:\n\t\tt: text log format\n");
196 printf("\t\ti: indented text log format\n"); 196 printf("\t\ti: indented text log format\n");
197 printf("\tshow_type:\n\t\tcomma separated list of types to show " 197 printf("\tshow_type:\n\t\tcomma separated list of types to show "
198 "[ie, 2,4,1,6]\n"); 198 "[ie, 2,4,1,6]\n");
199 printf("\texclude_type:\n\t\tcomma separated list of types to exclude " 199 printf("\texclude_type:\n\t\tcomma separated list of types to exclude "
200 "[ie, 1,5,3,7]\n"); 200 "[ie, 1,5,3,7]\n");
201 return 0;
202 } 201 }
203 202
204 203
205 int split_args(char *args, int **targ) { 204 int split_args(char *args, int **targ) {
206 int count = 1, *i, x, z; 205 int count = 1, *i, x, z;