cvs: /php4/ext/aspell aspell.c /php4/ext/cpdf cpdf.c /php4/ext/dav dav.c /php4/ext/db db.c /php4/ext/dba dba.c /php4/ext/domxml domxml.c /php4/ext/fdf
fdf.c /php4/ext/gd gd.c /php4/ext/gettext gettext.c /php4/ext/standard info.c
| From: | Colin Viebrock | Date: | Wed, 05 Apr 2000 22:30:20 +0000 |
| Subject: | cvs: /php4/ext/aspell aspell.c /php4/ext/cpdf cpdf.c /php4/ext/dav dav.c /php4/ext/db db.c /php4/ext/dba dba.c /php4/ext/domxml domxml.c /php4/ext/fdf fdf.c /php4/ext/gd gd.c /php4/ext/gettext gettext.c /php4/ext/standard info.c |
||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13197@lists.php.net to get a copy of this message | ||
cmv Wed Apr 5 15:30:20 2000 EDT
Modified files:
/php4/ext/aspell aspell.c
/php4/ext/cpdf cpdf.c
/php4/ext/dav dav.c
/php4/ext/db db.c
/php4/ext/dba dba.c
/php4/ext/domxml domxml.c
/php4/ext/fdf fdf.c
/php4/ext/gd gd.c
/php4/ext/gettext gettext.c
/php4/ext/standard info.c
Log:
phpinfo() prettying
I will get to the rest of the functions later tonight or tomorrow
(i.e. from hyperwave to snmp)
Index: php4/ext/aspell/aspell.c
diff -u php4/ext/aspell/aspell.c:1.16 php4/ext/aspell/aspell.c:1.17
--- php4/ext/aspell/aspell.c:1.16 Mon Mar 6 10:41:04 2000
+++ php4/ext/aspell/aspell.c Wed Apr 5 15:30:16 2000
@@ -16,9 +16,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id: aspell.c,v 1.16 2000/03/06 18:41:04 ssb Exp $ */
+/* $Id: aspell.c,v 1.17 2000/04/05 22:30:16 cmv Exp $ */
#include "php.h"
+
#if defined(COMPILE_DL)
#include "phpdl.h"
#endif
@@ -30,6 +31,7 @@
#include "php_aspell.h"
#include <aspell-c.h>
+#include "ext/standard/info.h"
function_entry aspell_functions[] = {
PHP_FE(aspell_new, NULL)
@@ -194,8 +196,9 @@
PHP_MINFO_FUNCTION(aspell)
{
- php_printf("ASpell support enabled");
-
+ php_info_print_table_start();
+ php_info_print_table_row(2, "ASpell Support", "enabled");
+ php_info_print_table_end();
}
#endif
Index: php4/ext/cpdf/cpdf.c
diff -u php4/ext/cpdf/cpdf.c:1.11 php4/ext/cpdf/cpdf.c:1.12
--- php4/ext/cpdf/cpdf.c:1.11 Thu Mar 9 06:59:05 2000
+++ php4/ext/cpdf/cpdf.c Wed Apr 5 15:30:16 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: cpdf.c,v 1.11 2000/03/09 14:59:05 steinm Exp $ */
+/* $Id: cpdf.c,v 1.12 2000/04/05 22:30:16 cmv Exp $ */
/* cpdflib.h -- C language API definitions for ClibPDF library
* Copyright (C) 1998 FastIO Systems, All Rights Reserved.
*/
@@ -42,7 +42,6 @@
#include "php_globals.h"
#include "ext/standard/php_standard.h"
#include "ext/standard/head.h"
-#include "ext/standard/info.h"
#include <math.h>
#if HAVE_LIBGD13
#include <gd.h>
@@ -58,6 +57,7 @@
#if HAVE_CPDFLIB
#include "php_cpdf.h"
+#include "ext/standard/info.h"
#ifdef THREAD_SAFE
DWORD CPDFlibTls;
@@ -187,7 +187,11 @@
PHP_MINFO_FUNCTION(cpdf) {
/* need to use a PHPAPI function here because it is external module in windows */
- php_printf("Version %s", cpdf_version());
+ /* (don't knwo if that still applies (cmv) */
+ php_info_print_table_start();
+ php_info_print_table_row(2, "CPDF Support", "enabled");
+ php_info_print_table_row(2, "Version", cpdf_version() );
+ php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(cpdf){
Index: php4/ext/dav/dav.c
diff -u php4/ext/dav/dav.c:1.14 php4/ext/dav/dav.c:1.15
--- php4/ext/dav/dav.c:1.14 Mon Mar 6 10:41:04 2000
+++ php4/ext/dav/dav.c Wed Apr 5 15:30:16 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dav.c,v 1.14 2000/03/06 18:41:04 ssb Exp $ */
+/* $Id: dav.c,v 1.15 2000/04/05 22:30:16 cmv Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
@@ -36,6 +36,7 @@
#if HAVE_MOD_DAV
# include "mod_dav.h"
+#include "ext/standard/info.h"
/* {{{ thread safety stuff */
@@ -158,6 +159,9 @@
PHP_MINFO_FUNCTION(phpdav);
{
+ php_info_print_table_start();
+ php_info_print_table_row(2, "DAV Support", "enabled");
+ php_info_print_table_end();
}
/* {{{ extension-internal functions */
Index: php4/ext/db/db.c
diff -u php4/ext/db/db.c:1.27 php4/ext/db/db.c:1.28
--- php4/ext/db/db.c:1.27 Thu Mar 30 14:56:31 2000
+++ php4/ext/db/db.c Wed Apr 5 15:30:16 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: db.c,v 1.27 2000/03/30 22:56:31 andi Exp $ */
+/* $Id: db.c,v 1.28 2000/04/05 22:30:16 cmv Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
# include "dl/phpdl.h"
@@ -30,6 +30,7 @@
#include "safe_mode.h"
#include "fopen-wrappers.h"
#include "ext/standard/flock_compat.h"
+#include "ext/standard/info.h"
#include <stdlib.h>
#include <string.h>
@@ -230,7 +231,10 @@
PHP_MINFO_FUNCTION(db)
{
+ /* this isn't pretty ... should break out the info a bit more (cmv) */
+ php_info_print_box_start(0);
php_printf(php_get_info_db());
+ php_info_print_box_end();
}
PHP_FUNCTION(dblist)
Index: php4/ext/dba/dba.c
diff -u php4/ext/dba/dba.c:1.13 php4/ext/dba/dba.c:1.14
--- php4/ext/dba/dba.c:1.13 Mon Mar 6 10:41:05 2000
+++ php4/ext/dba/dba.c Wed Apr 5 15:30:17 2000
@@ -27,13 +27,14 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dba.c,v 1.13 2000/03/06 18:41:05 ssb Exp $ */
+/* $Id: dba.c,v 1.14 2000/04/05 22:30:17 cmv Exp $ */
#include "php.h"
#if HAVE_DBA
#include "php_dba.h"
+#include "ext/standard/info.h"
#include "php_gdbm.h"
#include "php_ndbm.h"
@@ -197,13 +198,16 @@
static PHP_MINFO_FUNCTION(dba)
{
+ /* could be prettier (cmv) */
+ php_info_print_box_start();
dba_handler *hptr;
- PUTS("V1 ($Id: dba.c,v 1.13 2000/03/06 18:41:05 ssb Exp $)");
+ PUTS("V1 ($Id: dba.c,v 1.14 2000/04/05 22:30:17 cmv Exp $)");
for(hptr = handler; hptr->name; hptr++) {
PUTS(" ");
PUTS(hptr->name);
}
+ php_info_print_box_end();
}
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
Index: php4/ext/domxml/domxml.c
diff -u php4/ext/domxml/domxml.c:1.33 php4/ext/domxml/domxml.c:1.34
--- php4/ext/domxml/domxml.c:1.33 Tue Apr 4 09:03:39 2000
+++ php4/ext/domxml/domxml.c Wed Apr 5 15:30:17 2000
@@ -16,13 +16,14 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domxml.c,v 1.33 2000/04/04 16:03:39 steinm Exp $ */
+/* $Id: domxml.c,v 1.34 2000/04/05 22:30:17 cmv Exp $ */
#include "php.h"
#include "php_domxml.h"
#if HAVE_DOMXML
+#include "ext/standard/info.h"
//#define newcode
static int le_domxmldocp;
@@ -313,9 +314,11 @@
PHP_MINFO_FUNCTION(domxml)
{
- PUTS("DOM/XML support active (compiled with libxml ");
-// php_printf("%s", LIBXML_VERSION);
- PUTS(".)");
+ /* don't know why that line was commented out in the previous version, so i left it (cmv) */
+ php_info_print_table_start();
+ php_info_print_table_row(2, "DOM/XML Support", "enabled");
+// php_info_print_table_row(2, "libmxl Version", LIBXML_VERSION );
+ php_info_print_table_end();
}
/* {{{ proto string domxml_attrname([int dir_handle])
Index: php4/ext/fdf/fdf.c
diff -u php4/ext/fdf/fdf.c:1.19 php4/ext/fdf/fdf.c:1.20
--- php4/ext/fdf/fdf.c:1.19 Sat Feb 19 15:21:28 2000
+++ php4/ext/fdf/fdf.c Wed Apr 5 15:30:18 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fdf.c,v 1.19 2000/02/19 23:21:28 zeev Exp $ */
+/* $Id: fdf.c,v 1.20 2000/04/05 22:30:18 cmv Exp $ */
/* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html.
*/
@@ -61,6 +61,8 @@
#if HAVE_FDFLIB
+#include "ext/standard/info.h"
+
#ifdef THREAD_SAFE
DWORD FDFlibTls;
static int numthreads=0;
@@ -123,7 +125,10 @@
PHP_MINFO_FUNCTION(fdf)
{
/* need to use a PHPAPI function here because it is external module in windows */
- php_printf("FdfTk Version %s", FDFGetVersion());
+ php_info_print_table_start();
+ php_info_print_table_row(2, "FDF Support", "enabled");
+ php_info_print_table_row(2, "FdfTk Version", FDFGetVersion() );
+ php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(fdf)
Index: php4/ext/gd/gd.c
diff -u php4/ext/gd/gd.c:1.47 php4/ext/gd/gd.c:1.48
--- php4/ext/gd/gd.c:1.47 Thu Mar 30 14:56:32 2000
+++ php4/ext/gd/gd.c Wed Apr 5 15:30:18 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.47 2000/03/30 22:56:32 andi Exp $ */
+/* $Id: gd.c,v 1.48 2000/04/05 22:30:18 cmv Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -43,6 +43,9 @@
#endif
#if HAVE_LIBGD
+
+#include "ext/standard/info.h"
+
#include <gd.h>
#include <gdfontt.h> /* 1 Tiny font */
#include <gdfonts.h> /* 2 Small font */
@@ -221,34 +224,39 @@
PHP_MINFO_FUNCTION(gd)
{
+ php_info_print_table_start();
+ php_info_print_table_row(2, "GD Support", "enabled");
+
/* need to use a PHPAPI function here because it is external module in windows */
+
#if HAVE_GDIMAGECOLORRESOLVE
- php_printf("Version 1.6.2 or higher");
+ php_info_print_table_row(2, "GD Version", "1.6.2 or higher");
#elif HAVE_LIBGD13
- php_printf("Version between 1.3 and 1.6.1");
+ php_info_print_table_row(2, "GD Version", "between 1.3 and 1.6.1");
#else
- php_printf("Version 1.2");
+ php_info_print_table_row(2, "GD Version", "1.2");
#endif
#ifdef ENABLE_GD_TTF
- php_printf(" with FreeType support");
+ php_info_print_table_row(2, "FreeType Support", "enabled");
#if HAVE_LIBFREETYPE
- php_printf(" (linked with freetype)");
+ php_info_print_table_row(2, "FreeType Linkage", "with freetype");
#elif HAVE_LIBTTF
- php_printf(" (linked with ttf library)");
+ php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
#else
- php_printf(" (linked with unknown library)");
+ php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
#endif
#endif
+
+/* this next part is stupid ... if I knew better, I'd put them all on one row (cmv) */
- php_printf(" which supports:");
-
#ifdef HAVE_GD_GIF
- php_printf(" GIF");
+ php_info_print_table_row(2, "GIF Support", "enabled);
#endif
#ifdef HAVE_GD_PNG
- php_printf(" PNG");
+ php_info_print_table_row(2, "PNG Support", "enabled);
#endif
+ php_info_print_table_end();
}
/* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */
Index: php4/ext/gettext/gettext.c
diff -u php4/ext/gettext/gettext.c:1.15 php4/ext/gettext/gettext.c:1.16
--- php4/ext/gettext/gettext.c:1.15 Sun Mar 19 15:39:05 2000
+++ php4/ext/gettext/gettext.c Wed Apr 5 15:30:19 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gettext.c,v 1.15 2000/03/19 23:39:05 chagenbu Exp $ */
+/* $Id: gettext.c,v 1.16 2000/04/05 22:30:19 cmv Exp $ */
#include <stdio.h>
#include "php.h"
@@ -25,6 +25,7 @@
#if HAVE_LIBINTL
#include <libintl.h>
+#include "ext/standard/info.h"
function_entry php_gettext_functions[] = {
PHP_FE(textdomain, NULL)
@@ -42,7 +43,9 @@
PHP_MINFO_FUNCTION(gettext)
{
- php_printf("GNU gettext support active.");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "GNU GetText Support", "enabled");
+ php_info_print_table_end();
}
/* {{{ proto string textdomain(string domain)
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.75 php4/ext/standard/info.c:1.76
--- php4/ext/standard/info.c:1.75 Wed Apr 5 14:03:30 2000
+++ php4/ext/standard/info.c Wed Apr 5 15:30:19 2000
@@ -193,7 +193,7 @@
}
PUTS("?=PHPE9568F35-D428-11d2-A769-00AA001ACF42\" border=\"0\"
align=\"right\"></a>\n");
}
- php_printf("This program makes use of the Zend scripting language
engine:<br><pre>%s</pre>", get_zend_version());
+ php_printf("This program makes use of the Zend scripting language
engine:<BR>%s<BR>\n", get_zend_version());
php_info_print_box_end();
}