# HG changeset patch # User Carl Byington # Date 1302973768 25200 # Node ID 8ad8fd1c5451fc75c816ca1db93b26351dbe9322 # Parent c947b8812120a2f7c152e9d82f9adc3f0d04752d check return codes from forked processes diff -r c947b8812120 -r 8ad8fd1c5451 regression/regression-tests.bash --- a/regression/regression-tests.bash Fri Dec 24 19:26:05 2010 -0800 +++ b/regression/regression-tests.bash Sat Apr 16 10:09:28 2011 -0700 @@ -55,17 +55,17 @@ jobs="" [ -n "$val" ] && jobs="-j 0" rm -rf output$n - if [ -z "$val" ] || [ $size -lt 10000000 ]; then + if [ -z "$val" ] || [ $size -lt 100000000 ]; then echo $fn mkdir output$n if [ "$regression" == "yes" ]; then $val ../src/readpst $jobs -te -r -cv -o output$n $fn >$ba.err 2>&1 else ## only email and include deleted items, have a deleted items folder with multiple item types - $val ../src/readpst $jobs -te -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + #$val ../src/readpst $jobs -te -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## normal recursive dump - #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + $val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## separate mode with filename extensions #$val ../src/readpst $jobs -r -e -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 @@ -119,13 +119,14 @@ #$func 16 test-mac.pst ##$func 17 harris.pst ##$func 18 spam.pst -#$func 19 rendgen.pst # single email appointment -#$func 20 rendgen2.pst # email appointment with no termination date -#$func 21 rendgen3.pst # mime signed email -#$func 22 rendgen4.pst # appointment test cases -#$func 23 rendgen5.pst # appointment test cases -#$func 24 paul.sheer.pst # embedded rfc822 attachment -$func 25 jerry.pst # non ascii subject lines +#$func 19 rendgen.pst # single email appointment +#$func 20 rendgen2.pst # email appointment with no termination date +#$func 21 rendgen3.pst # mime signed email +#$func 22 rendgen4.pst # appointment test cases +#$func 23 rendgen5.pst # appointment test cases +#$func 24 paul.sheer.pst # embedded rfc822 attachment +#$func 25 jerry.pst # non ascii subject lines +$func 26 phill.bertolus.pst # [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 ' diff -r c947b8812120 -r 8ad8fd1c5451 src/Makefile.am --- a/src/Makefile.am Fri Dec 24 19:26:05 2010 -0800 +++ b/src/Makefile.am Sat Apr 16 10:09:28 2011 -0700 @@ -40,7 +40,7 @@ endif noinst_PROGRAMS = deltasearch dumpblocks getidblock -bin_PROGRAMS = lspst readpst pst2ldif +bin_PROGRAMS = lspst readpst pst2ldif nick2ldif if BUILD_DII bin_PROGRAMS += pst2dii endif @@ -51,6 +51,7 @@ deltasearch_SOURCES = deltasearch.cpp $(common_header) dumpblocks_SOURCES = dumpblocks.c $(common_header) getidblock_SOURCES = getidblock.c $(common_header) +nick2ldif_SOURCES = nick2ldif.cpp $(common_header) lspst_DEPENDENCIES = libpst.la @@ -60,6 +61,7 @@ deltasearch_DEPENDENCIES = libpst.la dumpblocks_DEPENDENCIES = libpst.la getidblock_DEPENDENCIES = libpst.la +nick2ldif_DEPENDENCIES = libpst.la if STATIC_TOOLS noinst_LTLIBRARIES = libpst.la @@ -92,8 +94,9 @@ readpst_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) $(REGEXLIB) pst2ldif_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) pst2dii_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) -lgd +deltasearch_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) dumpblocks_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) getidblock_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) -deltasearch_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) +nick2ldif_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) diff -r c947b8812120 -r 8ad8fd1c5451 src/nick2ldif.cpp --- a/src/nick2ldif.cpp Fri Dec 24 19:26:05 2010 -0800 +++ b/src/nick2ldif.cpp Sat Apr 16 10:09:28 2011 -0700 @@ -18,7 +18,7 @@ using namespace std; -int main(int argc, const char** argv) { +int main(int argc, char* const* argv) { char c; char *temp; while ((c = getopt(argc, argv, "b:c:"))!= -1) { @@ -46,6 +46,7 @@ cin.getline(line, LINE_SIZE); int n = strlen(line); if (!n) continue; + if (strncmp(line, "alias", 5) != 0) continue; // not alias char *f = line + 6; // skip alias keyword char *e; if (*f == '"') { @@ -60,11 +61,22 @@ char *m = e+1; while (*m == ' ') m++; if (*m != '\0') { - char cn[1000]; - snprintf(cn, sizeof(cn), "email %s", f); + char cn[1000], givenName[1000], sn[1000]; + snprintf(cn, sizeof(cn), "%s", f); + char *ff = strchr(f, ' '); + if (ff) { + strncpy(givenName, ff+1, sizeof(givenName)-1); + *ff = '\0'; + strncpy(sn, f, sizeof(sn)-1); + } + else { + strcpy(givenName, cn); + strcpy(sn, cn); + } printf("dn: cn=%s, %s\n", cn, ldap_base); printf("cn: %s\n", cn); - printf("sn: %s\n", f); + printf("givenName: %s\n", givenName); + printf("sn: %s\n", sn); printf("mail: %s\n", m); printf("objectClass: %s\n\n", ldap_class); } diff -r c947b8812120 -r 8ad8fd1c5451 src/readpst.c --- a/src/readpst.c Fri Dec 24 19:26:05 2010 -0800 +++ b/src/readpst.c Sat Apr 16 10:09:28 2011 -0700 @@ -156,9 +156,15 @@ //fflush(stdout); int i,j; for (i=0; i