cvs: /php4/ext/interbase interbase.c /php4/ext/msql php_msql.c /php4/ext/mssql php_mssql.c /php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c
/php4/ext/odbc php_odbc.c velocis.c /php4/ext/oracle oracle.c /php4/ext/pcre php_pcre.c /php4/ext/pdf pdf.c /php4/ext/recode recode.c
/php4/ext/session session.c /php4/ext/snmp snmp.c /php4/ext/sybase sybase.c /php4/ext/sybase_ct php_sybase_ct.c
| From: | Colin Viebrock | Date: | Thu, 06 Apr 2000 21:07:45 +0000 |
| Subject: | cvs: /php4/ext/interbase interbase.c /php4/ext/msql php_msql.c /php4/ext/mssql php_mssql.c /php4/ext/mysql php_mysql.c /php4/ext/oci8 oci8.c /php4/ext/odbc php_odbc.c velocis.c /php4/ext/oracle oracle.c /php4/ext/pcre php_pcre.c /php4/ext/pdf pdf.c /php4/ext/recode recode.c /php4/ext/session session.c /php4/ext/snmp snmp.c /php4/ext/sybase sybase.c /php4/ext/sybase_ct php_sybase_ct.c |
||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13252@lists.php.net to get a copy of this message | ||
cmv Thu Apr 6 14:07:45 2000 EDT
Modified files:
/php4/ext/interbase interbase.c
/php4/ext/msql php_msql.c
/php4/ext/mssql php_mssql.c
/php4/ext/mysql php_mysql.c
/php4/ext/oci8 oci8.c
/php4/ext/odbc php_odbc.c velocis.c
/php4/ext/oracle oracle.c
/php4/ext/pcre php_pcre.c
/php4/ext/pdf pdf.c
/php4/ext/recode recode.c
/php4/ext/session session.c
/php4/ext/snmp snmp.c
/php4/ext/sybase sybase.c
/php4/ext/sybase_ct php_sybase_ct.c
Log:
phpinfo() prettying
Index: php4/ext/interbase/interbase.c
diff -u php4/ext/interbase/interbase.c:1.19 php4/ext/interbase/interbase.c:1.20
--- php4/ext/interbase/interbase.c:1.19 Thu Apr 6 10:01:41 2000
+++ php4/ext/interbase/interbase.c Thu Apr 6 14:07:39 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.19 2000/04/06 17:01:41 cmv Exp $ */
+/* $Id: interbase.c,v 1.20 2000/04/06 21:07:39 cmv Exp $ */
/* TODO: Arrays, roles?
@@ -512,30 +512,32 @@
PHP_MINFO_FUNCTION(ibase)
{
- char tmp[128];
+ char tmp[32];
IBLS_FETCH();
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.19 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.20 $");
#ifdef COMPILE_DL
php_info_print_table_row(2, "Dynamic Module", "yes");
#endif
php_info_print_table_row(2, "Allow Persistent Links",
(IBG(allow_persistent)?"Yes":"No") );
if (IBG(max_persistent) == -1) {
- snprintf(tmp, 128, "%d/unlimited", IBG(num_persistent));
+ snprintf(tmp, 31, "%d/unlimited", IBG(num_persistent));
} else {
- snprintf(tmp, 128, "%d/%ld", IBG(num_persistent), IBG(max_persistent));
+ snprintf(tmp, 31, "%d/%ld", IBG(num_persistent), IBG(max_persistent));
}
+ tmp[31]=0;
php_info_print_table_row(2, "Persistent Links", tmp );
if (IBG(max_links) == -1) {
- snprintf(tmp, 128, "%d/unlimited", IBG(num_links));
+ snprintf(tmp, 31, "%d/unlimited", IBG(num_links));
} else {
- snprintf(tmp, 128, "%d/%ld", IBG(num_links), IBG(max_links));
+ snprintf(tmp, 31, "%d/%ld", IBG(num_links), IBG(max_links));
}
+ tmp[31]=0;
php_info_print_table_row(2, "Total Links", tmp );
php_info_print_table_row(2, "Time Format", IBG(timeformat) );
Index: php4/ext/msql/php_msql.c
diff -u php4/ext/msql/php_msql.c:1.12 php4/ext/msql/php_msql.c:1.13
--- php4/ext/msql/php_msql.c:1.12 Mon Mar 6 10:41:12 2000
+++ php4/ext/msql/php_msql.c Thu Apr 6 14:07:39 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_msql.c,v 1.12 2000/03/06 18:41:12 ssb Exp $ */
+/* $Id: php_msql.c,v 1.13 2000/04/06 21:07:39 cmv Exp $ */
#include "php.h"
#if COMPILE_DL
@@ -25,6 +25,7 @@
#endif
#include "php_msql.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/info.h"
#include "php_globals.h"
#if HAVE_MSQL
@@ -186,28 +187,29 @@
DLEXPORT PHP_MINFO_FUNCTION(msql)
{
- char maxp[16],maxl[16];
+ char maxp[32],maxl[32];
if (msql_globals.max_persistent==-1) {
- strcpy(maxp,"Unlimited");
+ snprintf(maxp, 31, "%d/unlimited", msql_globals.num_persistent );
} else {
- snprintf(maxp,15,"%ld",msql_globals.max_persistent);
- maxp[15]=0;
+ snprintf(maxp, 31, "%d/%ld", msql_globals.num_persistent, msql_globals.max_persistent);
}
+ maxp[31]=0;
+
if (msql_globals.max_links==-1) {
- strcpy(maxl,"Unlimited");
+ snprintf(maxl, 15, "%d/unlimited", msql_globals.num_links );
} else {
- snprintf(maxl,15,"%ld",msql_globals.max_links);
- maxl[15]=0;
+ snprintf(maxl, 15, "%d/%ld", msql_globals.num_links, msql_globals.max_links);
}
- php_printf("<table>"
- "<tr><td>Allow persistent
links:</td><td>%s</td></tr>\n"
- "<tr><td>Persistent
links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>Total links:</td><td>%d/%s</td></tr>\n"
- "</table>\n",
- (msql_globals.allow_persistent?"Yes":"No"),
- msql_globals.num_persistent,maxp,
- msql_globals.num_links,maxl);
+ maxl[31]=0;
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "MSQL Support", "enabled" );
+ php_info_print_table_row(2, "Allow Persistent Links",
(msql_globals.allow_persistent?"yes":"no") );
+ php_info_print_table_row(2, "Persistent Links", maxp );
+ php_info_print_table_row(2, "Total Links", maxl );
+ php_info_print_table_end();
+
}
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.13 php4/ext/mssql/php_mssql.c:1.14
--- php4/ext/mssql/php_mssql.c:1.13 Tue Mar 28 09:03:32 2000
+++ php4/ext/mssql/php_mssql.c Thu Apr 6 14:07:39 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.13 2000/03/28 17:03:32 eschmid Exp $ */
+/* $Id: php_mssql.c,v 1.14 2000/04/06 21:07:39 cmv Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
@@ -26,6 +26,7 @@
#include "php.h"
#include "php_globals.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/info.h"
#include "php_mssql.h"
#include "php_ini.h"
@@ -271,10 +272,8 @@
char buf[32];
MSSQLLS_FETCH();
- DISPLAY_INI_ENTRIES();
-
- php_printf("<table border=5 width=\"600\">");
- php_info_print_table_header(2, "Key", "Value");
+ php_info_print_table_start();
+ php_info_print_table_header(2, "MSSQL Support", "enabled");
sprintf(buf, "%ld", MS_SQL_G(num_persistent));
php_info_print_table_row(2, "Active Persistent Links", buf);
@@ -282,7 +281,10 @@
php_info_print_table_row(2, "Active Links", buf);
php_info_print_table_row(2, "Library version", MSSQL_VERSION);
- php_printf("</table>\n");
+ php_info_print_table_end();
+
+ DISPLAY_INI_ENTRIES();
+
}
void php_mssql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.39 php4/ext/mysql/php_mysql.c:1.40
--- php4/ext/mysql/php_mysql.c:1.39 Wed Apr 5 13:18:58 2000
+++ php4/ext/mysql/php_mysql.c Thu Apr 6 14:07:39 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.39 2000/04/05 20:18:58 cmv Exp $ */
+/* $Id: php_mysql.c,v 1.40 2000/04/06 21:07:39 cmv Exp $ */
/* TODO:
@@ -291,10 +291,8 @@
char buf[32];
MySLS_FETCH();
- DISPLAY_INI_ENTRIES();
-
php_info_print_table_start();
- php_info_print_table_header(2, "Key", "Value");
+ php_info_print_table_header(2, "MySQL Support", "enabled");
sprintf(buf, "%ld", MySG(num_persistent));
php_info_print_table_row(2, "Active Persistent Links", buf);
sprintf(buf, "%ld", MySG(num_links));
@@ -306,6 +304,9 @@
php_info_print_table_row(2, "MYSQL_LIBS", PHP_MYSQL_LIBS);
#endif
php_info_print_table_end();
+
+ DISPLAY_INI_ENTRIES();
+
}
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.68 php4/ext/oci8/oci8.c:1.69
--- php4/ext/oci8/oci8.c:1.68 Tue Mar 14 13:47:47 2000
+++ php4/ext/oci8/oci8.c Thu Apr 6 14:07:40 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.68 2000/03/14 21:47:47 eschmid Exp $ */
+/* $Id: oci8.c,v 1.69 2000/04/06 21:07:40 cmv Exp $ */
/* TODO list:
*
@@ -55,6 +55,7 @@
#include "php.h"
#include "ext/standard/head.h"
+#include "ext/standard/info.h"
#if HAVE_OCI8
@@ -490,12 +491,16 @@
PHP_MINFO_FUNCTION(oci)
{
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "OCI8 Support", "enabled");
#if !(WIN32|WINNT)
- php_printf("Oracle version: %s<br>\n"
- "Compile-time ORACLE_HOME: %s<br>\n"
- "Libraries used: %s",
- PHP_ORACLE_VERSION, PHP_ORACLE_HOME, PHP_ORACLE_LIBS);
+ php_info_print_table_row(2, "Oracle Version", PHP_ORACLE_VERSION );
+ php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_ORACLE_HOME );
+ php_info_print_table_row(2, "Libraries Used", PHP_ORACLE_LIBS );
#endif
+ php_info_print_table_end();
+
}
/* }}} */
Index: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.39 php4/ext/odbc/php_odbc.c:1.40
--- php4/ext/odbc/php_odbc.c:1.39 Mon Mar 13 21:15:33 2000
+++ php4/ext/odbc/php_odbc.c Thu Apr 6 14:07:40 2000
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.39 2000/03/14 05:15:33 andi Exp $ */
+/* $Id: php_odbc.c,v 1.40 2000/04/06 21:07:40 cmv Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
@@ -435,10 +435,8 @@
char buf[32];
ODBCLS_FETCH();
- DISPLAY_INI_ENTRIES();
-
- php_printf("<table border=5 width=\"600\">");
- php_info_print_table_header(2, "Key", "Value");
+ php_info_print_table_start();
+ php_info_print_table_header(2, "ODBC Support", "enabled");
sprintf(buf, "%ld", ODBCG(num_persistent));
php_info_print_table_row(2, "Active Persistent Links", buf);
sprintf(buf, "%ld", ODBCG(num_links));
@@ -449,7 +447,10 @@
php_info_print_table_row(2, "ODBC_LFLAGS", PHP_ODBC_LFLAGS);
php_info_print_table_row(2, "ODBC_LIBS", PHP_ODBC_LIBS);
#endif
- php_printf("</table>\n");
+ php_info_print_table_end();
+
+ DISPLAY_INI_ENTRIES();
+
}
#if defined ( HAVE_IBMDB2 ) || defined ( HAVE_UNIXODBC )
Index: php4/ext/odbc/velocis.c
diff -u php4/ext/odbc/velocis.c:1.15 php4/ext/odbc/velocis.c:1.16
--- php4/ext/odbc/velocis.c:1.15 Mon Mar 6 10:41:13 2000
+++ php4/ext/odbc/velocis.c Thu Apr 6 14:07:40 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: velocis.c,v 1.15 2000/03/06 18:41:13 ssb Exp $ */
+/* $Id: velocis.c,v 1.16 2000/04/06 21:07:40 cmv Exp $ */
/*
* TODO:
@@ -42,6 +42,7 @@
#ifdef HAVE_VELOCIS
#include "php_velocis.h"
+#include "ext/standard/info.h"
function_entry velocis_functions[] = {
PHP_FE(velocis_connect, NULL)
@@ -115,7 +116,9 @@
PHP_MINFO_FUNCTION(velocis)
{
- php_printf("RAIMA Velocis Support Active");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "RAIMA Velocis Support", "enabled" );
+ php_info_print_table_end();
}
PHP_MSHUTDOWN_FUNCTION(velocis)
Index: php4/ext/oracle/oracle.c
diff -u php4/ext/oracle/oracle.c:1.40 php4/ext/oracle/oracle.c:1.41
--- php4/ext/oracle/oracle.c:1.40 Sun Mar 12 07:47:31 2000
+++ php4/ext/oracle/oracle.c Thu Apr 6 14:07:41 2000
@@ -38,6 +38,8 @@
#include "php_oracle.h"
#define HASH_DTOR (void (*)(void *))
+#include "ext/standard/info.h"
+
#ifdef WIN32
# include "variables.h"
#else
@@ -1511,12 +1513,16 @@
PHP_MINFO_FUNCTION(oracle)
{
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Oracle Support", "enabled");
+
#ifndef PHP_WIN32
- php_printf("Oracle version: %s<br>\n"
- "Compile-time ORACLE_HOME: %s<br>\n"
- "Libraries used: %s",
- PHP_ORACLE_VERSION, PHP_ORACLE_HOME, PHP_ORACLE_LIBS);
+ php_info_print_table_row(2, "Oracle Version", PHP_ORACLE_VERSION );
+ php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_ORACLE_HOME );
+ php_info_print_table_row(2, "Libraries Used", PHP_ORACLE_LIBS );
#endif
+ php_info_print_table_end();
}
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.45 php4/ext/pcre/php_pcre.c:1.46
--- php4/ext/pcre/php_pcre.c:1.45 Wed Apr 5 13:42:59 2000
+++ php4/ext/pcre/php_pcre.c Thu Apr 6 14:07:41 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.45 2000/04/05 20:42:59 cmv Exp $ */
+/* $Id: php_pcre.c,v 1.46 2000/04/06 21:07:41 cmv Exp $ */
/*
TODO:
@@ -89,6 +89,7 @@
PHP_MINFO_FUNCTION(pcre)
{
php_info_print_table_start();
+ php_info_print_table_row(2, "PCRE (Perl Compatible Regular Expressions) Support",
"enabled" );
php_info_print_table_row(2, "PCRE Library Version", pcre_version() );
php_info_print_table_end();
}
Index: php4/ext/pdf/pdf.c
diff -u php4/ext/pdf/pdf.c:1.32 php4/ext/pdf/pdf.c:1.33
--- php4/ext/pdf/pdf.c:1.32 Tue Mar 28 08:45:04 2000
+++ php4/ext/pdf/pdf.c Thu Apr 6 14:07:42 2000
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdf.c,v 1.32 2000/03/28 16:45:04 steinm Exp $ */
+/* $Id: pdf.c,v 1.33 2000/04/06 21:07:42 cmv Exp $ */
/* pdflib 2.01 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
@@ -41,6 +41,7 @@
#include "php.h"
#include "php_globals.h"
#include "ext/standard/head.h"
+#include "ext/standard/info.h"
#include <math.h>
@@ -235,13 +236,23 @@
return SUCCESS;
}
-PHP_MINFO_FUNCTION(pdf) {
- /* need to use a PHPAPI function here because it is external module in windows */
- php_printf("pdflib %d.%02d<BR>", PDF_get_majorversion(), PDF_get_minorversion());
- php_printf("The CJK fonts supported.");
+PHP_MINFO_FUNCTION(pdf)
+{
+ char tmp[32];
+
+ snprintf(tmp, 31, "%d.%02d", PDF_get_majorversion(), PDF_get_minorversion() );
+ tmp[32]=0;
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "PDF Support", "enabled" );
+ php_info_print_table_row(2, "PDFLib Version", tmp );
+ php_info_print_table_row(2, "CJK Font Support", "yes" );
#ifdef PDF_OPEN_MEM_SUPPORTED
- php_printf("Support for in memory pdf creation.");
+ php_info_print_table_row(2, "In-memory PDF Creation Support", "yes" );
+#else
+ php_info_print_table_row(2, "In-memory PDF Creation Support", "no" );
#endif
+ php_info_print_table_end();
}
Index: php4/ext/recode/recode.c
diff -u php4/ext/recode/recode.c:1.3 php4/ext/recode/recode.c:1.4
--- php4/ext/recode/recode.c:1.3 Sun Mar 12 11:42:29 2000
+++ php4/ext/recode/recode.c Thu Apr 6 14:07:42 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: recode.c,v 1.3 2000/03/12 19:42:29 kk Exp $ */
+/* $Id: recode.c,v 1.4 2000/04/06 21:07:42 cmv Exp $ */
/* {{{ includes & prototypes */
@@ -90,10 +90,11 @@
{
ReSLS_FETCH();
- php_printf("<table border=5 width=\"600\">");
- php_info_print_table_header(1, "Module Revision");
- php_info_print_table_row(1, "$Revision: 1.3 $");
- php_printf("</table>\n");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Recode Support", "enabled);
+ php_info_print_table_row(2, "Revision", "$Revision: 1.4 $");
+ php_info_print_table_end();
+
}
/* {{{ proto string recode_string(string request, string str)
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.126 php4/ext/session/session.c:1.127
--- php4/ext/session/session.c:1.126 Thu Mar 30 14:38:50 2000
+++ php4/ext/session/session.c Thu Apr 6 14:07:43 2000
@@ -38,6 +38,7 @@
#include "ext/standard/url_scanner.h"
#include "ext/standard/php_output.h"
#include "ext/standard/php_rand.h" /* for RAND_MAX */
+#include "ext/standard/info.h"
#ifdef ZTS
int ps_globals_id;
@@ -1321,5 +1322,10 @@
PHP_MINFO_FUNCTION(session)
{
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Session Support", "enabled" );
+ php_info_print_table_end();
+
DISPLAY_INI_ENTRIES();
}
Index: php4/ext/snmp/snmp.c
diff -u php4/ext/snmp/snmp.c:1.27 php4/ext/snmp/snmp.c:1.28
--- php4/ext/snmp/snmp.c:1.27 Wed Mar 29 16:19:24 2000
+++ php4/ext/snmp/snmp.c Thu Apr 6 14:07:43 2000
@@ -17,9 +17,10 @@
| Steven Lawrance <slawrance@technologist.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.27 2000/03/30 00:19:24 sterling Exp $ */
+/* $Id: snmp.c,v 1.28 2000/04/06 21:07:43 cmv Exp $ */
#include "php.h"
+#include "ext/standard/info.h"
#if defined(COMPILE_DL)
#include "dl/phpdl.h"
#endif
@@ -105,7 +106,9 @@
PHP_MINFO_FUNCTION(snmp)
{
- php_printf("ucd-snmp");
+ php_info_print_table_start();
+ php_info_print_table_row(2, "UCD-SNMP Support", "enabled");
+ php_info_print_table_end();
}
@@ -381,4 +384,4 @@
* tab-width: 4
* c-basic-offset: 4
* End:
-*/
\ No newline at end of file
+*/
Index: php4/ext/sybase/sybase.c
diff -u php4/ext/sybase/sybase.c:1.25 php4/ext/sybase/sybase.c:1.26
--- php4/ext/sybase/sybase.c:1.25 Mon Mar 6 10:41:17 2000
+++ php4/ext/sybase/sybase.c Thu Apr 6 14:07:44 2000
@@ -20,12 +20,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sybase.c,v 1.25 2000/03/06 18:41:17 ssb Exp $ */
+/* $Id: sybase.c,v 1.26 2000/04/06 21:07:44 cmv Exp $ */
#include "php.h"
#include "php_sybase.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/info.h"
#include "php_globals.h"
#if HAVE_SYBASE
@@ -1185,32 +1186,31 @@
PHP_MINFO_FUNCTION(sybase)
{
- char maxp[16],maxl[16];
+ char maxp[32],maxl[32];
if (php_sybase_module.max_persistent==-1) {
- strcpy(maxp,"Unlimited");
+ snprintf(maxp, 31, "%d/unlimited", php_sybase_module.num_persistent )
} else {
- snprintf(maxp,15,"%ld",php_sybase_module.max_persistent);
- maxp[15]=0;
+ snprintf(maxp, 31, "%d/%ld", php_sybase_module.num_persistent,
php_sybase_module.max_persistent);
}
+ maxp[31]=0;
+
if (php_sybase_module.max_links==-1) {
- strcpy(maxl,"Unlimited");
+ snprintf(maxl, 31, "%d/unlimited", php_sybase_module.num_links );
} else {
- snprintf(maxl,15,"%ld",php_sybase_module.max_links);
- maxl[15]=0;
+ snprintf(maxl, 31, "%d/%ld", php_sybase_module.num_links, php_sybase_module.max_links);
}
- php_printf("<table cellpadding=5>"
- "<tr><td>Allow persistent
links:</td><td>%s</td></tr>\n"
- "<tr><td>Persistent
links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>Total links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>Application
name:</td><td>%s</td></tr>\n"
- "<tr><td valign=\"top\" width=\"20%%\">Client API
information:</td><td><pre>%s</pre></td></tr>\n"
- "</table>\n",
- (php_sybase_module.allow_persistent?"Yes":"No"),
- php_sybase_module.num_persistent,maxp,
- php_sybase_module.num_links,maxl,
- php_sybase_module.appname,
- dbversion());
+ maxl[31]=0;
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Sybase Support", "enabled");
+ php_info_print_table_row(2, "Allow Persistent Links",
(php_sybase_module.allow_persistent?"Yes":"No") );
+ php_info_print_table_row(2, "Persistent Links", maxp);
+ php_info_print_table_row(2, "Total Links", maxl);
+ php_info_print_table_row(2, "Application Name", php_sybase_module.appname );
+ php_info_print_table_row(2, "Client API Version", dbversion() );
+ php_info_print_table_end();
+
}
Index: php4/ext/sybase_ct/php_sybase_ct.c
diff -u php4/ext/sybase_ct/php_sybase_ct.c:1.18 php4/ext/sybase_ct/php_sybase_ct.c:1.19
--- php4/ext/sybase_ct/php_sybase_ct.c:1.18 Mon Mar 6 10:41:17 2000
+++ php4/ext/sybase_ct/php_sybase_ct.c Thu Apr 6 14:07:44 2000
@@ -17,12 +17,13 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_ct.c,v 1.18 2000/03/06 18:41:17 ssb Exp $ */
+/* $Id: php_sybase_ct.c,v 1.19 2000/04/06 21:07:44 cmv Exp $ */
#include "php.h"
#include "php_sybase_ct.h"
#include "ext/standard/php_standard.h"
+#include "ext/standard/info.h"
#include "php_globals.h"
#if HAVE_SYBASE_CT
@@ -1512,30 +1513,30 @@
PHP_MINFO_FUNCTION(sybase)
{
- char maxp[16],maxl[16];
+ char maxp[32],maxl[32];
if (sybase_globals.max_persistent==-1) {
- strcpy(maxp,"Unlimited");
+ snprintf(maxp, 31, "%d/unlimited", sybase_globals.num_persistent);
} else {
- snprintf(maxp,15,"%ld",sybase_globals.max_persistent);
- maxp[15]=0;
+ snprintf(maxp, 31, "%d/%ld", sybase_globals.num_persistent,
sybase_globals.max_persistent);
}
+ maxp[31]=0;
+
if (sybase_globals.max_links==-1) {
- strcpy(maxl,"Unlimited");
+ snprintf(maxl, 31, "%d/unlimited", sybase_globals.num_links);
} else {
- snprintf(maxl,15,"%ld",sybase_globals.max_links);
- maxl[15]=0;
+ snprintf(maxl, 31, "%d/%ld", sybase_globals.num_links, sybase_globals.max_links);
}
- php_printf("<table cellpadding=5>"
- "<tr><td>Allow persistent
links:</td><td>%s</td></tr>\n"
- "<tr><td>Persistent
links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>Total links:</td><td>%d/%s</td></tr>\n"
- "<tr><td>Application
name:</td><td>%s</td></tr>\n"
- "</table>\n",
- (sybase_globals.allow_persistent?"Yes":"No"),
- sybase_globals.num_persistent,maxp,
- sybase_globals.num_links,maxl,
- sybase_globals.appname);
+ maxl[31]=0;
+
+ php_info_print_table_start();
+ php_info_print_table_row(2, "Sybase_CT Support", "enabled" );
+ php_info_print_table_row(2, "Allow Persistent Links",
(sybase_globals.allow_persistent?"yes":"no") );
+ php_info_print_table_row(2, "Persistent Links", maxp );
+ php_info_print_table_row(2, "Total Links", maxl );
+ php_info_print_table_row(2, "Application Name", sybase_globals.appname );
+ php_info_print_table_end();
+
}