From 68f35d55392ec31b486bfcdb4ecaaa75c40ae63d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 5 Jul 2000 08:57:37 +0000 Subject: [PATCH] - fixed handling of fdf data (application/vnd.fdf) --- main/Makefile.in | 2 +- main/SAPI.c | 7 ++++++- main/fdfdata.c | 42 ++++++++++++++++++++++++++++++++++++++++++ main/fdfdata.h | 8 ++++++++ 4 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 main/fdfdata.c create mode 100644 main/fdfdata.h diff --git a/main/Makefile.in b/main/Makefile.in index d334842905..1686bf4bd4 100644 --- a/main/Makefile.in +++ b/main/Makefile.in @@ -4,7 +4,7 @@ LTLIBRARY_SOURCES = \ main.c internal_functions.c snprintf.c php_sprintf.c \ configuration-parser.c configuration-scanner.c \ safe_mode.c fopen-wrappers.c php_realpath.c alloca.c \ - php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \ + php_ini.c SAPI.c rfc1867.c fdfdata.c php_content_types.c strlcpy.c \ strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c php_virtual_cwd.c include $(top_srcdir)/build/ltlib.mk diff --git a/main/SAPI.c b/main/SAPI.c index 5b372f2a50..aaceb4266c 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -28,6 +28,9 @@ #endif #include "rfc1867.h" +#if HAVE_FDFLIB +#include "fdfdata.h" +#endif #ifdef PHP_WIN32 #define STRCASECMP stricmp @@ -35,12 +38,14 @@ #define STRCASECMP strcasecmp #endif +#include "php_content_types.h" SAPI_POST_READER_FUNC(sapi_read_standard_form_data); +SAPI_POST_READER_FUNC(php_default_post_reader); static sapi_post_entry supported_post_entries[] = { #if HAVE_FDFLIB - { "application/vnd.fdf", sizeof("application/vnd.fdf")-1, sapi_read_standard_form_data }, + { "application/vnd.fdf", sizeof("application/vnd.fdf")-1, php_default_post_reader, fdf_post_handler}, #endif { NULL, 0, NULL } }; diff --git a/main/fdfdata.c b/main/fdfdata.c new file mode 100644 index 0000000000..96a78e5aa6 --- /dev/null +++ b/main/fdfdata.c @@ -0,0 +1,42 @@ +/* + +----------------------------------------------------------------------+ + | PHP version 4.0 | + +----------------------------------------------------------------------+ + | Copyright (c) 1997, 1998, 1999, 2000 The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_02.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: Uwe Steinmann | + +----------------------------------------------------------------------+ + */ +/* $Id$ */ + +#include +#include "php.h" +#include "ext/standard/php_standard.h" +#include "zend_globals.h" +#include "php_globals.h" +#include "php_variables.h" +#include "fdfdata.h" + +#if HAVE_FDFLIB +SAPI_POST_HANDLER_FUNC(fdf_post_handler) +{ + zval *array_ptr = (zval *) arg; + +} +#endif + + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ diff --git a/main/fdfdata.h b/main/fdfdata.h new file mode 100644 index 0000000000..7f4f45e261 --- /dev/null +++ b/main/fdfdata.h @@ -0,0 +1,8 @@ +#ifndef FDFDATA_H +#define FDFDATA_H + +#include "SAPI.h" + +SAPI_POST_HANDLER_FUNC(fdf_post_handler); + +#endif /* FDFDATA_H */ -- 2.50.1