diff src/lspst.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 7133b39975f7
children 6395ced2b8b2
line wrap: on
line diff
--- a/src/lspst.c	Fri Jan 16 15:31:11 2009 -0800
+++ b/src/lspst.c	Sat Jan 31 12:12:36 2009 -0800
@@ -17,6 +17,7 @@
 #include <unistd.h>
 
 #include "libpst.h"
+#include "common.h"
 #include "timeconv.h"
 
 struct file_ll {
@@ -30,8 +31,8 @@
 
 void canonicalize_filename(char *fname);
 void debug_print(char *fmt, ...);
-int  usage(char *prog_name);
-int  version();
+void usage(char *prog_name);
+void version();
 
 // global settings
 pst_file pstfile;
@@ -149,7 +150,7 @@
 }
 
 
-int usage(char *prog_name) {
+void usage(char *prog_name) {
 	DEBUG_ENT("usage");
 	version();
 	printf("Usage: %s [OPTIONS] {PST FILENAME}\n", prog_name);
@@ -158,11 +159,10 @@
 	printf("\t-h\t- Help. This screen\n");
 	printf("\t-V\t- Version. Display program version\n");
 	DEBUG_RET();
-	return 0;
 }
 
 
-int version() {
+void version() {
 	DEBUG_ENT("version");
 	printf("lspst / LibPST v%s\n", VERSION);
 #if BYTE_ORDER == BIG_ENDIAN
@@ -176,11 +176,10 @@
 			 printf("GCC %d.%d : %s %s\n", __GNUC__, __GNUC_MINOR__, __DATE__, __TIME__);
 #endif
 	 DEBUG_RET();
-	 return 0;
 }
 
 
-int main(int argc, char** argv) {
+int main(int argc, char* const* argv) {
     pst_item *item = NULL;
     pst_desc_ll *d_ptr;
     char *temp  = NULL; //temporary char pointer