cvs: /php3/functions interbase.c

From: Date: Mon, 13 Mar 2000 18:50:55 +0000
Subject: cvs: /php3/functions interbase.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-16760@lists.php.net to get a copy of this message
jah Mon Mar 13 10:50:55 2000 EDT Modified files: /php3/functions interbase.c Log: Fix a problem with NULL strings and change a few tabs to spaces... Index: php3/functions/interbase.c diff -u php3/functions/interbase.c:1.28 php3/functions/interbase.c:1.29 --- php3/functions/interbase.c:1.28 Sat Mar 4 23:41:28 2000 +++ php3/functions/interbase.c Mon Mar 13 10:50:55 2000 @@ -1,34 +1,34 @@ /* +----------------------------------------------------------------------+ - | PHP HTML Embedded Scripting Language Version 3.0 | + | PHP HTML Embedded Scripting Language Version 3.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2000 PHP Development Team (See Credits file) | + | Copyright (c) 1997-2000 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: | - | | + | it under the terms of one of the following licenses: | + | | | A) the GNU General Public License as published by the Free Software | | Foundation; either version 2 of the License, or (at your option) | - | any later version. | - | | + | any later version. | + | | | B) the PHP License as published by the PHP Development Team and | - | included in the distribution in the file: LICENSE | - | | - | This program is distributed in the hope that it will be useful, | - | but WITHOUT ANY WARRANTY; without even the implied warranty of | - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | - | GNU General Public License for more details. | - | | + | included in the distribution in the file: LICENSE | + | | + | This program is distributed in the hope that it will be useful, | + | but WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | + | GNU General Public License for more details. | + | | | You should have received a copy of both licenses referred to here. | | If you did not, or have any questions about PHP licensing, please | - | contact core@php.net. | + | contact core@php.net. | +----------------------------------------------------------------------+ - | Authors: Jouni Ahto <jah@mork.net> | - | Andrew Avdeev <andy@rsc.mv.ru> | + | Authors: Jouni Ahto <jah@mork.net> | + | Andrew Avdeev <andy@rsc.mv.ru> | +----------------------------------------------------------------------+ */ -/* $Id: interbase.c,v 1.28 2000/03/05 07:41:28 eschmid Exp $ */ +/* $Id: interbase.c,v 1.29 2000/03/13 18:50:55 jah Exp $ */ /* TODO: Arrays, roles? A lot... */ @@ -73,6 +73,8 @@ #include "fsock.h" #include "head.h" +#define SAFE_STRING(s) ((s)?(s):"") + /* {{{ extension definition structures */ function_entry ibase_functions[] = { PHP_FE(ibase_connect, NULL) @@ -529,7 +531,7 @@ php3_printf( "<table>" - "<tr><td>Revision:</td><td>$Revision: 1.28 $</td></tr>\n" + "<tr><td>Revision:</td><td>$Revision: 1.29 $</td></tr>\n" #ifdef COMPILE_DL "<tr><td>Dynamic module:</td><td>Yes</td></tr>\n" #endif @@ -673,7 +675,7 @@ efree(args); hashed_details = (char *) emalloc(hashed_details_length+strlen("ibase_%s_%s_%s_%s")+1); - sprintf(hashed_details, "ibase_%s_%s_%s_%s", ib_server, ib_uname, ib_passwd, ib_charset); + sprintf(hashed_details, "ibase_%s_%s_%s_%s", SAFE_STRING(ib_server), SAFE_STRING(ib_uname), SAFE_STRING(ib_passwd), SAFE_STRING(ib_charset)); if (persistent) { list_entry *le;

« previous php.dev (#16760) next »