You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(116) |
Sep
(17) |
Oct
|
Nov
(6) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(2) |
Nov
(3) |
Dec
(2) |
2007 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(1) |
Sep
(9) |
Oct
(8) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(6) |
Aug
(4) |
Sep
(3) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <da...@us...> - 2003-08-09 03:58:37
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv24741/examples Modified Files: helloworld.php Log Message: Added variable support. Index: helloworld.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/examples/helloworld.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helloworld.php 8 Aug 2003 06:59:06 -0000 1.2 --- helloworld.php 9 Aug 2003 03:58:34 -0000 1.3 *************** *** 1,3 **** <?php ! echo 'Hello World', "\n", 'bleh++'; ! ?> --- 1,5 ---- <?php ! $var = 'bleh'; ! $var = 'foo'; ! echo $var; ! ?> \ No newline at end of file |
From: <da...@us...> - 2003-08-08 06:59:09
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv29274/examples Modified Files: helloworld.php Log Message: Fixed multiple parameter parsing. Index: helloworld.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/examples/helloworld.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** helloworld.php 5 Aug 2003 00:48:39 -0000 1.1 --- helloworld.php 8 Aug 2003 06:59:06 -0000 1.2 *************** *** 1,3 **** <?php ! echo 'Hello World', "\n"; ?> --- 1,3 ---- <?php ! echo 'Hello World', "\n", 'bleh++'; ?> |
From: <da...@us...> - 2003-08-08 06:59:09
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv29274 Modified Files: tokenflow.php Log Message: Fixed multiple parameter parsing. Index: tokenflow.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** tokenflow.php 8 Aug 2003 05:10:53 -0000 1.51 --- tokenflow.php 8 Aug 2003 06:59:06 -0000 1.52 *************** *** 122,126 **** $params[] = $code; $code = (string) null; ! ++$this->token; } switch($token) --- 122,127 ---- $params[] = $code; $code = (string) null; ! // ++$this->token; ! continue; } switch($token) *************** *** 137,141 **** break; case T_CONSTANT_ENCAPSED_STRING: ! $code .= '"' . substr(str_replace(array('\\\'', '"'), array('\'', '\\"'), $data), 1, -1) . '"'; break; case '-': --- 138,142 ---- break; case T_CONSTANT_ENCAPSED_STRING: ! $code .= '"' . str_replace(array('\\\'', '"'), array('\'', '\\"'), substr($data, 1, -1)) . '"'; break; case '-': *************** *** 234,236 **** } } ! ?> \ No newline at end of file --- 235,237 ---- } } ! ?> |
From: <da...@us...> - 2003-08-08 05:10:55
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv14779 Modified Files: testfile.php tokenflow.php tokenizer.php Log Message: Added new parser, broke everything except echo (yay\! :) ) Index: testfile.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** testfile.php 5 Aug 2003 23:25:55 -0000 1.45 --- testfile.php 8 Aug 2003 05:10:53 -0000 1.46 *************** *** 1,23 **** <?php ! $sock = socket_create(AF_INET, SOCK_STREAM, 0); ! $connection = socket_connect($sock, 'irc.freenode.net', 6667); ! ! socket_write($sock, "USER TestBOT TestBOT TestBOT :TestBOT\r\n"); ! socket_write($sock, "NICK TestBOT \r\n"); ! socket_write($sock,"JOIN #binaryphp \r\n"); ! while ($data = socket_read($sock, 2046)) ! { ! echo $data, "\n"; ! $temp = explode(':', $data); ! $temp2 = explode('!', $temp[1]); ! $temp3 = explode(' ', $temp2[1]); ! if(strpos('TestBOT: PING?', $temp[2]) !== false) ! socket_write($sock, 'PRIVMSG ' . $temp3[2] . ' :' . $temp2[0] . ": PONG!\r\n"); ! ! if(strpos('!quit', $temp[2]) !== false) ! { ! if($temp2[0] == 'Amaranth') ! socket_write($sock, 'QUIT :Seeya ' . $temp3[2] . "\r\n"); ! } ! } ?> --- 1,3 ---- <?php ! echo 'Bleh!'; ?> Index: tokenflow.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** tokenflow.php 6 Aug 2003 14:09:55 -0000 1.50 --- tokenflow.php 8 Aug 2003 05:10:53 -0000 1.51 *************** *** 1,784 **** <?php class Generator { ! var $functions = array('main'); ! var $curfunction = 0; ! var $code; ! var $prototypes; ! var $includes = array(); ! var $defines = array(); ! var $cppincludes = array(); [...992 lines suppressed...] foreach($this->includes as $include) + $code .= '#include <' . $include . '>' . "\n"; + foreach($this->code as $func => $arr) { ! list($name, $return, $args) = $this->functions[$func]; ! $code .= $return . ' ' . $name . '('; ! $args2 = array(); ! foreach($args as $arg) ! $args2[] = $arg[0]; ! $code .= implode(', ', $args2) . ')' . "\n"; $code .= '{' . "\n"; ! foreach($arr as $line) ! $code .= $line . "\n"; $code .= '}' . "\n"; } ! return array($code, (string) null); } } ! ?> \ No newline at end of file Index: tokenizer.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenizer.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tokenizer.php 22 Jul 2003 07:37:27 -0000 1.1.1.1 --- tokenizer.php 8 Aug 2003 05:10:53 -0000 1.2 *************** *** 11,15 **** function Tokenize() { ! $this->tokens = token_get_all($this->code); } function Strip() --- 11,22 ---- function Tokenize() { ! $tokens = token_get_all($this->code); ! foreach($tokens as $token) ! { ! if(is_array($token)) ! $this->tokens[] = $token; ! else ! $this->tokens[] = array($token, null); ! } } function Strip() *************** *** 19,29 **** foreach($this->tokens as $token) { ! if(is_array($token)) ! { ! if(!in_array($token[0], $strip)) $tokens[] = $token; - } - else - $tokens[] = $token; } $this->tokens = $tokens; --- 26,31 ---- foreach($this->tokens as $token) { ! if(!in_array($token[0], $strip)) $tokens[] = $token; } $this->tokens = $tokens; |
From: <he...@us...> - 2003-08-07 05:39:06
|
Update of /cvsroot/binaryphp/binaryphp/functions/arrays In directory sc8-pr-cvs1:/tmp/cvs-serv31764/functions/arrays Modified Files: array.cpp Log Message: Segfault fixed in mysql_fetch_array(), and argument list fixed in array(). Index: array.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/arrays/array.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** array.cpp 4 Aug 2003 23:46:24 -0000 1.2 --- array.cpp 7 Aug 2003 05:39:03 -0000 1.3 *************** *** 9,13 **** for(int i = 0; i < key / 2; ++i) { ! php_var key2 = va_arg(ap, php_var); if(key2 == -1) { --- 9,13 ---- for(int i = 0; i < key / 2; ++i) { ! php_var key2 = *(va_arg(ap, php_var*)); if(key2 == -1) { *************** *** 27,34 **** key2 = i; } ! php_var val = va_arg(ap, php_var); arr.keys.push_back(key2); arr.data.push_back(val); ! }; va_end(ap); return arr; --- 27,34 ---- key2 = i; } ! php_var val = *(va_arg(ap, php_var*)); arr.keys.push_back(key2); arr.data.push_back(val); ! } va_end(ap); return arr; |
From: <he...@us...> - 2003-08-07 05:39:06
|
Update of /cvsroot/binaryphp/binaryphp/functions/mysql In directory sc8-pr-cvs1:/tmp/cvs-serv31764/functions/mysql Modified Files: mysql_fetch_array.cpp Log Message: Segfault fixed in mysql_fetch_array(), and argument list fixed in array(). Index: mysql_fetch_array.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_fetch_array.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysql_fetch_array.cpp 7 Aug 2003 01:37:53 -0000 1.2 --- mysql_fetch_array.cpp 7 Aug 2003 05:39:03 -0000 1.3 *************** *** 19,23 **** ret[fields[i].name] = row[i]; } - free(fields); return ret; } --- 19,22 ---- |
Update of /cvsroot/binaryphp/binaryphp/functions/mysql In directory sc8-pr-cvs1:/tmp/cvs-serv31463/functions/mysql Modified Files: mysql_connect.cpp mysql_error.cpp mysql_fetch_array.cpp mysql_fetch_row.cpp mysql_query.cpp Log Message: Fixed MySQL functions. Index: mysql_connect.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_connect.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_connect.cpp 3 Aug 2003 06:36:03 -0000 1.1 --- mysql_connect.cpp 7 Aug 2003 01:37:52 -0000 1.2 *************** *** 1,10 **** php_var mysql_connect(php_var host = "localhost:3306", php_var user = "", php_var passwd = "") { ! MYSQL* mysql; ! mysql_init(mysql); unsigned int port = 3306; ! if(!mysql_real_connect(mysql, host, user.container.c_str(), passwd.container.c_str(), NULL, port, host_ext[1].container.c_str(), 0)) { ! //handle errors } php_var ret; --- 1,12 ---- php_var mysql_connect(php_var host = "localhost:3306", php_var user = "", php_var passwd = "") { ! MYSQL* mysql = NULL; ! mysql = mysql_init(mysql); unsigned int port = 3306; ! if(!mysql_real_connect(mysql, host.container.c_str(), user.container.c_str(), passwd.container.c_str(), NULL, port, NULL, 0)) { ! global_mysql.res = (void*)mysql; ! global_mysql.type = PHP_RESOURCE; ! return (php_var)false; } php_var ret; Index: mysql_error.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_error.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_error.cpp 3 Aug 2003 06:36:03 -0000 1.1 --- mysql_error.cpp 7 Aug 2003 01:37:53 -0000 1.2 *************** *** 1,5 **** php_var mysql_error(php_var mysql = global_mysql) { ! php_var ret = mysql_error(mysql); ! return ret; } --- 1,4 ---- php_var mysql_error(php_var mysql = global_mysql) { ! return (php_var)mysql_error((MYSQL*)mysql.res); } Index: mysql_fetch_array.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_fetch_array.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_fetch_array.cpp 3 Aug 2003 06:36:03 -0000 1.1 --- mysql_fetch_array.cpp 7 Aug 2003 01:37:53 -0000 1.2 *************** *** 4,13 **** unsigned int num_fields; MYSQL_ROW row; ! MYSQL_FIELD* fields; if(row = mysql_fetch_row((MYSQL_RES*)result.res)) { ret = array(); num_fields = mysql_num_fields((MYSQL_RES*)result.res); ! fields = mysql_fetch_fields((MYSQL_RES*)result.res); int i; for(i = 0; i < num_fields; ++i) --- 4,14 ---- unsigned int num_fields; MYSQL_ROW row; ! MYSQL_FIELD* fields = NULL; if(row = mysql_fetch_row((MYSQL_RES*)result.res)) { ret = array(); num_fields = mysql_num_fields((MYSQL_RES*)result.res); ! if(result_type == MYSQL_ASSOC || result_type == MYSQL_BOTH) ! fields = mysql_fetch_fields((MYSQL_RES*)result.res); int i; for(i = 0; i < num_fields; ++i) Index: mysql_fetch_row.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_fetch_row.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_fetch_row.cpp 3 Aug 2003 06:36:03 -0000 1.1 --- mysql_fetch_row.cpp 7 Aug 2003 01:37:53 -0000 1.2 *************** *** 14,17 **** } else ! return((php_var)false); } --- 14,17 ---- } else ! return (php_var)false; } Index: mysql_query.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/mysql/mysql_query.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_query.cpp 3 Aug 2003 06:36:03 -0000 1.1 --- mysql_query.cpp 7 Aug 2003 01:37:53 -0000 1.2 *************** *** 5,13 **** if(mysql_real_query((MYSQL*)mysql.res, query.container.c_str(),query.container.length()) != 0) { ! return (php_var) false; } else { ! result = mysql_store_result((MYSQL*) (mysql.res)); if(result) { --- 5,13 ---- if(mysql_real_query((MYSQL*)mysql.res, query.container.c_str(),query.container.length()) != 0) { ! return (php_var)false; } else { ! result = mysql_store_result((MYSQL*)mysql.res); if(result) { *************** *** 18,25 **** else { ! if(mysql_field_count((MYSQL *) mysql.res) == 0) ! return((php_var)true); else ! return((php_var)false); } } --- 18,25 ---- else { ! if(mysql_field_count((MYSQL*)mysql.res) == 0) ! return (php_var)true; else ! return (php_var)false; } } |
From: <ama...@us...> - 2003-08-06 22:22:22
|
Update of /cvsroot/binaryphp/binaryphp/tests In directory sc8-pr-cvs1:/tmp/cvs-serv2833/tests Modified Files: implode.php Log Message: fixed the implode() example, arrays seem to segfault Index: implode.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tests/implode.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** implode.php 5 Aug 2003 18:09:26 -0000 1.1 --- implode.php 6 Aug 2003 22:22:19 -0000 1.2 *************** *** 1,4 **** <?php $array = array('This', 'is', 'a', 'test.'); ! echo implode(', ' $array); ?> --- 1,4 ---- <?php $array = array('This', 'is', 'a', 'test.'); ! echo implode(' ', $array); ?> |
From: <as...@us...> - 2003-08-06 16:14:36
|
Update of /cvsroot/binaryphp/binaryphp/DOCS In directory sc8-pr-cvs1:/tmp/cvs-serv25314/DOCS Modified Files: INSTALL README Log Message: Doc fine-tuning Index: INSTALL =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/DOCS/INSTALL,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** INSTALL 3 Aug 2003 21:33:34 -0000 1.1 --- INSTALL 6 Aug 2003 16:14:33 -0000 1.2 *************** *** 1,182 **** ! Basic Installation ! ================== ! ! These are generic installation instructions. ! ! The `configure' shell script attempts to guess correct values for ! various system-dependent variables used during compilation. It uses ! those values to create a `Makefile' in each directory of the package. ! It may also create one or more `.h' files containing system-dependent ! definitions. Finally, it creates a shell script `config.status' that ! you can run in the future to recreate the current configuration, a file ! `config.cache' that saves the results of its tests to speed up ! reconfiguring, and a file `config.log' containing compiler output ! (useful mainly for debugging `configure'). ! ! If you need to do unusual things to compile the package, please try ! to figure out how `configure' could check whether to do them, and mail ! diffs or instructions to the address given in the `README' so they can ! be considered for the next release. If at some point `config.cache' ! contains results you don't want to keep, you may remove or edit it. ! ! The file `configure.in' is used to create `configure' by a program ! called `autoconf'. You only need `configure.in' if you want to change ! it or regenerate `configure' using a newer version of `autoconf'. ! ! The simplest way to compile this package is: ! ! 1. `cd' to the directory containing the package's source code and type ! `./configure' to configure the package for your system. If you're ! using `csh' on an old version of System V, you might need to type ! `sh ./configure' instead to prevent `csh' from trying to execute ! `configure' itself. ! ! Running `configure' takes awhile. While running, it prints some ! messages telling which features it is checking for. ! ! 2. Type `make' to compile the package. ! ! 3. Optionally, type `make check' to run any self-tests that come with ! the package. ! ! 4. Type `make install' to install the programs and any data files and ! documentation. ! ! 5. You can remove the program binaries and object files from the ! source code directory by typing `make clean'. To also remove the ! files that `configure' created (so you can compile the package for ! a different kind of computer), type `make distclean'. There is ! also a `make maintainer-clean' target, but that is intended mainly ! for the package's developers. If you use it, you may have to get ! all sorts of other programs in order to regenerate files that came ! with the distribution. ! ! Compilers and Options ! ===================== ! ! Some systems require unusual options for compilation or linking that ! the `configure' script does not know about. You can give `configure' ! initial values for variables by setting them in the environment. Using ! a Bourne-compatible shell, you can do that on the command line like ! this: ! CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure ! ! Or on systems that have the `env' program, you can do it like this: ! env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure ! ! Compiling For Multiple Architectures ! ==================================== ! ! You can compile the package for more than one kind of computer at the ! same time, by placing the object files for each architecture in their ! own directory. To do this, you must use a version of `make' that ! supports the `VPATH' variable, such as GNU `make'. `cd' to the ! directory where you want the object files and executables to go and run ! the `configure' script. `configure' automatically checks for the ! source code in the directory that `configure' is in and in `..'. ! ! If you have to use a `make' that does not supports the `VPATH' ! variable, you have to compile the package for one architecture at a time ! in the source code directory. After you have installed the package for ! one architecture, use `make distclean' before reconfiguring for another ! architecture. ! ! Installation Names ! ================== ! ! By default, `make install' will install the package's files in ! `/usr/local/bin', `/usr/local/man', etc. You can specify an ! installation prefix other than `/usr/local' by giving `configure' the ! option `--prefix=PATH'. ! ! You can specify separate installation prefixes for ! architecture-specific files and architecture-independent files. If you ! give `configure' the option `--exec-prefix=PATH', the package will use ! PATH as the prefix for installing programs and libraries. ! Documentation and other data files will still use the regular prefix. ! ! In addition, if you use an unusual directory layout you can give ! options like `--bindir=PATH' to specify different values for particular ! kinds of files. Run `configure --help' for a list of the directories ! you can set and what kinds of files go in them. ! ! If the package supports it, you can cause programs to be installed ! with an extra prefix or suffix on their names by giving `configure' the ! option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. ! ! Optional Features ! ================= ! ! Some packages pay attention to `--enable-FEATURE' options to ! `configure', where FEATURE indicates an optional part of the package. ! They may also pay attention to `--with-PACKAGE' options, where PACKAGE ! is something like `gnu-as' or `x' (for the X Window System). The ! `README' should mention any `--enable-' and `--with-' options that the ! package recognizes. ! ! For packages that use the X Window System, `configure' can usually ! find the X include and library files automatically, but if it doesn't, ! you can use the `configure' options `--x-includes=DIR' and ! `--x-libraries=DIR' to specify their locations. ! ! Specifying the System Type ! ========================== ! ! There may be some features `configure' can not figure out ! automatically, but needs to determine by the type of host the package ! will run on. Usually `configure' can figure that out, but if it prints ! a message saying it can not guess the host type, give it the ! `--host=TYPE' option. TYPE can either be a short name for the system ! type, such as `sun4', or a canonical name with three fields: ! CPU-COMPANY-SYSTEM ! ! See the file `config.sub' for the possible values of each field. If ! `config.sub' isn't included in this package, then this package doesn't ! need to know the host type. ! ! If you are building compiler tools for cross-compiling, you can also ! use the `--target=TYPE' option to select the type of system they will ! produce code for and the `--build=TYPE' option to select the type of ! system on which you are compiling the package. ! ! Sharing Defaults ! ================ ! ! If you want to set default values for `configure' scripts to share, ! you can create a site shell script called `config.site' that gives ! default values for variables like `CC', `cache_file', and `prefix'. ! `configure' looks for `PREFIX/share/config.site' if it exists, then ! `PREFIX/etc/config.site' if it exists. Or, you can set the ! `CONFIG_SITE' environment variable to the location of the site script. ! A warning: not all `configure' scripts look for a site script. ! ! Operation Controls ! ================== ! ! `configure' recognizes the following options to control how it ! operates. ! ! `--cache-file=FILE' ! Use and save the results of the tests in FILE instead of ! `./config.cache'. Set FILE to `/dev/null' to disable caching, for ! debugging `configure'. ! ! `--help' ! Print a summary of the options to `configure', and exit. ! ! `--quiet' ! `--silent' ! `-q' ! Do not print messages saying which checks are being made. To ! suppress all normal output, redirect it to `/dev/null' (any error ! messages will still be shown). ! ! `--srcdir=DIR' ! Look for the package's source code in directory DIR. Usually ! `configure' can determine that directory automatically. ! `--version' ! Print the version of Autoconf used to generate the `configure' ! script, and exit. ! `configure' also accepts some other, not widely useful, options. --- 1,5 ---- ! $Id$ ! BinaryPHP Installation ! NONE Index: README =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/DOCS/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 3 Aug 2003 21:33:34 -0000 1.1 --- README 6 Aug 2003 16:14:33 -0000 1.2 *************** *** 21,35 **** * DEPENDS PHP (cli-sapi) * BUILDING None Needed * USAGE * CHANGELOG ! see ChangeLog * CONTACT BinaryPHP * WWW: http://binaryphp.sourceforge.net/ --- 21,53 ---- * DEPENDS + PHP (cli-sapi) + * Tested using 4.X series of the CLI sapi + + C++ compiler + * Tested with: GNU g++ 2.9.5 and 3.0.4 and some unknown version of MSVC++ + * BUILDING + None Needed + * USAGE + convert.php --if <inputfile.php> --of <output> [-v | --verbose] [-h | --help] + + Included Examples: + ./convert.php --if examples/irc.php --of ircbot + ./convert.php --if examples/helloworld.php --of hello + + * CHANGELOG ! ! see ChangeLog ! * CONTACT + BinaryPHP * WWW: http://binaryphp.sourceforge.net/ |
From: <as...@us...> - 2003-08-06 16:14:36
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv25314/examples Added Files: README Log Message: Doc fine-tuning --- NEW FILE: README --- $Id: README,v 1.1 2003/08/06 16:14:33 asleep Exp $ BinaryPHP Examples ------------------------------------------------- * IRCBot ./convert.php --if examples/irc.php --of ircbot ./ircbot The BinaryPHP IRCBot example is a basic socket-based 'bot' used with IRC. Once compiled and ran this example will connect to IRC as 'TestBOT' and join the #binaryphp channel on FreeNode (irc.freenode.net). You can use the fun command of +punch to have TestBOT punch a user in IRC. <ASleep> +punch Daeken * TestBOT punches Daeken in the face. * Hello World ./convert.php --if examples/hello.php --of hello ./hello If we need to explain a 'Hello World' example to you then you should probable rm -Rf this directory. |
From: <da...@us...> - 2003-08-06 14:09:58
|
Update of /cvsroot/binaryphp/binaryphp/functions/string In directory sc8-pr-cvs1:/tmp/cvs-serv27671/functions/string Modified Files: explode.cpp Log Message: Fixed irc bot, php_var.cpp, substr()... Index: explode.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/string/explode.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** explode.cpp 5 Aug 2003 06:19:29 -0000 1.1 --- explode.cpp 6 Aug 2003 14:09:55 -0000 1.2 *************** *** 1,3 **** ! php_var explode(php_var delim_, php_var str_) { string delim = delim_.container; --- 1,3 ---- ! php_var explode(php_var delim_, php_var str_, php_var max = 0) { string delim = delim_.container; |
From: <da...@us...> - 2003-08-06 14:09:58
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv27671/examples Modified Files: irc.php Log Message: Fixed irc bot, php_var.cpp, substr()... Index: irc.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/examples/irc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** irc.php 5 Aug 2003 05:58:00 -0000 1.2 --- irc.php 6 Aug 2003 14:09:55 -0000 1.3 *************** *** 1,26 **** <?php ! $sock = socket_create(AF_INET, SOCK_STREAM, 0); ! $connection = socket_connect($sock, 'irc.freenode.net', 6667); ! socket_write($sock, "USER TestBOT TestBOT TestBOT :TestBOT\r\n"); ! socket_write($sock, "NICK TestBOT \r\n"); ! socket_write($sock,"JOIN #binaryphp \r\n"); ! while ($data = socket_read($sock, 2046)) ! { ! echo $data, "\n"; ! $temp = explode(':', $data); ! $temp2 = explode('!', $temp[1]); ! $temp3 = explode(' ', $temp2[1]); ! $admin = 'Amaranth'; ! $args = explode(' ,', $temp2[2]); ! if($args[0][0] == '!') { ! $text = substr($args[0], 1, 4); ! if($text == 'ping') ! socket_write($sock, 'PRIVMSG ' . $temp3[2] . ' :' . $temp2[0] . ": PONG!\r\n"); ! ! elseif($text == 'quit' && $temp[0] == $admin)) ! socket_write($sock, 'QUIT :Seeya ' $temp3[2] . "\r\n"); } - } ?> --- 1,24 ---- <?php ! $sock = socket_create(AF_INET, SOCK_STREAM, 0); ! $connection = socket_connect($sock, 'irc.freenode.net', 6667); ! socket_write($sock, "USER TestBOT TestBOT TestBOT :TestBOT\r\n"); ! socket_write($sock, "NICK TestBOT \r\n"); ! socket_write($sock,"JOIN #binaryphp \r\n"); ! while ($data = socket_read($sock, 2048)) { ! $temp = explode(':', $data); ! $temp2 = explode('!', $temp[1]); ! $temp3 = explode(' ', $temp2[1], 4); ! $nick = $temp2[0]; ! $act = $temp3[1]; ! $recp = $temp3[2]; ! if($act == 'PRIVMSG') ! { ! echo '<', $nick, '> ', trim($temp[2]), "\n"; ! $bleh = explode(' ', trim($temp[2])); ! if($bleh[0] == '+punch') ! socket_write($sock, 'PRIVMSG ' . $recp . ' :' . "\x01" . 'ACTION punches ' . $bleh[1] . ' in the face.' . "\x01\r\n"); ! } } ?> |
From: <da...@us...> - 2003-08-06 14:09:58
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv27671 Modified Files: php_var.cpp tokenflow.php Log Message: Fixed irc bot, php_var.cpp, substr()... Index: php_var.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** php_var.cpp 5 Aug 2003 23:25:55 -0000 1.24 --- php_var.cpp 6 Aug 2003 14:09:55 -0000 1.25 *************** *** 36,40 **** container = str; type = PHP_STRING; - cout << "Bleh!" << endl; } php_var(double i) --- 36,39 ---- *************** *** 325,334 **** return false; } ! bool operator==(php_var var) { ! if(container.compare(var.container) == 0) return true; return false; } int operator++(int i) { --- 324,337 ---- return false; } ! bool operator==(const php_var& var) { ! if(this->container.compare(var.container) == 0) return true; return false; } + bool operator==(string cmp) + { + return container == cmp; + } int operator++(int i) { *************** *** 396,403 **** } } ! void operator-(php_var i) { ! if(type == PHP_INT) ! container = doublestring(atof(container.c_str()) - atof(i.container.c_str())); } friend ostream &operator<<( ostream &out, const php_var &var ); --- 399,408 ---- } } ! php_var operator-(php_var i) { ! type = PHP_INT; ! i.type = PHP_INT; ! *this -= i; ! return *this; } friend ostream &operator<<( ostream &out, const php_var &var ); *************** *** 430,437 **** { return(v < i); - } - php_var operator-(php_var l, php_var r) - { - return (php_var)((int) l - (int) r); } float operator/(php_var &l, php_var &r) --- 435,438 ---- Index: tokenflow.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** tokenflow.php 5 Aug 2003 23:25:55 -0000 1.49 --- tokenflow.php 6 Aug 2003 14:09:55 -0000 1.50 *************** *** 397,411 **** switch($token) { - case T_STRING: - if(strtolower($data) == 'true' || strtolower($data) == 'false' || strtolower($data) == 'null') - $param = '(php_var) ' . strtolower($data); - elseif($tokenizer->tokens[$i + 1] != '(') - list($param, $i) = $this->parse_statement($tokenizer, $i); - else - list($param, $i) = $this->parse_function($tokenizer, $i); - if($tokenizer->tokens[$token_][0] == T_ARRAY && count($parameters) % 2 == 0 && (is_array($tokenizer->tokens[$i + 1]) && $tokenizer->tokens[$i + 1][1] != '=>')) - $parameters[] = -1; - $parameters[] = $param; - break; case '(': list($param, $i) = $this->parse_statement($tokenizer, $i); --- 397,400 ---- *************** *** 414,417 **** --- 403,408 ---- $parameters[] = $param; break; + case T_STRING: + case '-': case T_CONSTANT_ENCAPSED_STRING: case T_DEC: *************** *** 549,558 **** break; } ! if(in_array(substr($data_, 1), $this->scope[$this->curfunction]) || $this->inclass == true) $code .= '_' . substr($data_, 1); else { - if(DEBUG) - echo "\t", $data_, "\n"; $code .= 'php_var _' . substr($data_, 1); $this->scope[$this->curfunction][] = substr($data_, 1); --- 540,547 ---- break; } ! if(in_array(substr($data_, 1), $this->scope[$this->curfunction])) $code .= '_' . substr($data_, 1); else { $code .= 'php_var _' . substr($data_, 1); $this->scope[$this->curfunction][] = substr($data_, 1); *************** *** 599,605 **** if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; else ! $code .= '(php_var)'; ! $code .= '"' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"'; break; case T_DNUMBER: --- 588,595 ---- if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; + if(is_array($tokenizer->tokens[$i - 1]) && $tokenizer->tokens[$i - 1][0] == T_IS_EQUAL) + $code .= '(string) "' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"'; else ! $code .= '(php_var)' . '"' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"'; break; case T_DNUMBER: *************** *** 609,613 **** if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; ! $code .= '(php_var)' . $data_; break; case T_DEC: --- 599,606 ---- if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; ! if(is_array($tokenizer->tokens[$i - 1]) && $tokenizer->tokens[$i - 1][0] == T_IS_EQUAL) ! $code .= '(string)' . $data_; ! else ! $code .= '(php_var)' . $data_; break; case T_DEC: |
From: <rha...@us...> - 2003-08-06 00:02:12
|
Update of /cvsroot/binaryphp/binaryphp/functions In directory sc8-pr-cvs1:/tmp/cvs-serv28923 Removed Files: error_reporting.cpp ksort.cpp mysql.cpp Log Message: Deleting because they got moved --- error_reporting.cpp DELETED --- --- ksort.cpp DELETED --- --- mysql.cpp DELETED --- |
From: <da...@us...> - 2003-08-05 23:25:58
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv20410 Modified Files: convert.php functions.php php_var.cpp testfile.php tokenflow.php Log Message: Partial class support (segfaults\!). Final commit for this branch of the project. Index: convert.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** convert.php 5 Aug 2003 01:52:38 -0000 1.22 --- convert.php 5 Aug 2003 23:25:55 -0000 1.23 *************** *** 62,65 **** --- 62,67 ---- $gen = new Generator($tokenizer); list($code, $flags) = $gen->Convert(); + if(DEBUG) + $flags .= ' -g'; $lines = explode("\n", $code); if(DEBUG == true) { Index: functions.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** functions.php 5 Aug 2003 05:58:00 -0000 1.37 --- functions.php 5 Aug 2003 23:25:55 -0000 1.38 *************** *** 51,61 **** 'socket_write' => array('unistd.h', 'sockets/socket_write.cpp'), 'socket_read' => array(null, 'sockets/socket_read.cpp'), ! 'opendir' => array(array('cstdio', 'dirent.h'), 'dir/opendir.cpp'), ! 'readdir' => array(array('cstdio', 'dirent.h'), 'dir/readdir.cpp'), ! 'closedir' => array(array('cstdio', 'dirent.h'), 'dir/closedir.cpp'), ! 'glClear' => array(array('GL/gl.h', 'GL/glu.h'), null, array('GLU', 'GL')), 'glutWireCube' => array('GL/glut.h', null, array('GLU', 'GL', 'glut')), 'glLightfv' => array(array('GL/gl.h', 'GL/glu.h'), 'glu/glLightfv.cpp'), ! 'glutInit' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutInit.cpp'), 'glutReshapeFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutReshapeFunc.cpp'), 'glutMouseFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutMouseFunc.cpp'), --- 51,61 ---- 'socket_write' => array('unistd.h', 'sockets/socket_write.cpp'), 'socket_read' => array(null, 'sockets/socket_read.cpp'), ! 'opendir' => array(array('cstdio', 'dirent.h'), 'opendir.cpp'), ! 'readdir' => array(array('cstdio', 'dirent.h'), 'readdir.cpp'), ! 'closedir' => array(array('cstdio', 'dirent.h'), 'closedir.cpp'), ! 'glClear' => array(array('GL/gl.h', 'GL/glu.h'), null, array('GLU', 'GL', 'glut')), 'glutWireCube' => array('GL/glut.h', null, array('GLU', 'GL', 'glut')), 'glLightfv' => array(array('GL/gl.h', 'GL/glu.h'), 'glu/glLightfv.cpp'), ! 'glutInit' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutInit.cpp', array('GLU', 'GL', 'glut')), 'glutReshapeFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutReshapeFunc.cpp'), 'glutMouseFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutMouseFunc.cpp'), *************** *** 63,66 **** --- 63,67 ---- 'glutButtonBoxFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutButtonBoxFunc.cpp'), 'glutKeyboardFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutKeyboardFunc.cpp'), + 'glutCreateMenu' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutCreateMenu.cpp'), null ); Index: php_var.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** php_var.cpp 5 Aug 2003 02:23:20 -0000 1.23 --- php_var.cpp 5 Aug 2003 23:25:55 -0000 1.24 *************** *** 24,28 **** return buf; } - class php_var { --- 24,27 ---- *************** *** 37,40 **** --- 36,40 ---- container = str; type = PHP_STRING; + cout << "Bleh!" << endl; } php_var(double i) *************** *** 396,404 **** } } - void operator/(php_var i) - { - if(type == PHP_INT) - container = doublestring(atof(container.c_str()) / atof(i.container.c_str())); - } void operator-(php_var i) { --- 396,399 ---- *************** *** 419,422 **** --- 414,418 ---- int type; // Contains current type. }; + template<typename T> inline T * OBJ(php_var obj) { return (reinterpret_cast<T *>(obj.res)); } ostream &operator<<( ostream &out, const php_var &var ) { *************** *** 438,441 **** --- 434,441 ---- { return (php_var)((int) l - (int) r); + } + float operator/(php_var &l, php_var &r) + { + return (float) *l / (float) *r; } #define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false) Index: testfile.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** testfile.php 5 Aug 2003 00:48:38 -0000 1.44 --- testfile.php 5 Aug 2003 23:25:55 -0000 1.45 *************** *** 21,23 **** } } ! ?> --- 21,23 ---- } } ! ?> \ No newline at end of file Index: tokenflow.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** tokenflow.php 4 Aug 2003 23:46:24 -0000 1.48 --- tokenflow.php 5 Aug 2003 23:25:55 -0000 1.49 *************** *** 85,90 **** default: list($parameters[], $z) = $this->parse_statement($tokenizer, $z); - if($parameters[count($parameters) - 1] == '"\n"') - $parameters[count($parameters) - 1] = 'endl'; break; } --- 85,88 ---- *************** *** 543,546 **** --- 541,552 ---- if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; + if(is_array($tokenizer->tokens[$i + 1]) && $tokenizer->tokens[$i + 1][0] == T_OBJECT_OPERATOR) + { + if(strtolower($data_) == '$this') + $code .= 'this.'; + else + $code .= 'OBJ<' . $this->objects[$data_] . '>(_' . substr($data_, 1) . ')->'; + break; + } if(in_array(substr($data_, 1), $this->scope[$this->curfunction]) || $this->inclass == true) $code .= '_' . substr($data_, 1); *************** *** 559,569 **** if(strtolower($data_) == 'true' || strtolower($data_) == 'false' || strtolower($data_) == 'null') $code .= '(php_var) ' . strtolower($data_); - elseif($tokenizer->tokens[$i + 1] != '(') - $code .= $data_; elseif(is_array($tokenizer->tokens[$i - 1]) && $tokenizer->tokens[$i - 1][0] == T_NEW) { $code .= '(void *) new ' . $data_; ! $this->objects[] = array($tokenizer->tokens[$i - 3][1], $data_); } else { --- 565,577 ---- if(strtolower($data_) == 'true' || strtolower($data_) == 'false' || strtolower($data_) == 'null') $code .= '(php_var) ' . strtolower($data_); elseif(is_array($tokenizer->tokens[$i - 1]) && $tokenizer->tokens[$i - 1][0] == T_NEW) { $code .= '(void *) new ' . $data_; ! $this->objects[$tokenizer->tokens[$i - 3][1]] = $data_; } + elseif(is_array($tokenizer->tokens[$i - 1]) && $tokenizer->tokens[$i - 1][0] == T_OBJECT_OPERATOR) + $code .= '_' . $data_; + elseif($tokenizer->tokens[$i + 1] != '(') + $code .= $data_; else { *************** *** 572,578 **** } break; - case T_OBJECT_OPERATOR: - $code .= '->'; - break; case '=': $params[] = $pre . $code . $post; --- 580,583 ---- *************** *** 587,596 **** --- 592,610 ---- break; case T_CONSTANT_ENCAPSED_STRING: + if($data_ == '"\n"') + { + $code .='endl'; + break; + } if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; + else + $code .= '(php_var)'; $code .= '"' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"'; break; case T_DNUMBER: case T_LNUMBER: + if(($tokenizer->tokens[$i - 2] == ',' || $tokenizer->tokens[$i - 2] == '(' || $tokenizer->tokens[$i - 2] == '.') && $tokenizer->tokens[$i - 1] == '-') + $data_ = '-' . $data_; if($inconcat == true && $inbrace == false) $code .= '(string)(const char*)'; *************** *** 658,662 **** break; case '-': ! $code .= ' - '; break; case '+': --- 672,677 ---- break; case '-': ! if($tokenizer->tokens[$i - 1] != ',' && $tokenizer->tokens[$i - 1] != '(' && $tokenizer->tokens[$i - 1] != '.') ! $code .= ' - '; break; case '+': |
Update of /cvsroot/binaryphp/binaryphp/functions In directory sc8-pr-cvs1:/tmp/cvs-serv11734 Removed Files: closedir.cpp count.cpp explode.cpp fwrite.cpp implode.cpp is_array.cpp is_bool.cpp is_int.cpp is_null.cpp is_resource.cpp is_string.cpp ltrim.cpp opendir.cpp passthru.cpp readdir.cpp rtrim.cpp shell_exec.cpp substr.cpp token_get_all.cpp token_name.cpp trim.cpp ucfirst.cpp ucwords.cpp var_dump.cpp Log Message: --- closedir.cpp DELETED --- --- count.cpp DELETED --- --- explode.cpp DELETED --- --- fwrite.cpp DELETED --- --- implode.cpp DELETED --- --- is_array.cpp DELETED --- --- is_bool.cpp DELETED --- --- is_int.cpp DELETED --- --- is_null.cpp DELETED --- --- is_resource.cpp DELETED --- --- is_string.cpp DELETED --- --- ltrim.cpp DELETED --- --- opendir.cpp DELETED --- --- passthru.cpp DELETED --- --- readdir.cpp DELETED --- --- rtrim.cpp DELETED --- --- shell_exec.cpp DELETED --- --- substr.cpp DELETED --- --- token_get_all.cpp DELETED --- --- token_name.cpp DELETED --- --- trim.cpp DELETED --- --- ucfirst.cpp DELETED --- --- ucwords.cpp DELETED --- --- var_dump.cpp DELETED --- |
From: <ama...@us...> - 2003-08-05 18:09:29
|
Update of /cvsroot/binaryphp/binaryphp/tests In directory sc8-pr-cvs1:/tmp/cvs-serv29550/tests Added Files: count.php implode.php in_array.php ksort.php Log Message: added some unit tests --- NEW FILE: count.php --- <?php $array = array(1, 2, 3, 4); echo count($array); ?> --- NEW FILE: implode.php --- <?php $array = array('This', 'is', 'a', 'test.'); echo implode(', ' $array); ?> --- NEW FILE: in_array.php --- <?php $array = array(1, 2, 3, 4); if(in_array(1, $array)) echo 'Element found.'; ?> --- NEW FILE: ksort.php --- <?php $fruits = array('d' => 'lemon', 'a' => 'orange', 'b' => 'banana', 'c' => 'apple'); ksort ($fruits); echo implode("\n", $fruits); ?> |
From: <ama...@us...> - 2003-08-05 18:07:52
|
Update of /cvsroot/binaryphp/binaryphp/tests In directory sc8-pr-cvs1:/tmp/cvs-serv29275/tests Log Message: Directory /cvsroot/binaryphp/binaryphp/tests added to the repository |
From: <ama...@us...> - 2003-08-05 06:19:33
|
Update of /cvsroot/binaryphp/binaryphp/functions/tokenizer In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/tokenizer Added Files: token_get_all.cpp token_name.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: token_get_all.cpp --- php_var token_get_all(php_var source) { php_var ret = array(); int i = 0; return ret; } --- NEW FILE: token_name.cpp --- #define T_INCLUDE 257 #define T_INCLUDE_ONCE 258 #define T_EVAL 259 #define T_REQUIRE 260 #define T_REQUIRE_ONCE 261 #define T_LOGICAL_OR 262 #define T_LOGICAL_XOR 263 #define T_LOGICAL_AND 264 #define T_PRINT 265 #define T_PLUS_EQUAL 266 #define T_MINUS_EQUAL 267 #define T_MUL_EQUAL 268 #define T_DIV_EQUAL 269 #define T_CONCAT_EQUAL 270 #define T_MOD_EQUAL 271 #define T_AND_EQUAL 272 #define T_OR_EQUAL 273 #define T_XOR_EQUAL 274 #define T_SL_EQUAL 275 #define T_SR_EQUAL 276 #define T_BOOLEAN_OR 277 #define T_BOOLEAN_AND 278 #define T_IS_EQUAL 279 #define T_IS_NOT_EQUAL 280 #define T_IS_IDENTICAL 281 #define T_IS_NOT_IDENTICAL 282 #define T_IS_SMALLER_OR_EQUAL 283 #define T_IS_GREATER_OR_EQUAL 284 #define T_SL 285 #define T_SR 286 #define T_INC 287 #define T_DEC 288 #define T_INT_CAST 289 #define T_DOUBLE_CAST 290 #define T_STRING_CAST 291 #define T_ARRAY_CAST 292 #define T_OBJECT_CAST 293 #define T_BOOL_CAST 294 #define T_UNSET_CAST 295 #define T_NEW 296 #define T_EXIT 297 #define T_IF 298 #define T_ELSEIF 299 #define T_ELSE 300 #define T_ENDIF 301 #define T_LNUMBER 302 #define T_DNUMBER 303 #define T_STRING 304 #define T_STRING_VARNAME 305 #define T_VARIABLE 306 #define T_NUM_STRING 307 #define T_INLINE_HTML 308 #define T_CHARACTER 309 #define T_BAD_CHARACTER 310 #define T_ENCAPSED_AND_WHITESPACE 311 #define T_CONSTANT_ENCAPSED_STRING 312 #define T_ECHO 313 #define T_DO 314 #define T_WHILE 315 #define T_ENDWHILE 316 #define T_FOR 317 #define T_ENDFOR 318 #define T_FOREACH 319 #define T_ENDFOREACH 320 #define T_DECLARE 321 #define T_ENDDECLARE 322 #define T_AS 323 #define T_SWITCH 324 #define T_ENDSWITCH 325 #define T_CASE 326 #define T_DEFAULT 327 #define T_BREAK 328 #define T_CONTINUE 329 #define T_OLD_FUNCTION 330 #define T_FUNCTION 331 #define T_CONST 332 #define T_RETURN 333 #define T_USE 334 #define T_GLOBAL 335 #define T_STATIC 336 #define T_VAR 337 #define T_UNSET 338 #define T_ISSET 339 #define T_EMPTY 340 #define T_CLASS 341 #define T_EXTENDS 342 #define T_OBJECT_OPERATOR 343 #define T_DOUBLE_ARROW 344 #define T_LIST 345 #define T_ARRAY 346 #define T_CLASS_C 347 #define T_FUNC_C 348 #define T_LINE 349 #define T_FILE 350 #define T_COMMENT 351 #define T_ML_COMMENT 352 #define T_OPEN_TAG 353 #define T_OPEN_TAG_WITH_ECHO 354 #define T_CLOSE_TAG 355 #define T_WHITESPACE 356 #define T_START_HEREDOC 357 #define T_END_HEREDOC 358 #define T_DOLLAR_OPEN_CURLY_BRACES 359 #define T_CURLY_OPEN 360 #define T_PAAMAYIM_NEKUDOTAYIM 361 php_var token_name(php_var token) { switch ((int)token) { case T_INCLUDE: return "T_INCLUDE"; case T_INCLUDE_ONCE: return "T_INCLUDE_ONCE"; case T_EVAL: return "T_EVAL"; case T_REQUIRE: return "T_REQUIRE"; case T_REQUIRE_ONCE: return "T_REQUIRE_ONCE"; case T_LOGICAL_OR: return "T_LOGICAL_OR"; case T_LOGICAL_XOR: return "T_LOGICAL_XOR"; case T_LOGICAL_AND: return "T_LOGICAL_AND"; case T_PRINT: return "T_PRINT"; case T_PLUS_EQUAL: return "T_PLUS_EQUAL"; case T_MINUS_EQUAL: return "T_MINUS_EQUAL"; case T_MUL_EQUAL: return "T_MUL_EQUAL"; case T_DIV_EQUAL: return "T_DIV_EQUAL"; case T_CONCAT_EQUAL: return "T_CONCAT_EQUAL"; case T_MOD_EQUAL: return "T_MOD_EQUAL"; case T_AND_EQUAL: return "T_AND_EQUAL"; case T_OR_EQUAL: return "T_OR_EQUAL"; case T_XOR_EQUAL: return "T_XOR_EQUAL"; case T_SL_EQUAL: return "T_SL_EQUAL"; case T_SR_EQUAL: return "T_SR_EQUAL"; case T_BOOLEAN_OR: return "T_BOOLEAN_OR"; case T_BOOLEAN_AND: return "T_BOOLEAN_AND"; case T_IS_EQUAL: return "T_IS_EQUAL"; case T_IS_NOT_EQUAL: return "T_IS_NOT_EQUAL"; case T_IS_IDENTICAL: return "T_IS_IDENTICAL"; case T_IS_NOT_IDENTICAL: return "T_IS_NOT_IDENTICAL"; case T_IS_SMALLER_OR_EQUAL: return "T_IS_SMALLER_OR_EQUAL"; case T_IS_GREATER_OR_EQUAL: return "T_IS_GREATER_OR_EQUAL"; case T_SL: return "T_SL"; case T_SR: return "T_SR"; case T_INC: return "T_INC"; case T_DEC: return "T_DEC"; case T_INT_CAST: return "T_INT_CAST"; case T_DOUBLE_CAST: return "T_DOUBLE_CAST"; case T_STRING_CAST: return "T_STRING_CAST"; case T_ARRAY_CAST: return "T_ARRAY_CAST"; case T_OBJECT_CAST: return "T_OBJECT_CAST"; case T_BOOL_CAST: return "T_BOOL_CAST"; case T_UNSET_CAST: return "T_UNSET_CAST"; case T_NEW: return "T_NEW"; case T_EXIT: return "T_EXIT"; case T_IF: return "T_IF"; case T_ELSEIF: return "T_ELSEIF"; case T_ELSE: return "T_ELSE"; case T_ENDIF: return "T_ENDIF"; case T_LNUMBER: return "T_LNUMBER"; case T_DNUMBER: return "T_DNUMBER"; case T_STRING: return "T_STRING"; case T_STRING_VARNAME: return "T_STRING_VARNAME"; case T_VARIABLE: return "T_VARIABLE"; case T_NUM_STRING: return "T_NUM_STRING"; case T_INLINE_HTML: return "T_INLINE_HTML"; case T_CHARACTER: return "T_CHARACTER"; case T_BAD_CHARACTER: return "T_BAD_CHARACTER"; case T_ENCAPSED_AND_WHITESPACE: return "T_ENCAPSED_AND_WHITESPACE"; case T_CONSTANT_ENCAPSED_STRING: return "T_CONSTANT_ENCAPSED_STRING"; case T_ECHO: return "T_ECHO"; case T_DO: return "T_DO"; case T_WHILE: return "T_WHILE"; case T_ENDWHILE: return "T_ENDWHILE"; case T_FOR: return "T_FOR"; case T_ENDFOR: return "T_ENDFOR"; case T_FOREACH: return "T_FOREACH"; case T_ENDFOREACH: return "T_ENDFOREACH"; case T_DECLARE: return "T_DECLARE"; case T_ENDDECLARE: return "T_ENDDECLARE"; case T_AS: return "T_AS"; case T_SWITCH: return "T_SWITCH"; case T_ENDSWITCH: return "T_ENDSWITCH"; case T_CASE: return "T_CASE"; case T_DEFAULT: return "T_DEFAULT"; case T_BREAK: return "T_BREAK"; case T_CONTINUE: return "T_CONTINUE"; case T_OLD_FUNCTION: return "T_OLD_FUNCTION"; case T_FUNCTION: return "T_FUNCTION"; case T_CONST: return "T_CONST"; case T_RETURN: return "T_RETURN"; case T_USE: return "T_USE"; case T_GLOBAL: return "T_GLOBAL"; case T_STATIC: return "T_STATIC"; case T_VAR: return "T_VAR"; case T_UNSET: return "T_UNSET"; case T_ISSET: return "T_ISSET"; case T_EMPTY: return "T_EMPTY"; case T_CLASS: return "T_CLASS"; case T_EXTENDS: return "T_EXTENDS"; case T_OBJECT_OPERATOR: return "T_OBJECT_OPERATOR"; case T_DOUBLE_ARROW: return "T_DOUBLE_ARROW"; case T_LIST: return "T_LIST"; case T_ARRAY: return "T_ARRAY"; case T_CLASS_C: return "T_CLASS_C"; case T_FUNC_C: return "T_FUNC_C"; case T_LINE: return "T_LINE"; case T_FILE: return "T_FILE"; case T_COMMENT: return "T_COMMENT"; case T_ML_COMMENT: return "T_ML_COMMENT"; case T_OPEN_TAG: return "T_OPEN_TAG"; case T_OPEN_TAG_WITH_ECHO: return "T_OPEN_TAG_WITH_ECHO"; case T_CLOSE_TAG: return "T_CLOSE_TAG"; case T_WHITESPACE: return "T_WHITESPACE"; case T_START_HEREDOC: return "T_START_HEREDOC"; case T_END_HEREDOC: return "T_END_HEREDOC"; case T_DOLLAR_OPEN_CURLY_BRACES: return "T_DOLLAR_OPEN_CURLY_BRACES"; case T_CURLY_OPEN: return "T_CURLY_OPEN"; case T_PAAMAYIM_NEKUDOTAYIM: return "T_DOUBLE_COLON"; } return "UNKNOWN"; } |
From: <ama...@us...> - 2003-08-05 06:19:32
|
Update of /cvsroot/binaryphp/binaryphp/functions/mysql In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/mysql Added Files: mysql.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: mysql.cpp --- #define MYSQL_ASSOC 1 #define MYSQL_NUM 2 #define MYSQL_BOTH 3 php_var global_mysql; |
Update of /cvsroot/binaryphp/binaryphp/functions/string In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/string Added Files: explode.cpp ltrim.cpp rtrim.cpp substr.cpp trim.cpp ucfirst.cpp ucwords.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: explode.cpp --- php_var explode(php_var delim_, php_var str_) { string delim = delim_.container; string str = str_.container; php_var arr = array(); unsigned long int pos = 0; unsigned long int lastPos = 0; string temp; int i = 0; if((pos = str.find(delim)) != string::npos) { temp = str.substr(0, pos); arr[i] = temp; lastPos = pos; pos++; } for(i = 1; (pos = str.find(delim, pos)) != string::npos; ++i) { temp = str.substr(lastPos + delim.size(), pos - lastPos - 1); arr[i] = temp; lastPos = pos; pos++; } temp = str.substr(lastPos + delim.size() > str.size() ? 0 : lastPos + delim.size(), str.size() - 1); arr[i] = temp; return arr; } --- NEW FILE: ltrim.cpp --- php_var ltrim(php_var str, php_var charlist = "") { string chrs = charlist.container + " " + "\t" + "\n" + "\r" + "\0" + "\x0B"; int i = 0; int j = 0; bool changed = true; while(changed == true && i < str.container.length()) { changed = false; for(j = 0; j < chrs.length(); ++j) { if(str.container[i] == chrs[j]) { str.container.erase(i, 1); changed = true; break; } } } return str; } --- NEW FILE: rtrim.cpp --- php_var rtrim(php_var str, php_var charlist = "") { string chrs = charlist.container + " " + "\t" + "\n" + "\r" + "\0" + "\x0B"; int i = 0; int j = 0; bool changed = true; for(i = str.container.length() - 1; changed == true && i >= 0; --i) { changed = false; for(j = 0; j < chrs.length(); ++j) { if(str.container[i] == chrs[j]) { str.container.erase(i, 1); changed = true; break; } } } return str; } --- NEW FILE: substr.cpp --- php_var substr(php_var str, php_var pos, php_var len) { if(len == 0) len = str.container.length() - pos; return (php_var) str.container.substr(pos, len); } php_var substr(php_var str, long pos, long len) { if(len == 0) len = str.container.length() - pos; return (php_var) str.container.substr(pos, len); } --- NEW FILE: trim.cpp --- php_var trim(php_var str, php_var charlist = "") { string chrs = charlist.container + " " + "\t" + "\n" + "\r" + "\0" + "\x0B"; int i = 0; int j = 0; bool changed = true; while(changed == true && i < str.container.length()) { changed = false; for(j = 0; j < chrs.length(); ++j) { if(str.container[i] == chrs[j]) { str.container.erase(i, 1); changed = true; break; } } } changed = true; for(i = str.container.length() - 1; changed == true && i >= 0; --i) { changed = false; for(j = 0; j < chrs.length(); ++j) { if(str.container[i] == chrs[j]) { str.container.erase(i, 1); changed = true; break; } } } return str; } --- NEW FILE: ucfirst.cpp --- php_var ucfirst(php_var str) { for(int i = 0; i < str.container.length(); ++i) { if(str.container[i] != ' ') { str.container[i] = toupper(str.container[i]); break; } } return str; } --- NEW FILE: ucwords.cpp --- php_var ucwords(php_var str) { php_var arr = explode(" ", str); int i; for(i = 0; i < arr.keys.size(); ++i) { arr.data[i].container[0] = toupper(arr.data[i].container[0]); } return implode(" ", arr); } |
From: <ama...@us...> - 2003-08-05 06:19:32
|
Update of /cvsroot/binaryphp/binaryphp/functions/exec In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/exec Added Files: passthru.cpp shell_exec.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: passthru.cpp --- php_var passthru(php_var str) { int i; i = system ((char *)str); if(i == -1) { return (php_var) 0; } else { return (php_var) 1; } } --- NEW FILE: shell_exec.cpp --- php_var shell_exec(php_var cmd) { FILE *fp = popen(cmd, "r"); if(fp == NULL) { return (php_var) 0; } string returner; char * buf = (char *) malloc(1024); while(!feof(fp)) { fread(buf, 1, 1023, fp); returner += buf; } pclose(fp); return (php_var) returner; } |
From: <ama...@us...> - 2003-08-05 06:19:32
|
Update of /cvsroot/binaryphp/binaryphp/functions/errors In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/errors Added Files: error_reporting.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: error_reporting.cpp --- void error_reporting(php_var error_level) { return; } |
From: <ama...@us...> - 2003-08-05 06:19:32
|
Update of /cvsroot/binaryphp/binaryphp/functions/dir In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/dir Added Files: closedir.cpp opendir.cpp readdir.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: closedir.cpp --- php_var closedir(php_var dir_handle) { closedir(dir_handle.res); dir_handle.res = NULL; dir_handle.type = PHP_NULL; return dir_handle; } --- NEW FILE: opendir.cpp --- php_var opendir(php_var path) { php_var dirp; dirp.type = PHP_RESOURCE; dirp.res = (void *) opendir(path.container.c_str()); return dirp; } --- NEW FILE: readdir.cpp --- php_var readdir(php_var dir_handle) { dirent* direntry; DIR *dir = (DIR *) dir_handle.res; direntry = readdir(dir); if(direntry == NULL) return (php_var) false; php_var ret = &(direntry->d_name); cout << direntry->d_name << endl; return ret; } |
From: <ama...@us...> - 2003-08-05 06:19:32
|
Update of /cvsroot/binaryphp/binaryphp/functions/arrays In directory sc8-pr-cvs1:/tmp/cvs-serv4995/functions/arrays Added Files: count.cpp implode.cpp ksort.cpp Log Message: finished cleaning up the functions dir --- NEW FILE: count.cpp --- #define count(var) ((php_var) (var).keys.size()) --- NEW FILE: implode.cpp --- php_var implode(php_var delim, php_var arr) { php_var str; int i; for(i = 0; i < (arr.keys.size() - 1); ++i) { str += arr[i]; str += delim; } str += arr[i]; return str; } --- NEW FILE: ksort.cpp --- php_var ksort(php_var &arr) { php_var temp; int i = 0; for(;;) { if(i >= arr.keys.size()) return 1; if((arr.keys[i].type == PHP_STRING && arr.keys[i+1].type == PHP_STRING && (arr.keys[i].container.compare(arr.keys[i+1].container)) > 0) || (arr.keys[i].type == PHP_STRING && arr.keys[i+1].type == PHP_INT) || (arr.keys[i].type == PHP_INT && arr.keys[i+1].type == PHP_INT && arr.keys[i] > arr.keys[i+1])) { temp = arr.keys[i]; arr.keys[i] = arr.keys[i+1]; arr.keys[i+1] = temp; temp = arr.data[i]; arr.data[i] = arr.data[i+1]; arr.data[i+1] = temp; if(i > 0) --i; else ++i; } else ++i; } } |