# HG changeset patch # User Carl Byington # Date 1233869926 28800 # Node ID e35fd42bac05d34d32d56d910a80e959b7e56a43 # Parent fc11b1d1ad3452080a18d27786abf082a3830301 more cleanup of include files diff -r fc11b1d1ad34 -r e35fd42bac05 Makefile.am --- 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 diff -r fc11b1d1ad34 -r e35fd42bac05 configure.in --- 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 \ diff -r fc11b1d1ad34 -r e35fd42bac05 src/common.h --- 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 -// 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 #include diff -r fc11b1d1ad34 -r e35fd42bac05 src/define.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 diff -r fc11b1d1ad34 -r e35fd42bac05 src/libpst.c --- 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 diff -r fc11b1d1ad34 -r e35fd42bac05 src/libpst.h --- 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 + + +// 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 diff -r fc11b1d1ad34 -r e35fd42bac05 src/libpst/Makefile.am --- /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 diff -r fc11b1d1ad34 -r e35fd42bac05 src/libpst/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" diff -r fc11b1d1ad34 -r e35fd42bac05 src/lzfu.c --- 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; diff -r fc11b1d1ad34 -r e35fd42bac05 src/vbuf.h --- 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