libpst

changeset 377:506e266f930d

Vitaliy Didik - fix MSVC build
author Carl Byington <carl@five-ten-sg.com>
date Mon, 20 Nov 2017 08:19:28 -0800
parents b58ca528f5c9
children ad7b880ad3d1
files AUTHORS regression/regression-tests.bash src/common.h src/define.h
diffstat 4 files changed, 52 insertions(+), 51 deletions(-) [+]
line diff
     1.1 --- a/AUTHORS	Fri Jul 21 21:35:01 2017 -0700
     1.2 +++ b/AUTHORS	Mon Nov 20 08:19:28 2017 -0800
     1.3 @@ -41,6 +41,8 @@
     1.4      Jeffrey Morlan <jeffrey@everlaw.com>
     1.5      Hans Liss <Hans@Liss.pp.se>
     1.6      Igor Stroh <igor.stroh@rulim.de>
     1.7 +    Zachary Travis <ztravis@everlaw.com>
     1.8 +    Vitaliy Didik <ariman@inbox.ru>
     1.9  
    1.10  Testing team:
    1.11      Mac OSX - Michael Watson <mike@mikeandgayle.com>
     2.1 --- a/regression/regression-tests.bash	Fri Jul 21 21:35:01 2017 -0700
     2.2 +++ b/regression/regression-tests.bash	Mon Nov 20 08:19:28 2017 -0800
     2.3 @@ -81,16 +81,16 @@
     2.4              #     $val ../src/readpst $utf $acc -C $char -j 0 -k -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
     2.5  
     2.6              ## recursive mode
     2.7 -            #echo $val ../src/readpst $utf $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn
     2.8 -            #     $val ../src/readpst $utf $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
     2.9 +            echo $val ../src/readpst $utf $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn
    2.10 +                 $val ../src/readpst $utf $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
    2.11  
    2.12              ## separate mode with filename extensions and .msg files
    2.13              #echo $val ../src/readpst $jobs     -r -m -D -cv -o output$n -d $ba.log $fn
    2.14              #     $val ../src/readpst $jobs     -r -m -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
    2.15  
    2.16              ## separate mode where we decode all attachments to binary files
    2.17 -            echo $val ../src/readpst $jobs     -r -S -D -cv -o output$n -d $ba.log $fn
    2.18 -                 $val ../src/readpst $jobs     -r -S -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
    2.19 +            #echo $val ../src/readpst $jobs     -r -S -D -cv -o output$n -d $ba.log $fn
    2.20 +            #     $val ../src/readpst $jobs     -r -S -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
    2.21  
    2.22              ## testing idblock
    2.23              #../src/getidblock -p $fn 0 >$ba.fulldump
    2.24 @@ -122,37 +122,37 @@
    2.25  [ "$2" == "reg" ] && regression="yes"
    2.26  [ "$regression" == "yes" ] && val=""
    2.27  
    2.28 -# $func   1 ams.pst
    2.29 -# $func   2 sample_64.pst
    2.30 -# $func   3 test.pst
    2.31 -# $func   4 big_mail.pst
    2.32 -# $func   5 mbmg.archive.pst
    2.33 -# $func   6 Single2003-read.pst
    2.34 -# $func   7 Single2003-unread.pst
    2.35 -# $func   8 ol2k3high.pst
    2.36 -# $func   9 ol97high.pst
    2.37 -# $func  10 returned_message.pst
    2.38 -# $func  11 flow.pst
    2.39 -# $func  12 test-html.pst
    2.40 -# $func  13 test-text.pst
    2.41 -# $func  14 joe.romanowski.pst
    2.42 -# $func  15 hourig1.pst
    2.43 -# $func  16 test-mac.pst
    2.44 -# $func  17 backup.pst
    2.45 -# $func  18 spam.pst
    2.46 -# $func  19 rendgen.pst           # single email appointment
    2.47 -# $func  20 rendgen2.pst          # email appointment with no termination date
    2.48 -# $func  21 rendgen3.pst          # mime signed email
    2.49 -  $func  22 rendgen4.pst          # appointment test cases
    2.50 -# $func  23 rendgen5.pst          # appointment test cases
    2.51 -# $func  24 paul.sheer.pst        # embedded rfc822 attachment
    2.52 -# $func  25 jerry.pst             # non ascii subject lines
    2.53 -# $func  26 phill.bertolus.pst    # possible segfault in forked process, cannot reproduce
    2.54 -# $func  27 kaiser.pst            # appointments with other character sets
    2.55 -# $func  28 pstsample.pst         # character set issue
    2.56 -# $func  29 pstsample2.pst        # embedded image in rtf data
    2.57 -# $func  30 pstsample3.pst        # exports of rtf and html
    2.58 -# $func  31 Journal_Archives_08_29_2010.pst
    2.59 +$func   1 ams.pst
    2.60 +$func   2 sample_64.pst
    2.61 +$func   3 test.pst
    2.62 +$func   4 big_mail.pst
    2.63 +$func   5 mbmg.archive.pst
    2.64 +$func   6 Single2003-read.pst
    2.65 +$func   7 Single2003-unread.pst
    2.66 +$func   8 ol2k3high.pst
    2.67 +$func   9 ol97high.pst
    2.68 +$func  10 returned_message.pst
    2.69 +$func  11 flow.pst
    2.70 +$func  12 test-html.pst
    2.71 +$func  13 test-text.pst
    2.72 +$func  14 joe.romanowski.pst
    2.73 +$func  15 hourig1.pst
    2.74 +$func  16 test-mac.pst
    2.75 +$func  17 backup.pst
    2.76 +$func  18 spam.pst
    2.77 +$func  19 rendgen.pst           # single email appointment
    2.78 +$func  20 rendgen2.pst          # email appointment with no termination date
    2.79 +$func  21 rendgen3.pst          # mime signed email
    2.80 +$func  22 rendgen4.pst          # appointment test cases
    2.81 +$func  23 rendgen5.pst          # appointment test cases
    2.82 +$func  24 paul.sheer.pst        # embedded rfc822 attachment
    2.83 +$func  25 jerry.pst             # non ascii subject lines
    2.84 +$func  26 phill.bertolus.pst    # possible segfault in forked process, cannot reproduce
    2.85 +$func  27 kaiser.pst            # appointments with other character sets
    2.86 +$func  28 pstsample.pst         # character set issue
    2.87 +$func  29 pstsample2.pst        # embedded image in rtf data
    2.88 +$func  30 pstsample3.pst        # exports of rtf and html
    2.89 +$func  31 Journal_Archives_08_29_2010.pst
    2.90  
    2.91  [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
    2.92  
     3.1 --- a/src/common.h	Fri Jul 21 21:35:01 2017 -0700
     3.2 +++ b/src/common.h	Mon Nov 20 08:19:28 2017 -0800
     3.3 @@ -9,18 +9,18 @@
     3.4  #include <time.h>
     3.5  
     3.6  
     3.7 -#ifndef  _MSC_VER
     3.8 +#if !defined(_MSC_VER) || (_MSC_VER >= 1800)
     3.9      #include <stdint.h>
    3.10      #include <inttypes.h>
    3.11  #else
    3.12      typedef signed char        int8_t;
    3.13      typedef unsigned char      uint8_t;
    3.14 -	typedef unsigned short     uint16_t;
    3.15 -	typedef short              int16_t;
    3.16 +    typedef unsigned short     uint16_t;
    3.17 +    typedef short              int16_t;
    3.18      typedef unsigned int       uint32_t;
    3.19 -	typedef int                int32_t;
    3.20 -	typedef unsigned long long uint64_t;
    3.21 -	typedef long long          int64_t;
    3.22 +    typedef int                int32_t;
    3.23 +    typedef unsigned long long uint64_t;
    3.24 +    typedef long long          int64_t;
    3.25  #endif
    3.26  
    3.27  #ifndef _WIN32
     4.1 --- a/src/define.h	Fri Jul 21 21:35:01 2017 -0700
     4.2 +++ b/src/define.h	Mon Nov 20 08:19:28 2017 -0800
     4.3 @@ -74,13 +74,12 @@
     4.4      #else
     4.5          #error Only MSC and mingw supported for Windows
     4.6      #endif
     4.7 -    #ifndef __MINGW32__
     4.8 -        #define size_t     __int64
     4.9 -    #endif
    4.10      #ifndef UINT64_MAX
    4.11          #define UINT64_MAX ((uint64_t)0xffffffffffffffff)
    4.12      #endif
    4.13 -    #define PRIx64 "I64x"
    4.14 +    #ifndef PRIx64
    4.15 +        #define PRIx64 "I64x"
    4.16 +    #endif
    4.17      int __cdecl _fseeki64(FILE *, __int64, int);
    4.18      __int64 __cdecl _ftelli64(FILE *);
    4.19  
    4.20 @@ -97,7 +96,7 @@
    4.21      #ifdef __DJGPP__
    4.22          #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
    4.23          #define ctime_r(tp,tmp) (ctime(tp)?(strcpy((tmp),ctime((tp))),(tmp)):0)
    4.24 -		#define fseeko(stream, offset, whence) fseek(stream, (long)offset, whence)
    4.25 +        #define fseeko(stream, offset, whence) fseek(stream, (long)offset, whence)
    4.26          #define ftello ftell
    4.27      #endif
    4.28      #ifdef HAVE_UNISTD_H
    4.29 @@ -151,7 +150,7 @@
    4.30  #define MESSAGEPRINT3(...) pst_debug(3, __LINE__, __FILE__,  __VA_ARGS__)
    4.31  
    4.32  #define WARN(x) {           \
    4.33 -    MESSAGEPRINT3 x;	    \
    4.34 +    MESSAGEPRINT3 x;        \
    4.35      pst_debug_lock();       \
    4.36          printf x;           \
    4.37          fflush(stdout);     \
    4.38 @@ -172,12 +171,12 @@
    4.39  #define DEBUG_ENT(x)                                            \
    4.40      {                                                           \
    4.41        pst_debug_func(1, x);                                      \
    4.42 -      pst_debug(1, __LINE__, __FILE__, "Entering function\n");	 \
    4.43 +      pst_debug(1, __LINE__, __FILE__, "Entering function\n");   \
    4.44      }
    4.45  #define DEBUG_RET()                                             \
    4.46      {                                                           \
    4.47        pst_debug(1, __LINE__, __FILE__, "Leaving function\n");    \
    4.48 -      pst_debug_func_ret(1);					 \
    4.49 +      pst_debug_func_ret(1);                     \
    4.50      }
    4.51  
    4.52  #define DEBUG_INIT(fname,mutex) {pst_debug_init(fname,mutex);}
    4.53 @@ -245,11 +244,11 @@
    4.54                    (((uint8_t const *)(p))[2] << 16) |    \
    4.55                    (((uint8_t const *)(p))[3] << 24))
    4.56  
    4.57 -#define PST_LE_GET_UINT16(p)				  \
    4.58 +#define PST_LE_GET_UINT16(p)                  \
    4.59          (uint16_t)((((uint8_t const *)(p))[0] << 0)  |    \
    4.60                     (((uint8_t const *)(p))[1] << 8))
    4.61  
    4.62 -#define PST_LE_GET_INT16(p)				  \
    4.63 +#define PST_LE_GET_INT16(p)               \
    4.64          (int16_t)((((uint8_t const *)(p))[0] << 0)  |    \
    4.65                     (((uint8_t const *)(p))[1] << 8))
    4.66