CVS update: php3/functions
| From: | cschneid | Date: | Wed, 11 Nov 1998 23:19:05 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2347@lists.php.net to get a copy of this message | ||
Date: Wednesday November 11, 1998 @ 18:19
Author: cschneid
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv12692/functions
Modified Files:
cyr_convert.c file.c hg_comm.c zlib.c
Log Message:
Fixed some compilation warnings. Fixed gzgetc bug to make it binary safe.
Index: php3/functions/cyr_convert.c
diff -c php3/functions/cyr_convert.c:1.1 php3/functions/cyr_convert.c:1.2
*** php3/functions/cyr_convert.c:1.1 Tue Nov 10 19:10:26 1998
--- php3/functions/cyr_convert.c Wed Nov 11 18:19:02 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: cyr_convert.c,v 1.1 1998/11/11 00:10:26 rasmus Exp $ */
#include <stdlib.h>
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: cyr_convert.c,v 1.2 1998/11/11 23:19:02 cschneid Exp $ */
#include <stdlib.h>
***************
*** 269,282 ****
if (!str)
! return str;
for( i = 0; str[i]; i++)
{
tmp = (from_table == NULL)? str[i] : from_table[ str[i] ];
str[i] = (to_table == NULL) ? tmp : to_table[tmp + 256];
}
! return str;
}
--- 269,282 ----
if (!str)
! return (char *)str;
for( i = 0; str[i]; i++)
{
tmp = (from_table == NULL)? str[i] : from_table[ str[i] ];
str[i] = (to_table == NULL) ? tmp : to_table[tmp + 256];
}
! return (char *)str;
}
***************
*** 296,300 ****
str = (unsigned char*) str_arg->value.str.val;
_php3_convert_cyr_string(str, fr_cs->value.str.val[0], to_cs->value.str.val[0]);
! RETVAL_STRING(str, 1)
}
--- 296,300 ----
str = (unsigned char*) str_arg->value.str.val;
_php3_convert_cyr_string(str, fr_cs->value.str.val[0], to_cs->value.str.val[0]);
! RETVAL_STRING((char *)str, 1)
}
Index: php3/functions/file.c
diff -c php3/functions/file.c:1.183 php3/functions/file.c:1.184
*** php3/functions/file.c:1.183 Sun Nov 8 16:12:40 1998
--- php3/functions/file.c Wed Nov 11 18:19:03 1998
***************
*** 26,32 ****
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 1.183 1998/11/08 21:12:40 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 26,32 ----
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
! /* $Id: file.c,v 1.184 1998/11/11 23:19:03 cschneid Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 284,290 ****
snprintf(var_name,50,"%s",tmp);
*end='"';
! c = var_name;
while (*c) {
switch(*c) {
case '.':
--- 284,290 ----
snprintf(var_name,50,"%s",tmp);
*end='"';
! c = (unsigned char*)var_name;
while (*c) {
switch(*c) {
case '.':
***************
*** 990,995 ****
--- 990,996 ----
break;
default:
WRONG_PARAM_COUNT;
+ /* NOTREACHED */
break;
}
convert_to_long(arg1);
Index: php3/functions/hg_comm.c
diff -c php3/functions/hg_comm.c:1.9 php3/functions/hg_comm.c:1.10
*** php3/functions/hg_comm.c:1.9 Fri Oct 9 03:56:09 1998
--- php3/functions/hg_comm.c Wed Nov 11 18:19:04 1998
***************
*** 23,29 ****
+----------------------------------------------------------------------+
*/
! /* $Id: hg_comm.c,v 1.9 1998/10/09 07:56:09 steinm Exp $ */
/* #define HW_DEBUG */
--- 23,29 ----
+----------------------------------------------------------------------+
*/
! /* $Id: hg_comm.c,v 1.10 1998/11/11 23:19:04 cschneid Exp $ */
/* #define HW_DEBUG */
***************
*** 942,948 ****
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&option, sizeof(option));
#else
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option));
! #endif SUN
if (connect(sockfd, (struct sockaddr *) &server_addr, sizeof(server_addr)) < 0) {
close(sockfd);
--- 942,948 ----
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (char *)&option, sizeof(option));
#else
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option));
! #endif /* SUN */
if (connect(sockfd, (struct sockaddr *) &server_addr, sizeof(server_addr)) < 0) {
close(sockfd);
Index: php3/functions/zlib.c
diff -c php3/functions/zlib.c:1.9 php3/functions/zlib.c:1.10
*** php3/functions/zlib.c:1.9 Sat Sep 19 16:17:19 1998
--- php3/functions/zlib.c Wed Nov 11 18:19:05 1998
***************
*** 22,28 ****
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
! /* $Id: zlib.c,v 1.9 1998/09/19 20:17:19 rasmus Exp $ */
#if !PHP_31 && defined(THREAD_SAFE)
#undef THREAD_SAFE
#endif
--- 22,28 ----
| Stefan Röhrich <sr@linux.de> |
+----------------------------------------------------------------------+
*/
! /* $Id: zlib.c,v 1.10 1998/11/11 23:19:05 cschneid Exp $ */
#if !PHP_31 && defined(THREAD_SAFE)
#undef THREAD_SAFE
#endif
***************
*** 522,528 ****
void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1;
gzFile *zp;
! int id, type;
char *buf;
ZLIB_TLS_VARS;
--- 522,528 ----
void php3_gzgetc(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1;
gzFile *zp;
! int id, type, c;
char *buf;
ZLIB_TLS_VARS;
***************
*** 538,547 ****
RETURN_FALSE;
}
buf = emalloc(sizeof(char) * 2);
! if ((*buf=gzgetc(zp)) == (-1)) {
efree(buf);
RETVAL_FALSE;
} else {
buf[1]='\0';
return_value->value.str.val = buf;
return_value->value.str.len = 1;
--- 538,548 ----
RETURN_FALSE;
}
buf = emalloc(sizeof(char) * 2);
! if ((c=gzgetc(zp)) == (-1)) {
efree(buf);
RETVAL_FALSE;
} else {
+ buf[0]=(char)c;
buf[1]='\0';
return_value->value.str.val = buf;
return_value->value.str.len = 1;
***************
*** 691,696 ****
--- 692,698 ----
break;
default:
WRONG_PARAM_COUNT;
+ /* NOTREACHED */
break;
}
convert_to_long(arg1);
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net