CVS update: php3/functions

From: Date: Mon, 09 Nov 1998 13:23:02 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2288@lists.php.net to get a copy of this message
Date: Monday November 9, 1998 @ 8:23 Author: rasmus Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv13371/functions Modified Files: microtime.c pack.c Log Message: Assign blame to Steve Willer for pack.c and a couple of prototype comments. Anybody want to write the missing unpack() function described in pack.c ? Index: php3/functions/microtime.c diff -c php3/functions/microtime.c:1.20 php3/functions/microtime.c:1.21 *** php3/functions/microtime.c:1.20 Mon May 11 16:18:15 1998 --- php3/functions/microtime.c Mon Nov 9 08:23:01 1998 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: microtime.c,v 1.20 1998/05/11 20:18:15 zeev Exp $ */ #include <stdlib.h> #ifdef HAVE_UNISTD_H --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: microtime.c,v 1.21 1998/11/09 13:23:01 rasmus Exp $ */ #include <stdlib.h> #ifdef HAVE_UNISTD_H *************** *** 56,61 **** --- 56,63 ---- #define NUL '\0' #define MICRO_IN_SEC 1000000.00 + /* {{{ proto string microtime(void) + Returns a string containing the current time in seconds and microseconds */ #ifdef __cplusplus void php3_microtime(HashTable *) #else *************** *** 76,82 **** snprintf(ret, 100, "%.8f %ld", msec, sec); RETVAL_STRING(ret,1); #endif ! } /* * Local variables: --- 78,84 ---- snprintf(ret, 100, "%.8f %ld", msec, sec); RETVAL_STRING(ret,1); #endif ! } /* }}} */ /* * Local variables: Index: php3/functions/pack.c diff -c php3/functions/pack.c:1.16 php3/functions/pack.c:1.17 *** php3/functions/pack.c:1.16 Sat Aug 8 23:58:43 1998 --- php3/functions/pack.c Mon Nov 9 08:23:02 1998 *************** *** 23,32 **** | If you did not, or have any questions about PHP licensing, please | | contact core@php.net. | +----------------------------------------------------------------------+ ! | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id $ */ #ifdef THREAD_SAFE #include "tls.h" #endif --- 23,32 ---- | If you did not, or have any questions about PHP licensing, please | | contact core@php.net. | +----------------------------------------------------------------------+ ! | Authors: Steve Willer <willer@interlog.com> | +----------------------------------------------------------------------+ */ ! /* $Id: pack.c,v 1.17 1998/11/09 13:23:02 rasmus Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif *************** *** 75,83 **** "PHP_pack", pack_functions, php3_minit_pack, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; ! /* pack() idea stolen from Perl. Implemented formats are a,a,c,C,s,S,i,I,l,L,n,N,f,d,x,X,@. * 'h' is also implemented, but I'm not sure if it works the same way as Perl */ void php3_pack(INTERNAL_FUNCTION_PARAMETERS) { pval **args; int argc, currarg = 1, size = 240; --- 75,85 ---- "PHP_pack", pack_functions, php3_minit_pack, NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES }; ! /* pack() idea stolen from Perl. Implemented formats are A,a,c,C,s,S,i,I,l,L,n,N,f,d,x,X,@. * 'h' is also implemented, but I'm not sure if it works the same way as Perl */ + /* {{{ proto string pack(string format, mixed arg1, mixed arg2, ...) + Takes 1 or more arguments and packs them into a binary string according to the format argument */ void php3_pack(INTERNAL_FUNCTION_PARAMETERS) { pval **args; int argc, currarg = 1, size = 240; *************** *** 249,255 **** efree(outstart); return; ! } /* unpack() is based on Perl's unpack(), but is modified quite a bit from there. --- 251,257 ---- efree(outstart); return; ! } /* }}} */ /* unpack() is based on Perl's unpack(), but is modified quite a bit from there. -- 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

« previous php.dev (#2288) next »