changeset 130:e35fd42bac05

more cleanup of include files
author Carl Byington <carl@five-ten-sg.com>
date Thu, 05 Feb 2009 13:38:46 -0800
parents fc11b1d1ad34
children dd905e537728
files Makefile.am configure.in src/common.h src/define.h src/libpst.c src/libpst.h src/libpst/Makefile.am src/libpst/common.h src/lzfu.c src/vbuf.h
diffstat 10 files changed, 40 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Thu Feb 05 12:09:04 2009 -0800
+++ b/Makefile.am	Thu Feb 05 13:38:46 2009 -0800
@@ -1,4 +1,4 @@
-SUBDIRS = src man html info debian
+SUBDIRS = src man html info debian src/libpst
 htmldir = ${datadir}/doc/@PACKAGE@-@VERSION@
 html_DATA = AUTHORS COPYING ChangeLog NEWS README
 CLEANFILES = xml/libpst xml/Makefile
--- a/configure.in	Thu Feb 05 12:09:04 2009 -0800
+++ b/configure.in	Thu Feb 05 13:38:46 2009 -0800
@@ -261,6 +261,7 @@
     libpst.spec             \
     man/Makefile            \
     src/Makefile            \
+    src/libpst/Makefile     \
     src/pst2dii.cpp         \
     xml/Makefile            \
     xml/libpst              \
--- a/src/common.h	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/common.h	Thu Feb 05 13:38:46 2009 -0800
@@ -8,16 +8,6 @@
 #include <stdarg.h>
 
 
-// switch to maximal packing for all structures in the libpst interface
-// this is reverted in the vbuf.h include
-#ifdef _MSC_VER
-    #pragma pack(push, 1)
-#endif
-#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
-    #pragma pack(1)
-#endif
-
-
 #ifndef  _MSC_VER
     #include <stdint.h>
     #include <inttypes.h>
--- a/src/define.h	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/define.h	Thu Feb 05 13:38:46 2009 -0800
@@ -8,7 +8,6 @@
 #ifndef DEFINEH_H
 #define DEFINEH_H
 
-#include "common.h"
 #include "libpst.h"
 #include "timeconv.h"
 #include "libstrfunc.h"
@@ -378,15 +377,4 @@
 #define PST_LE_GET_INT8(p) (*(int8_t const *)(p))
 
 
-// switch to maximal packing for our own internal structures
-// use the same code as in common.h
-#ifdef _MSC_VER
-    #pragma pack(push, 1)
-#endif
-#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
-    #pragma pack(1)
-#endif
-
-
-
 #endif //DEFINEH_H
--- a/src/libpst.c	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/libpst.c	Thu Feb 05 13:38:46 2009 -0800
@@ -7,9 +7,19 @@
 
 #include "define.h"
 
+
+// switch to maximal packing for our own internal structures
+// use the same code as in libpst.h
+#ifdef _MSC_VER
+    #pragma pack(push, 1)
+#endif
+#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
+    #pragma pack(1)
+#endif
+
+
 #define ASSERT(x) { if(!(x)) raise( SIGSEGV ); }
 
-
 #define INDEX_TYPE32            0x0E
 #define INDEX_TYPE32A           0x0F    // unknown, but assumed to be similar for now
 #define INDEX_TYPE64            0x17
--- a/src/libpst.h	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/libpst.h	Thu Feb 05 13:38:46 2009 -0800
@@ -10,6 +10,18 @@
 #ifndef LIBPST_H
 #define LIBPST_H
 
+#include <libpst/common.h>
+
+
+// switch to maximal packing for all structures in the libpst interface
+// this is reverted at the end of this file
+#ifdef _MSC_VER
+    #pragma pack(push, 1)
+#endif
+#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
+    #pragma pack(1)
+#endif
+
 
 #define PST_TYPE_NOTE        1
 #define PST_TYPE_APPOINTMENT 8
@@ -565,4 +577,16 @@
 void           pst_printIDptr(pst_file* pf);
 void           pst_printID2ptr(pst_index2_ll *ptr);
 
+
+// switch from maximal packing back to default packing
+// undo the packing from the beginning of this file
+#ifdef _MSC_VER
+    #pragma pack(pop)
+#endif
+#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
+    #pragma pack()
+#endif
+
+
+
 #endif // defined LIBPST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libpst/Makefile.am	Thu Feb 05 13:38:46 2009 -0800
@@ -0,0 +1,1 @@
+EXTRA_DIST = common.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libpst/common.h	Thu Feb 05 13:38:46 2009 -0800
@@ -0,0 +1,1 @@
+#include "../common.h"
--- a/src/lzfu.c	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/lzfu.c	Thu Feb 05 13:38:46 2009 -0800
@@ -76,7 +76,7 @@
 				// two bytes available?
 				if (in_ptr+1 < in_size) {
 					// read 2 bytes from input
-					unsigned short int blkhdr, offset, length;
+					uint16_t blkhdr, offset, length;
 					memcpy(&blkhdr, rtfcomp+in_ptr, 2);
 					LE16_CPU(blkhdr);
 					in_ptr += 2;
--- a/src/vbuf.h	Thu Feb 05 12:09:04 2009 -0800
+++ b/src/vbuf.h	Thu Feb 05 13:38:46 2009 -0800
@@ -89,15 +89,4 @@
 int vb_skipline( struct varbuf *vb ); // in: vb->b == "stuff\nmore_stuff"; out: vb->b == "more_stuff"
 
 
-// switch from maximal packing back to default packing
-// undo the packing from common.h
-#ifdef _MSC_VER
-    #pragma pack(pop)
-#endif
-#if defined(__GNUC__) || defined (__SUNPRO_C) || defined(__SUNPRO_CC)
-    #pragma pack()
-#endif
-
-
-
 #endif // VBUF_H