Mercurial > libpst
diff src/readpst.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 | ed2a260bbb98 |
children | 6395ced2b8b2 |
line wrap: on
line diff
--- a/src/readpst.c Fri Jan 16 15:31:11 2009 -0800 +++ b/src/readpst.c Sat Jan 31 12:12:36 2009 -0800 @@ -33,8 +33,8 @@ void process(pst_item *outeritem, pst_desc_ll *d_ptr); void write_email_body(FILE *f, char *body); char* removeCR (char *c); -int usage(); -int version(); +void usage(); +void version(); char* mk_kmail_dir(char*); int close_kmail_dir(); char* mk_recurse_dir(char*); @@ -54,7 +54,7 @@ void create_enter_dir(struct file_ll* f, pst_item *item); void close_enter_dir(struct file_ll *f); -char* prog_name; +const char* prog_name; char* output_dir = "."; char* kmail_chdir = NULL; @@ -219,7 +219,7 @@ -int main(int argc, char** argv) { +int main(int argc, char* const* argv) { pst_item *item = NULL; pst_desc_ll *d_ptr; char * fname = NULL; @@ -416,7 +416,7 @@ } -int usage() { +void usage() { DEBUG_ENT("usage"); version(); printf("Usage: %s [OPTIONS] {PST FILENAME}\n", prog_name); @@ -436,11 +436,10 @@ printf("\t-r\t- Recursive. Output in a recursive format\n"); printf("\t-w\t- Overwrite any output mbox files\n"); DEBUG_RET(); - return 0; } -int version() { +void version() { DEBUG_ENT("version"); printf("ReadPST / LibPST v%s\n", VERSION); #if BYTE_ORDER == BIG_ENDIAN @@ -454,7 +453,6 @@ printf("GCC %d.%d : %s %s\n", __GNUC__, __GNUC_MINOR__, __DATE__, __TIME__); #endif DEBUG_RET(); - return 0; }