Huge patch to update the hyperwave and pdflib module.

Only pdflib >2.0 is supported.
None is tested yet. Hyperwave seems to be broken now.
This commit is contained in:
Uwe Steinmann 1999-08-05 16:25:10 +00:00
parent 48c3643753
commit d172a6b581
8 changed files with 2091 additions and 758 deletions

View File

@ -198,6 +198,12 @@ PHP_MSHUTDOWN_FUNCTION(gd)
return SUCCESS;
}
/* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */
PHPAPI int phpi_get_le_gd(void){
GD_TLS_VARS;
return GD_GLOBAL(le_gd);
}
/********************************************************************/
/* gdImageColorResolve is a replacement for the old fragment: */
/* */

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
| Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+----------------------------------------------------------------------+
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
@ -36,7 +36,7 @@
#define F_DISTRIBUTED 0x80000000
#define F_COMPRESSED 0x40000000
#define F_VERSION 0x00003fff
#define VERSION 717L /* 7.05 */
#define HW_VERSION 717L /* 7.17 */
#define HEADER_LENGTH 12
@ -53,6 +53,7 @@
#define GETANCHORS_MESSAGE 8
#define GETOBJBYQUERY_MESSAGE 9
#define GETOBJBYQUERYCOLL_MESSAGE 10
#define OBJECTBYIDQUERY_MESSAGE 11
#define GETTEXT_MESSAGE 12
#define INSDOC_MESSAGE 14
#define INSCOLL_MESSAGE 17
@ -88,6 +89,18 @@
#define DOCUMENT 0
#define COLLECTION 1
#if WIN32|WINNT
# define SOCK_ERR INVALID_SOCKET
# define SOCK_CONN_ERR SOCKET_ERROR
# define HWSOCK_FCLOSE(s) closesocket(s)
#else
# define SOCK_ERR -1
# define SOCK_CONN_ERR -1
# define HWSOCK_FCLOSE(s) close(s)
#endif
/* Low error messages */
#define LE_MALLOC -1
@ -132,9 +145,9 @@ typedef struct {
typedef int hw_objectID;
typedef char hw_objrec;
void set_swap(int do_swap);
extern void set_swap(int do_swap);
extern int open_hg_connection(char *server_name, int port);
void close_hg_connection(int sockfd);
extern void close_hg_connection(int sockfd);
extern int initialize_hg_connection(int sockfd, int *do_swap, int *version, char **userdata, char **server_string, char *username, char *password);
extern int send_ready(int sockfd);
@ -150,10 +163,12 @@ extern int getrellink(int sockfd, int rootID, int thisID, int destID, char **rel
extern int send_deleteobject(int sockfd, hw_objectID objectID);
extern int send_changeobject(int sockfd, hw_objectID objectID, char *mod);
extern int send_groupchangeobject(int sockfd, hw_objectID objectID, char *mod);
extern int send_getobject(int sockfd, hw_objectID objectID, char **attributes);
extern int send_getandlock(int sockfd, hw_objectID objectID, char **attributes);
extern int send_lock(int sockfd, hw_objectID objectID);
extern int send_unlock(int sockfd, hw_objectID objectID);
extern int send_gettext(int sockfd, hw_objectID objectID, int mode, int rootid, char **objattr, char **bodytag, char **text, int *count);
extern int send_gettext(int sockfd, hw_objectID objectID, int mode, int rootid, char **objattr, char **bodytag, char **text, int *count, char *urlprefix);
extern int send_edittext(int sockfd, char *objattr, char *text);
extern int send_getcgi(int sockfd, hw_objectID objectID, char *cgi_env_str, char **objattr, char **text, int *count);
extern int send_getremote(int sockfd, hw_objectID objectID, char **objattr, char **text, int *count);
@ -168,6 +183,7 @@ extern int send_getchilddoccoll(int sockfd, hw_objectID objectID, hw_objectID **
extern int send_getchilddoccollobj(int sockfd, hw_objectID objectID, hw_objrec ***childrec, int *count);
extern int send_getanchors(int sockfd, hw_objectID objectID, hw_objectID **anchorIDs, int *count);
extern int send_getanchorsobj(int sockfd, hw_objectID objectID, char ***childrec, int *count);
extern int send_objectbyidquery(int sockfd, hw_objectID *IDs, int *count, char *query, char ***objrecs);
extern int send_getobjbyquery(int sockfd, char *query, int maxhits, hw_objectID **childIDs, int *count);
extern int send_getobjbyqueryobj(int sockfd, char *query, int maxhits, char ***childrec, int *count);
extern int send_getobjbyquerycoll(int sockfd, hw_objectID collID, char *query, int maxhits, hw_objectID **childIDs, int *count);
@ -176,9 +192,9 @@ extern int send_identify(int sockfd, char *name, char *passwd, char **userdata);
extern int send_getparents(int sockfd, hw_objectID objectID, hw_objectID **childIDs, int *count);
extern int send_children(int sockfd, hw_objectID objectID, hw_objectID **childIDs, int *count);
extern int send_getparentsobj(int sockfd, hw_objectID objectID, char ***childrec, int *count);
extern int send_pipedocument(int sockfd, char *hostname, hw_objectID objectID, int mode, int rootid, char** objattr, char **bodytag, char **text, int *count);
extern int send_pipedocument(int sockfd, char *hostname, hw_objectID objectID, int mode, int rootid, char** objattr, char **bodytag, char **text, int *count, char *urlprefix);
extern int send_pipecgi(int sockfd, char *host, hw_objectID objectID, char *cgi_env_str, char **objattr, char **text, int *count);
extern int send_putdocument(int sockfd, char *hostname, hw_objectID objectID, char *objectRec, char *text, int count);
extern int send_putdocument(int sockfd, char *hostname, hw_objectID parentID, char *objectRec, char *text, int count, hw_objectID *objectID);
extern int send_inscoll(int sockfd, hw_objectID objectID, char *objrec, hw_objectID *new_objectID);
extern int send_insertobject(int sockfd, char *objrec, char *parms, hw_objectID *objectID);
extern int send_insdoc(int sockfd, hw_objectID objectID, char *objrec, char *text, hw_objectID *new_objectID);

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
| Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+----------------------------------------------------------------------+
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |

View File

@ -1,30 +1,54 @@
dnl $Id$
AC_MSG_CHECKING(whether to include pdflib support)
AC_MSG_CHECKING(whether to include Pdflib 2.0 support)
AC_ARG_WITH(pdflib,
[ --with-pdflib[=DIR] Include pdflib support (tested with 0.6).
[ --with-pdflib[=DIR] Include pdflib 2.0 support.
DIR is the pdflib install directory,
defaults to /usr/local.],
[
echo $withval
case "$withval" in
no)
AC_MSG_RESULT(no) ;;
yes)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf)
AC_CHECK_LIB(pdf, PDF_open, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 0.6.)])
AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 2.0.)])
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"
;;
*)
test -f $withval/include/pdf.h && PDFLIB_INCLUDE="-I$withval/include"
test -f $withval/include/pdflib.h && PDFLIB_INCLUDE="-I$withval/include"
if test -n "$PDFLIB_INCLUDE" ; then
AC_MSG_RESULT(yes)
PHP_EXTENSION(pdf)
old_LIBS=$LIBS
if test -z $ZLIB_LIBS; then
old_withval=$withval
AC_MSG_CHECKING([for zlib (needed by pdflib 2.0)])
AC_ARG_WITH(zlib-dir,
[ --with-zlib-dir[=DIR] zlib dir for pdflib 2.0 or include zlib support],[
AC_MSG_RESULT( )
if test -z $withval; then
withval="/usr/local"
fi
LIBS="$LIBS -L$withval/lib -lz"
AC_CHECK_LIB(z,deflate, [PDFLIB_LIBS="-L$withval/lib -lz"],[AC_MSG_RESULT(no)],)
],[
AC_MSG_RESULT(no)
AC_MSG_WARN(If configure fails try --with-zlib=<DIR>)
])
else
echo "checking for libz needed by pdflib 2.0... already zlib support"
PDFLIB_LIBS="$ZLIB_LIBS"
LIBS="$LIBS $ZLIB_LIBS"
fi
withval=$old_withval
LIBS="$LIBS -L$withval/lib"
AC_CHECK_LIB(pdf, PDF_open, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-L$withval/lib -lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 0.6.)])
AC_CHECK_LIB(pdf, PDF_close, [AC_DEFINE(HAVE_PDFLIB) PDFLIB_LIBS="-L$withval/lib -lpdf"],
[AC_MSG_ERROR(pdflib extension requires pdflib 2.0.)])
LIBS=$old_LIBS
EXTRA_LIBS="$EXTRA_LIBS $PDFLIB_LIBS"
INCLUDES="$INCLUDES $PDFLIB_INCLUDE"

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP HTML Embedded Scripting Language Version 3.0 |
+----------------------------------------------------------------------+
| Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
| Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
+----------------------------------------------------------------------+
| This program is free software; you can redistribute it and/or modify |
| it under the terms of one of the following licenses: |
@ -33,17 +33,16 @@
#if HAVE_PDFLIB
#include <pdf.h>
#include <pdflib.h>
extern int le_fp;
extern php3_module_entry pdf_module_entry;
#define pdf_module_ptr &pdf_module_entry
void php3_info_pdf(ZEND_MODULE_INFO_FUNC_ARGS);
extern int php3_minit_pdf(INIT_FUNC_ARGS);
extern PHP_MINFO_FUNCTION(pdf);
extern PHP_MINIT_FUNCTION(pdf);
extern int php3_mend_pdf(void);
PHP_FUNCTION(pdf_get_info);
PHP_FUNCTION(pdf_set_info_creator);
PHP_FUNCTION(pdf_set_info_title);
PHP_FUNCTION(pdf_set_info_subject);
@ -100,10 +99,24 @@ PHP_FUNCTION(pdf_setrgbcolor);
PHP_FUNCTION(pdf_add_outline);
PHP_FUNCTION(pdf_set_transition);
PHP_FUNCTION(pdf_set_duration);
PHP_FUNCTION(pdf_open_jpeg);
#if HAVE_LIBGD13
PHP_FUNCTION(pdf_open_memory_image);
#endif
PHP_FUNCTION(pdf_open_gif);
PHP_FUNCTION(pdf_close_image);
PHP_FUNCTION(pdf_place_image);
PHP_FUNCTION(pdf_put_image);
PHP_FUNCTION(pdf_execute_image);
PHP_FUNCTION(pdf_add_weblink);
PHP_FUNCTION(pdf_add_pdflink);
PHP_FUNCTION(pdf_add_annotation);
PHP_FUNCTION(pdf_set_border_style);
PHP_FUNCTION(pdf_set_border_color);
PHP_FUNCTION(pdf_get_image_width);
PHP_FUNCTION(pdf_get_image_height);
#else
#define pdf_module_ptr NULL
#endif
#define phpext_pdf_ptr pdf_module_ptr
#endif /* _PHP3_PDF_H */