]> granicus.if.org Git - php/commitdiff
- fix to work with new version of FdfTk
authorUwe Steinmann <steinm@php.net>
Wed, 6 Oct 1999 05:23:28 +0000 (05:23 +0000)
committerUwe Steinmann <steinm@php.net>
Wed, 6 Oct 1999 05:23:28 +0000 (05:23 +0000)
ext/fdf/config.m4
ext/fdf/fdf.c

index 8aa92f29c79dc769c402ee32b85c14c33c40c63b..594d64a4fb5fb9415cba36a583e23955cb42025e 100644 (file)
@@ -18,7 +18,7 @@ AC_ARG_WITH(fdftk,
       ],[AC_MSG_ERROR(fdftk module requires fdftk 2.0)])
       ;;
     *)
-      test -f $withval/include/Fdftk.h && FDFLIB_INCLUDE="-I$withval/include"
+      test -f $withval/include/FdfTk.h && FDFLIB_INCLUDE="-I$withval/include"
       if test -n "$FDFLIB_INCLUDE" ; then
         AC_MSG_RESULT(yes)
         PHP_EXTENSION(fdf)
index 6417ce1789935c443ccf55b2d8e728e0d17747e6..e96ae4858b8a8db079bdbfde84f1e9de80a30434 100644 (file)
@@ -217,6 +217,13 @@ PHP_FUNCTION(fdf_get_value) {
        err = FDFGetValue(fdf, arg2->value.str.val, NULL, 0, &nr);
        if(err != FDFErcOK)
                printf("Aiii, error\n");
+  /* In the inofficial version of FdfTK 4.0 (as FDFGetVersion says. The
+     library has a name with version 3.0, don't know what adobe has in
+     mind) the number of bytes of the value doesn't include the trailing
+     '\0'. This was not the case in 2.0
+  */
+       if(strcmp(FDFGetVersion(), "2.0"))
+               nr++;
        buffer = emalloc(nr);
        err = FDFGetValue(fdf, arg2->value.str.val, buffer, nr, &nr);
        if(err != FDFErcOK)