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: <ama...@us...> - 2003-08-05 06:18:53
|
Update of /cvsroot/binaryphp/binaryphp/functions/dir In directory sc8-pr-cvs1:/tmp/cvs-serv4937/functions/dir Log Message: Directory /cvsroot/binaryphp/binaryphp/functions/dir added to the repository |
|
From: <ama...@us...> - 2003-08-05 06:18:37
|
Update of /cvsroot/binaryphp/binaryphp/functions/errors In directory sc8-pr-cvs1:/tmp/cvs-serv4901/functions/errors Log Message: Directory /cvsroot/binaryphp/binaryphp/functions/errors added to the repository |
|
From: <ama...@us...> - 2003-08-05 06:18:20
|
Update of /cvsroot/binaryphp/binaryphp/functions/exec In directory sc8-pr-cvs1:/tmp/cvs-serv4868/functions/exec Log Message: Directory /cvsroot/binaryphp/binaryphp/functions/exec added to the repository |
|
From: <ama...@us...> - 2003-08-05 06:18:01
|
Update of /cvsroot/binaryphp/binaryphp/functions/tokenizer In directory sc8-pr-cvs1:/tmp/cvs-serv4801/functions/tokenizer Log Message: Directory /cvsroot/binaryphp/binaryphp/functions/tokenizer added to the repository |
Update of /cvsroot/binaryphp/binaryphp/functions/base
In directory sc8-pr-cvs1:/tmp/cvs-serv4203/functions/base
Added Files:
is_array.cpp is_bool.cpp is_int.cpp is_null.cpp
is_resource.cpp is_string.cpp var_dump.cpp
Log Message:
actually reorganized some files this time
--- NEW FILE: is_array.cpp ---
#define is_array(var) ((var).type == PHP_ARRAY ? (php_var)true : (php_var)false)
--- NEW FILE: is_bool.cpp ---
#define is_bool(var) ((var).type == PHP_BOOL ? (php_var)true : (php_var)false)
--- NEW FILE: is_int.cpp ---
#define is_int(var) ((var).type == PHP_INT ? (php_var)true : (php_var)false)
--- NEW FILE: is_null.cpp ---
#define is_null(var) ((var).type == PHP_NULL ? (php_var)true : (php_var)false)
--- NEW FILE: is_resource.cpp ---
#define is_resource(var) ((var).type == PHP_RESOURCE ? (php_var)true : (php_var)false)
--- NEW FILE: is_string.cpp ---
#define is_string(var) ((var).type == PHP_STRING ? (php_var)true : (php_var)false)
--- NEW FILE: var_dump.cpp ---
void var_dump(php_var var)
{
cout << "Type: ";
switch(var.type) {
case PHP_NULL:
cout << "NULL" << endl;
break;
case PHP_STRING:
cout << "STRING" << "(" << sizeof(var) << ")" << " - " << var.container.length() << " chars - \"" << var.container << "\"" << endl;
break;
case PHP_INT:
cout << "INTEGER" << "(" << sizeof(var) << ") " << var.container << endl;
break;
case PHP_BOOL:
cout << "BOOLEAN" << "(" << sizeof(var) << ") " << var.container << endl;
break;
case PHP_ARRAY:
cout << "ARRAY (" << var.keys.size() << ")" << endl;
for(int i = 0; i < var.keys.size(); ++i) {
cout << "\t\t" << "[" << var.keys[i] << "]" << "\t" << endl;
switch(var.data[i].type) {
case PHP_NULL:
var_dump(var.data[i]);
break;
case PHP_STRING:
var_dump(var.data[i]);
break;
case PHP_INT:
var_dump(var.data[i]);
break;
case PHP_BOOL:
var_dump(var.data[i]);
break;
case PHP_ARRAY:
var_dump(var.data[i]);
break;
case PHP_RESOURCE:
var_dump(var.data[i]);
break;
}
}
break;
case PHP_RESOURCE:
cout << "RESOURCE" << endl;
break;
}
}
|
|
From: <ama...@us...> - 2003-08-05 06:13:23
|
Update of /cvsroot/binaryphp/binaryphp/functions/base In directory sc8-pr-cvs1:/tmp/cvs-serv4146/functions/base Log Message: Directory /cvsroot/binaryphp/binaryphp/functions/base added to the repository |
|
From: <ama...@us...> - 2003-08-05 05:58:03
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv1730
Modified Files:
functions.php
Log Message:
cleaned up functions/ and fixed up functions.php
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** functions.php 4 Aug 2003 23:46:24 -0000 1.36
--- functions.php 5 Aug 2003 05:58:00 -0000 1.37
***************
*** 2,22 ****
$funcs = array('strlen' => array(null, 'string/strlen.cpp'),
'array' => array(null, 'arrays/array.cpp'),
! 'is_null' => array(null, 'is_null.cpp'),
! 'is_string' => array(null, 'is_string.cpp'),
! 'is_int' => array(null, 'is_int.cpp'),
! 'is_bool' => array(null, 'is_bool.cpp'),
! 'is_array' => array(null, 'is_array.cpp'),
! 'count' => array(null, 'count.cpp'),
! 'error_reporting' => array(null, 'error_reporting.cpp'),
'substr' => array(null, 'string/substr.cpp'),
'unlink' => array('stdio.h', 'io/unlink.cpp'),
'strtolower' => array('stdio.h', 'string/strtolower.cpp'),
! 'explode' => array(null, array('arrays/array.cpp', 'explode.cpp')),
! 'implode' => array(null, 'implode.cpp'),
'fopen' => array('cstdio', 'io/fopen.cpp'),
'fread' => array('cstdio', 'io/fread.cpp'),
! 'is_resource' => array(null, 'is_resource.cpp'),
'file_get_contents' => array('stdio.h', 'io/file_get_contents.cpp'),
! 'file' => array('stdio.h', array('arrays/array.cpp', 'explode.cpp', 'count.cpp', 'file.cpp')),
'strstr' => array(null, 'string/strstr.cpp'),
'strpos' => array(null, 'string/strpos.cpp'),
--- 2,22 ----
$funcs = array('strlen' => array(null, 'string/strlen.cpp'),
'array' => array(null, 'arrays/array.cpp'),
! 'is_null' => array(null, 'base/is_null.cpp'),
! 'is_string' => array(null, 'base/is_string.cpp'),
! 'is_int' => array(null, 'base/is_int.cpp'),
! 'is_bool' => array(null, 'base/is_bool.cpp'),
! 'is_array' => array(null, 'base/is_array.cpp'),
! 'count' => array(null, 'arrays/count.cpp'),
! 'error_reporting' => array(null, 'errors/error_reporting.cpp'),
'substr' => array(null, 'string/substr.cpp'),
'unlink' => array('stdio.h', 'io/unlink.cpp'),
'strtolower' => array('stdio.h', 'string/strtolower.cpp'),
! 'explode' => array(null, array('arrays/array.cpp', 'string/explode.cpp')),
! 'implode' => array(null, 'arrays/implode.cpp'),
'fopen' => array('cstdio', 'io/fopen.cpp'),
'fread' => array('cstdio', 'io/fread.cpp'),
! 'is_resource' => array(null, 'base/is_resource.cpp'),
'file_get_contents' => array('stdio.h', 'io/file_get_contents.cpp'),
! 'file' => array('stdio.h', array('arrays/array.cpp', 'string/explode.cpp', 'arrays/count.cpp', 'string/file.cpp')),
'strstr' => array(null, 'string/strstr.cpp'),
'strpos' => array(null, 'string/strpos.cpp'),
***************
*** 25,57 ****
'fclose' => array('cstdio', 'io/fclose.cpp'),
'fwrite' => array('cstdio', 'io/fwrite.cpp'),
! 'array_reverse' => array(null, 'array_reverse'),
! 'in_array' => array(null, 'in_array.cpp'),
! 'shell_exec' => array(array('cstdio','cstdlib'), 'shell_exec.cpp'),
! 'passthru' => array('cstdlib', 'passthru.cpp'),
! 'var_dump' => array(array('cstdio','cstdlib'), 'var_dump.cpp'),
'define' => array(null, null),
! 'token_name' => array(null, 'token_name.cpp'),
! 'token_get_all' => array(null, 'token_get_all.cpp'),
'touch' => array(null, 'io/touch.cpp'),
! 'ksort' => array(null, 'ksort.cpp'),
'stristr' => array('stdio.h', array('string/strtolower.cpp', 'string/stristr.cpp')),
! 'ucwords' => array('stdio.h', array('arrays/array.cpp', 'explode.cpp', 'implode.cpp', 'ucwords.cpp')),
! 'ucfirst' => array('cstdio', 'ucfirst.cpp'),
! 'trim' => array(null, 'trim.cpp'),
! 'rtrim' => array(null, 'rtrim.cpp'),
! 'ltrim' => array(null, 'ltrim.cpp'),
! 'mysql_connect' => array('mysql/mysql.h', array('mysql.cpp', 'arrays/array.cpp', 'explode.cpp', 'mysql_connect.cpp'), 'mysqlclient'),
! 'mysql_select_db' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_select_db.cpp'), 'mysqlclient'),
! 'mysql_query' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_query.cpp'), 'mysqlclient'),
! 'mysql_fetch_row' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_fetch_row.cpp'), 'mysqlclient'),
! 'mysql_fetch_array' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_fetch_array.cpp'), 'mysqlclient'),
! 'mysql_error' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_error.cpp'), 'mysqlclient'),
'socket_create' => array('sys/socket.h', 'sockets/socket_create.cpp'),
'socket_connect' => array(array('sys/socket.h', 'netinet/in.h', 'arpa/inet.h', 'netdb.h'), 'sockets/socket_connect.cpp'),
'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')),
'glutWireCube' => array('GL/glut.h', null, array('GLU', 'GL', 'glut')),
--- 25,57 ----
'fclose' => array('cstdio', 'io/fclose.cpp'),
'fwrite' => array('cstdio', 'io/fwrite.cpp'),
! 'array_reverse' => array(null, 'arrays/array_reverse.cpp'),
! 'in_array' => array(null, 'base/in_array.cpp'),
! 'shell_exec' => array(array('cstdio','cstdlib'), 'exec/shell_exec.cpp'),
! 'passthru' => array('cstdlib', 'exec/passthru.cpp'),
! 'var_dump' => array(array('cstdio','cstdlib'), 'base/var_dump.cpp'),
'define' => array(null, null),
! 'token_name' => array(null, 'tokenizer/token_name.cpp'),
! 'token_get_all' => array(null, 'tokenizer/token_get_all.cpp'),
'touch' => array(null, 'io/touch.cpp'),
! 'ksort' => array(null, 'arrays/ksort.cpp'),
'stristr' => array('stdio.h', array('string/strtolower.cpp', 'string/stristr.cpp')),
! 'ucwords' => array('stdio.h', array('arrays/array.cpp', 'arrays/explode.cpp', 'arrays/implode.cpp', 'string/ucwords.cpp')),
! 'ucfirst' => array('cstdio', 'string/ucfirst.cpp'),
! 'trim' => array(null, 'string/trim.cpp'),
! 'rtrim' => array(null, 'string/rtrim.cpp'),
! 'ltrim' => array(null, 'string/ltrim.cpp'),
! 'mysql_connect' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'arrays/array.cpp', 'arrays/explode.cpp', 'mysql/mysql_connect.cpp'), 'mysqlclient'),
! 'mysql_select_db' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'mysql/mysql_select_db.cpp'), 'mysqlclient'),
! 'mysql_query' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'mysql/mysql_query.cpp'), 'mysqlclient'),
! 'mysql_fetch_row' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'mysql/mysql_fetch_row.cpp'), 'mysqlclient'),
! 'mysql_fetch_array' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'mysql/mysql_fetch_array.cpp'), 'mysqlclient'),
! 'mysql_error' => array('mysql/mysql.h', array('mysql/mysql.cpp', 'mysql/mysql_error.cpp'), 'mysqlclient'),
'socket_create' => array('sys/socket.h', 'sockets/socket_create.cpp'),
'socket_connect' => array(array('sys/socket.h', 'netinet/in.h', 'arpa/inet.h', 'netdb.h'), 'sockets/socket_connect.cpp'),
'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')),
|
|
From: <ama...@us...> - 2003-08-05 05:58:03
|
Update of /cvsroot/binaryphp/binaryphp/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv1730/examples
Modified Files:
irc.php
Log Message:
cleaned up functions/ and fixed up functions.php
Index: irc.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/examples/irc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** irc.php 4 Aug 2003 05:38:31 -0000 1.1
--- irc.php 5 Aug 2003 05:58:00 -0000 1.2
***************
*** 12,17 ****
$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");
}
! ?>
\ No newline at end of file
--- 12,26 ----
$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");
! }
}
! ?>
|
|
From: <as...@us...> - 2003-08-05 02:23:23
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv6866
Modified Files:
php_var.cpp
Log Message:
Fixed a commited conflict.
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** php_var.cpp 5 Aug 2003 01:26:57 -0000 1.22
--- php_var.cpp 5 Aug 2003 02:23:20 -0000 1.23
***************
*** 435,445 ****
return(v < i);
}
- <<<<<<< php_var.cpp
- #define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
- =======
- php_var operator+(php_var l, php_var r)
- {
- return (php_var)((int) l + (int) r);
- }
php_var operator-(php_var l, php_var r)
{
--- 435,438 ----
***************
*** 447,449 ****
}
#define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
- >>>>>>> 1.21
--- 440,441 ----
|
|
From: <rha...@us...> - 2003-08-05 01:52:41
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv1935
Modified Files:
convert.php
Log Message:
Fixed some notices, code only shows now if -v argument is present
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** convert.php 5 Aug 2003 01:47:06 -0000 1.21
--- convert.php 5 Aug 2003 01:52:38 -0000 1.22
***************
*** 6,10 ****
echo 'Usage: convert.php --if <inputfile.php> --of <output> [-v | --verbose] [-h | --help]' , "\n";
}
!
/* If there are arguments, cycle through em */
if ($_SERVER['argc'] > 4) {
--- 6,10 ----
echo 'Usage: convert.php --if <inputfile.php> --of <output> [-v | --verbose] [-h | --help]' , "\n";
}
! $debug = false;
/* If there are arguments, cycle through em */
if ($_SERVER['argc'] > 4) {
|
|
From: <rha...@us...> - 2003-08-05 01:47:09
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv1011
Modified Files:
convert.php
Log Message:
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** convert.php 5 Aug 2003 00:49:04 -0000 1.20
--- convert.php 5 Aug 2003 01:47:06 -0000 1.21
***************
*** 1,5 ****
#!/usr/bin/php
<?php
!
function showUsage()
{
--- 1,5 ----
#!/usr/bin/php
<?php
!
function showUsage()
{
***************
*** 11,15 ****
for($i = 1; $i <= $_SERVER['argc']; ++$i) {
if(@$_SERVER['argv'][$i] == '-v' OR @$_SERVER['argv'][$i] == '--verbose') {
! define('DEBUG', true);
}
if(@$_SERVER['argv'][$i] == '--if') {
--- 11,15 ----
for($i = 1; $i <= $_SERVER['argc']; ++$i) {
if(@$_SERVER['argv'][$i] == '-v' OR @$_SERVER['argv'][$i] == '--verbose') {
! $debug = true;
}
if(@$_SERVER['argv'][$i] == '--if') {
***************
*** 20,23 ****
--- 20,24 ----
$output = '';
$output = $_SERVER['argv'][$i + 1];
+ $outputfile = $output . '.cpp';
}
if(@$_SERVER['argv'][$i] == '--help' OR @$_SERVER['argv'][$i] == '-h') {
***************
*** 39,42 ****
--- 40,49 ----
}
+ if($debug == true) {
+ define('DEBUG', true);
+ } else {
+ define('DEBUG', false);
+ }
+
if (substr(PHP_OS, 0, 3) == 'WIN') {
define('BINARYPHP_OS', 'Windows');
***************
*** 45,52 ****
}
error_reporting(E_ALL);
- if(@$_SERVER['argv'][1]=='debug')
- define('DEBUG', true);
- else
- define('DEBUG', false);
if(!empty($_SERVER['DOCUMENT_ROOT']))
header('Content-Type: text/plain');
--- 52,55 ----
***************
*** 60,66 ****
list($code, $flags) = $gen->Convert();
$lines = explode("\n", $code);
foreach($lines as $line => $cod)
echo $line + 1, ': ', $cod, "\n";
! $fp = fopen('test.cpp', 'wt');
fwrite($fp, $code);
fclose($fp);
--- 63,71 ----
list($code, $flags) = $gen->Convert();
$lines = explode("\n", $code);
+ if(DEBUG == true) {
foreach($lines as $line => $cod)
echo $line + 1, ': ', $cod, "\n";
! }
! $fp = fopen($output . '.cpp', 'wt');
fwrite($fp, $code);
fclose($fp);
***************
*** 68,72 ****
touch('log');
if(BINARYPHP_OS == 'Windows') {
! $comp = 'cl -c /nologo /MT /W3 /GX /FD -DWIN32 /Fotest.obj test.cpp >> log';
echo $comp, "\n\n";
shell_exec($comp);
--- 73,77 ----
touch('log');
if(BINARYPHP_OS == 'Windows') {
! $comp = 'cl -c /nologo /MT /W3 /GX /FD -DWIN32 /Fotest.obj ' . $outputfile . ' >> log';
echo $comp, "\n\n";
shell_exec($comp);
***************
*** 75,83 ****
else
$opt='-$comp';
! $release = 'link test.obj -nologo ' .$opt .' -incremental:no -opt:ref '.$flags.' -out:' . $output . ' >> log';
echo $comp, "\n\n";
shell_exec($comp);
} else {
! $comp = 'g++ -o ' . $output . ' test.cpp ' . $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
--- 80,88 ----
else
$opt='-$comp';
! $release = 'link ' .$output . '.obj -nologo ' .$opt .' -incremental:no -opt:ref '.$flags.' -out:' . $output . ' >> log';
echo $comp, "\n\n";
shell_exec($comp);
} else {
! $comp = 'g++ -o ' . $output . ' ' .$outputfile. ' '. $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
***************
*** 85,104 ****
echo implode(null, file('log'));
unlink('log');
- echo "\n\n", 'Running:', "\n";
- if(BINARYPHP_OS == 'Windows') {
- passthru('test.exe');
- if(!DEBUG) {
- unlink('test.exe');
- shell_exec('del *.obj');
- shell_exec('del *.idb');
- if(is_file('test.pdb'))
- unlink('test.pdb');
- }
- } else {
- passthru('./' . $output);
- if(!DEBUG)
- unlink($output);
- }
- if(!DEBUG)
- unlink('test.cpp');
?>
--- 90,92 ----
|
|
From: <rha...@us...> - 2003-08-05 01:27:00
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv30305
Modified Files:
php_var.cpp
Log Message:
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** php_var.cpp 4 Aug 2003 23:46:24 -0000 1.21
--- php_var.cpp 5 Aug 2003 01:26:57 -0000 1.22
***************
*** 3,6 ****
--- 3,7 ----
#include <vector>
#include <stdio.h>
+ #include <iostream>
#define PHP_NULL 0
#define PHP_STRING 1
***************
*** 424,427 ****
--- 425,429 ----
else
out << var.container;
+ return out;
}
bool operator<(int i,php_var v)
***************
*** 433,436 ****
--- 435,441 ----
return(v < i);
}
+ <<<<<<< php_var.cpp
+ #define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
+ =======
php_var operator+(php_var l, php_var r)
{
***************
*** 442,443 ****
--- 447,449 ----
}
#define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
+ >>>>>>> 1.21
|
|
From: <rha...@us...> - 2003-08-05 00:49:08
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv25471
Modified Files:
convert.php
Log Message:
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** convert.php 5 Aug 2003 00:36:08 -0000 1.19
--- convert.php 5 Aug 2003 00:49:04 -0000 1.20
***************
*** 79,83 ****
shell_exec($comp);
} else {
! $comp = 'g++ -o ' . $output . ' ' . $input. ' ' . $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
--- 79,83 ----
shell_exec($comp);
} else {
! $comp = 'g++ -o ' . $output . ' test.cpp ' . $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
***************
*** 101,104 ****
}
if(!DEBUG)
! unlink($input);
?>
--- 101,104 ----
}
if(!DEBUG)
! unlink('test.cpp');
?>
|
|
From: <ama...@us...> - 2003-08-05 00:48:41
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv25362/examples Added Files: helloworld.php Log Message: added hello world example --- NEW FILE: helloworld.php --- <?php echo 'Hello World', "\n"; ?> |
|
From: <ama...@us...> - 2003-08-05 00:48:41
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv25362
Modified Files:
testfile.php
Log Message:
added hello world example
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** testfile.php 4 Aug 2003 05:38:31 -0000 1.43
--- testfile.php 5 Aug 2003 00:48:38 -0000 1.44
***************
*** 14,17 ****
if(strpos('TestBOT: PING?', $temp[2]) !== false)
socket_write($sock, 'PRIVMSG ' . $temp3[2] . ' :' . $temp2[0] . ": PONG!\r\n");
}
! ?>
\ No newline at end of file
--- 14,23 ----
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");
+ }
}
! ?>
|
|
From: <rha...@us...> - 2003-08-05 00:36:14
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv23711
Modified Files:
convert.php
Log Message:
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** convert.php 4 Aug 2003 23:46:24 -0000 1.18
--- convert.php 5 Aug 2003 00:36:08 -0000 1.19
***************
*** 1,4 ****
<?php
! if (substr(PHP_OS, 0, 3) == 'WIN') {
define('BINARYPHP_OS', 'Windows');
} else {
--- 1,43 ----
+ #!/usr/bin/php
<?php
!
! function showUsage()
! {
! echo 'Usage: convert.php --if <inputfile.php> --of <output> [-v | --verbose] [-h | --help]' , "\n";
! }
!
! /* If there are arguments, cycle through em */
! if ($_SERVER['argc'] > 4) {
! for($i = 1; $i <= $_SERVER['argc']; ++$i) {
! if(@$_SERVER['argv'][$i] == '-v' OR @$_SERVER['argv'][$i] == '--verbose') {
! define('DEBUG', true);
! }
! if(@$_SERVER['argv'][$i] == '--if') {
! $input = '';
! $input = $_SERVER['argv'][$i + 1];
! }
! if(@$_SERVER['argv'][$i] == '--of') {
! $output = '';
! $output = $_SERVER['argv'][$i + 1];
! }
! if(@$_SERVER['argv'][$i] == '--help' OR @$_SERVER['argv'][$i] == '-h') {
! showUsage();
! }
! }
! } else {
! showUsage();
! die ("Too Few Arguments\n");
! }
!
! if(!(isset($input) && strlen(trim($input)) && is_file($input))) {
! showUsage();
! die ($input . " isn't a file\n");
! }
! if(!(isset($output) && strlen(trim($output)))) {
! showUsage();
! die ($output . "isn't a valid output file\n");
! }
!
! if (substr(PHP_OS, 0, 3) == 'WIN') {
define('BINARYPHP_OS', 'Windows');
} else {
***************
*** 16,20 ****
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse('testfile.php');
$tokenizer->Strip();
$gen = new Generator($tokenizer);
--- 55,59 ----
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse($input);
$tokenizer->Strip();
$gen = new Generator($tokenizer);
***************
*** 35,44 ****
$opt='-debug';
else
! $opt='-release';
! $comp = 'link test.obj -nologo '.$opt.' -incremental:no -opt:ref '.$flags.' -out:test.exe >> log';
echo $comp, "\n\n";
shell_exec($comp);
} else {
! $comp = 'g++ -o test test.cpp ' . $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
--- 74,83 ----
$opt='-debug';
else
! $opt='-$comp';
! $release = 'link test.obj -nologo ' .$opt .' -incremental:no -opt:ref '.$flags.' -out:' . $output . ' >> log';
echo $comp, "\n\n";
shell_exec($comp);
} else {
! $comp = 'g++ -o ' . $output . ' ' . $input. ' ' . $flags . ' >> log 2>> log';
echo $comp, "\n\n";
shell_exec($comp);
***************
*** 57,65 ****
}
} else {
! passthru('./test');
if(!DEBUG)
! unlink('test');
}
if(!DEBUG)
! unlink('test.cpp');
?>
--- 96,104 ----
}
} else {
! passthru('./' . $output);
if(!DEBUG)
! unlink($output);
}
if(!DEBUG)
! unlink($input);
?>
|
|
From: <da...@us...> - 2003-08-04 23:46:31
|
Update of /cvsroot/binaryphp/binaryphp/functions/string
In directory sc8-pr-cvs1:/tmp/cvs-serv16567/functions/string
Modified Files:
strpos.cpp
Log Message:
Fixed for gcc/g++3 compatibility.
Index: strpos.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions/string/strpos.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** strpos.cpp 3 Aug 2003 06:36:03 -0000 1.1
--- strpos.cpp 4 Aug 2003 23:46:25 -0000 1.2
***************
*** 1,7 ****
php_var strpos(php_var haystack, php_var needle, php_var pos = 0)
{
! php_var ret = 0;
if((ret = haystack.container.find(needle.container, (int)pos)) != string::npos)
! return ret;
else
return((php_var)false);
--- 1,7 ----
php_var strpos(php_var haystack, php_var needle, php_var pos = 0)
{
! int ret;
if((ret = haystack.container.find(needle.container, (int)pos)) != string::npos)
! return (php_var) ret;
else
return((php_var)false);
|
|
From: <da...@us...> - 2003-08-04 23:46:31
|
Update of /cvsroot/binaryphp/binaryphp/functions/arrays
In directory sc8-pr-cvs1:/tmp/cvs-serv16567/functions/arrays
Modified Files:
array.cpp
Log Message:
Fixed for gcc/g++3 compatibility.
Index: array.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions/arrays/array.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** array.cpp 3 Aug 2003 06:36:02 -0000 1.1
--- array.cpp 4 Aug 2003 23:46:24 -0000 1.2
***************
*** 1,2 ****
--- 1,3 ----
+ #include <stdarg.h>
php_var array(int key = 0, ...)
{
|
|
From: <da...@us...> - 2003-08-04 23:46:31
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv16567
Modified Files:
convert.php functions.php php_var.cpp tokenflow.php
Log Message:
Fixed for gcc/g++3 compatibility.
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** convert.php 4 Aug 2003 05:38:31 -0000 1.17
--- convert.php 4 Aug 2003 23:46:24 -0000 1.18
***************
*** 16,20 ****
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse('testfile2.php');
$tokenizer->Strip();
$gen = new Generator($tokenizer);
--- 16,20 ----
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse('testfile.php');
$tokenizer->Strip();
$gen = new Generator($tokenizer);
***************
*** 63,65 ****
if(!DEBUG)
unlink('test.cpp');
! ?>
\ No newline at end of file
--- 63,65 ----
if(!DEBUG)
unlink('test.cpp');
! ?>
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** functions.php 4 Aug 2003 05:38:31 -0000 1.35
--- functions.php 4 Aug 2003 23:46:24 -0000 1.36
***************
*** 56,60 ****
'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'), 'glLightfv'),
null
);
--- 56,66 ----
'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'),
! 'glutMotionFunc' => array(array('GL/gl.h', 'GL/glu.h', 'GL/glut.h'), 'glut/glutMotionFunc.cpp'),
! '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'),
null
);
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** php_var.cpp 4 Aug 2003 00:48:37 -0000 1.20
--- php_var.cpp 4 Aug 2003 23:46:24 -0000 1.21
***************
*** 1,2 ****
--- 1,3 ----
+ #include <iostream>
#include <string>
#include <vector>
***************
*** 432,434 ****
return(v < i);
}
! #define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
\ No newline at end of file
--- 433,443 ----
return(v < i);
}
! php_var operator+(php_var l, php_var r)
! {
! return (php_var)((int) l + (int) r);
! }
! php_var operator-(php_var l, php_var r)
! {
! return (php_var)((int) l - (int) r);
! }
! #define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** tokenflow.php 4 Aug 2003 05:38:31 -0000 1.47
--- tokenflow.php 4 Aug 2003 23:46:24 -0000 1.48
***************
*** 28,32 ****
global $funcs;
$this->code = array('main' => array());
! $this->prototypes = array('main' => array('int', array('int *_argc', 'char **_argv')));
$this->namespace = 'std';
$this->includes[] = 'sstream';
--- 28,32 ----
global $funcs;
$this->code = array('main' => array());
! $this->prototypes = array('main' => array('int', array('int _argc', 'char **_argv')));
$this->namespace = 'std';
$this->includes[] = 'sstream';
***************
*** 41,47 ****
$this->globals[] = substr($tokenizer->tokens[$a + 1][1], 1);
}
- $this->globals[] = 'argc';
- $this->globals[] = 'argv';
$this->scope[] = $this->globals;
for($a = 0; $a < count($tokenizer->tokens); ++$a)
{
--- 41,47 ----
$this->globals[] = substr($tokenizer->tokens[$a + 1][1], 1);
}
$this->scope[] = $this->globals;
+ $this->scope[0][] = 'argc';
+ $this->scope[0][] = 'argv';
for($a = 0; $a < count($tokenizer->tokens); ++$a)
{
***************
*** 85,88 ****
--- 85,90 ----
default:
list($parameters[], $z) = $this->parse_statement($tokenizer, $z);
+ if($parameters[count($parameters) - 1] == '"\n"')
+ $parameters[count($parameters) - 1] = 'endl';
break;
}
***************
*** 98,103 ****
case T_GLOBAL:
$this->scope[$this->curfunction][] = substr($tokenizer->tokens[$a + 1][1], 1);
! echo $tokenizer->tokens[$a + 1][1], "\n";
! $a += 3;
break;
case T_FUNCTION:
--- 100,104 ----
case T_GLOBAL:
$this->scope[$this->curfunction][] = substr($tokenizer->tokens[$a + 1][1], 1);
! $a += 2;
break;
case T_FUNCTION:
***************
*** 444,447 ****
--- 445,450 ----
if($tokenizer->tokens[$token_][0] == T_ARRAY)
{
+ if(count($parameters) == 0)
+ return array('array()', $i);
$params = array();
$params[-1] = count($parameters);
***************
*** 495,498 ****
--- 498,503 ----
$this->includes[] = $funcs[$funcname];
}
+ if($tokenizer->tokens[$token_][0] == T_ARRAY && count($parameters) == 2)
+ return array('array()', $i);
if(strtolower($funcname) == 'define')
{
|
|
From: <da...@us...> - 2003-08-04 05:38:34
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv27272
Modified Files:
convert.php functions.php testfile.php tokenflow.php
Log Message:
Functional IRC bot example!
Index: convert.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/convert.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** convert.php 4 Aug 2003 00:48:37 -0000 1.16
--- convert.php 4 Aug 2003 05:38:31 -0000 1.17
***************
*** 16,20 ****
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse('testfile.php');
$tokenizer->Strip();
$gen = new Generator($tokenizer);
--- 16,20 ----
require_once 'functions.php';
$tokenizer = new Tokenizer();
! $tokenizer->Parse('testfile2.php');
$tokenizer->Strip();
$gen = new Generator($tokenizer);
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** functions.php 4 Aug 2003 00:48:37 -0000 1.34
--- functions.php 4 Aug 2003 05:38:31 -0000 1.35
***************
*** 12,16 ****
'unlink' => array('stdio.h', 'io/unlink.cpp'),
'strtolower' => array('stdio.h', 'string/strtolower.cpp'),
! 'explode' => array(null, array('array.cpp', 'explode.cpp')),
'implode' => array(null, 'implode.cpp'),
'fopen' => array('cstdio', 'io/fopen.cpp'),
--- 12,16 ----
'unlink' => array('stdio.h', 'io/unlink.cpp'),
'strtolower' => array('stdio.h', 'string/strtolower.cpp'),
! 'explode' => array(null, array('arrays/array.cpp', 'explode.cpp')),
'implode' => array(null, 'implode.cpp'),
'fopen' => array('cstdio', 'io/fopen.cpp'),
***************
*** 18,22 ****
'is_resource' => array(null, 'is_resource.cpp'),
'file_get_contents' => array('stdio.h', 'io/file_get_contents.cpp'),
! 'file' => array('stdio.h', array('array.cpp', 'explode.cpp', 'count.cpp', 'file.cpp')),
'strstr' => array(null, 'string/strstr.cpp'),
'strpos' => array(null, 'string/strpos.cpp'),
--- 18,22 ----
'is_resource' => array(null, 'is_resource.cpp'),
'file_get_contents' => array('stdio.h', 'io/file_get_contents.cpp'),
! 'file' => array('stdio.h', array('arrays/array.cpp', 'explode.cpp', 'count.cpp', 'file.cpp')),
'strstr' => array(null, 'string/strstr.cpp'),
'strpos' => array(null, 'string/strpos.cpp'),
***************
*** 36,45 ****
'ksort' => array(null, 'ksort.cpp'),
'stristr' => array('stdio.h', array('string/strtolower.cpp', 'string/stristr.cpp')),
! 'ucwords' => array('stdio.h', array('array.cpp', 'explode.cpp', 'implode.cpp', 'ucwords.cpp')),
'ucfirst' => array('cstdio', 'ucfirst.cpp'),
'trim' => array(null, 'trim.cpp'),
'rtrim' => array(null, 'rtrim.cpp'),
'ltrim' => array(null, 'ltrim.cpp'),
! 'mysql_connect' => array('mysql/mysql.h', array('mysql.cpp', 'array.cpp', 'explode.cpp', 'mysql_connect.cpp'), 'mysqlclient'),
'mysql_select_db' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_select_db.cpp'), 'mysqlclient'),
'mysql_query' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_query.cpp'), 'mysqlclient'),
--- 36,45 ----
'ksort' => array(null, 'ksort.cpp'),
'stristr' => array('stdio.h', array('string/strtolower.cpp', 'string/stristr.cpp')),
! 'ucwords' => array('stdio.h', array('arrays/array.cpp', 'explode.cpp', 'implode.cpp', 'ucwords.cpp')),
'ucfirst' => array('cstdio', 'ucfirst.cpp'),
'trim' => array(null, 'trim.cpp'),
'rtrim' => array(null, 'rtrim.cpp'),
'ltrim' => array(null, 'ltrim.cpp'),
! 'mysql_connect' => array('mysql/mysql.h', array('mysql.cpp', 'arrays/array.cpp', 'explode.cpp', 'mysql_connect.cpp'), 'mysqlclient'),
'mysql_select_db' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_select_db.cpp'), 'mysqlclient'),
'mysql_query' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_query.cpp'), 'mysqlclient'),
***************
*** 47,54 ****
'mysql_fetch_array' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_fetch_array.cpp'), 'mysqlclient'),
'mysql_error' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_error.cpp'), 'mysqlclient'),
! 'socket_create' => array('sys/socket.h', 'socket_create.cpp'),
! 'socket_connect' => array(array('sys/socket.h', 'netinet/in.h', 'arpa/inet.h', 'netdb.h'), 'socket_connect.cpp'),
! 'socket_write' => array('unistd.h', 'socket_write.cpp'),
! 'socket_read' => array(null, 'socket_read.cpp'),
'opendir' => array(array('cstdio', 'dirent.h'), 'opendir.cpp'),
'readdir' => array(array('cstdio', 'dirent.h'), 'readdir.cpp'),
--- 47,54 ----
'mysql_fetch_array' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_fetch_array.cpp'), 'mysqlclient'),
'mysql_error' => array('mysql/mysql.h', array('mysql.cpp', 'mysql_error.cpp'), 'mysqlclient'),
! 'socket_create' => array('sys/socket.h', 'sockets/socket_create.cpp'),
! 'socket_connect' => array(array('sys/socket.h', 'netinet/in.h', 'arpa/inet.h', 'netdb.h'), 'sockets/socket_connect.cpp'),
! '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'),
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** testfile.php 4 Aug 2003 04:34:32 -0000 1.42
--- testfile.php 4 Aug 2003 05:38:31 -0000 1.43
***************
*** 8,11 ****
--- 8,12 ----
while ($data = socket_read($sock, 2046))
{
+ echo $data, "\n";
$temp = explode(':', $data);
$temp2 = explode('!', $temp[1]);
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** tokenflow.php 4 Aug 2003 00:48:37 -0000 1.46
--- tokenflow.php 4 Aug 2003 05:38:31 -0000 1.47
***************
*** 416,428 ****
break;
case T_CONSTANT_ENCAPSED_STRING:
- if($tokenizer->tokens[$token_][0] == T_ARRAY && count($parameters) % 2 == 0 && (is_array($tokenizer->tokens[$i + 1]) && $tokenizer->tokens[$i + 1][1] != '=>'))
- $parameters[] = -1;
- if(strtolower($funcname) == 'define')
- $parameters[] = '"' . str_replace('"', '\\"', substr($data_, 1, -1) ) . '"';
- else
- $parameters[] = '(php_var)"' . str_replace('"', '\\"', substr($data, 1, -1) ) . '"';
- break;
- case ',':
- break;
case T_DEC:
case T_INC:
--- 416,419 ----
***************
*** 430,438 ****
case T_LNUMBER:
case T_VARIABLE:
- if($tokenizer->tokens[$token_][0] == T_ARRAY && count($parameters) % 2 == 0 && (is_array($tokenizer->tokens[$i + 1]) && $tokenizer->tokens[$i + 1][1] != '=>'))
- $parameters[] = -1;
list($parameters[], $i) = $this->parse_statement($tokenizer, $i);
! if($tokenizer->tokens[$token_][0] == T_ARRAY)
! $parameters[count($parameters) - 1] = $parameters[count($parameters) - 1];
break;
case ';':
--- 421,427 ----
case T_LNUMBER:
case T_VARIABLE:
list($parameters[], $i) = $this->parse_statement($tokenizer, $i);
! break;
! case ',':
break;
case ';':
***************
*** 532,535 ****
--- 521,525 ----
$params = array();
$inconcat = false;
+ $inbrace = false;
for($i = $token; $i < count($tokens); ++$i)
{
***************
*** 541,547 ****
--- 531,541 ----
$data_ = null;
}
+ if($tokenizer->tokens[$i + 1] == '.')
+ $inconcat = true;
switch($token_)
{
case T_VARIABLE:
+ if($inconcat == true && $inbrace == false)
+ $code .= '(string)(const char*)';
if(in_array(substr($data_, 1), $this->scope[$this->curfunction]) || $this->inclass == true)
$code .= '_' . substr($data_, 1);
***************
*** 556,561 ****
case T_ARRAY:
case T_STRING:
! if($inconcat == true)
! $code .= '(string)';
if(strtolower($data_) == 'true' || strtolower($data_) == 'false' || strtolower($data_) == 'null')
$code .= '(php_var) ' . strtolower($data_);
--- 550,555 ----
case T_ARRAY:
case T_STRING:
! if($inconcat == true && $inbrace == false)
! $code .= '(string)(const char*)';
if(strtolower($data_) == 'true' || strtolower($data_) == 'false' || strtolower($data_) == 'null')
$code .= '(php_var) ' . strtolower($data_);
***************
*** 588,599 ****
break;
case T_CONSTANT_ENCAPSED_STRING:
! if($inconcat == true)
! $code .= '(string)';
$code .= '"' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"';
break;
case T_DNUMBER:
case T_LNUMBER:
! if($inconcat == true)
! $code .= '(string)';
$code .= '(php_var)' . $data_;
break;
--- 582,593 ----
break;
case T_CONSTANT_ENCAPSED_STRING:
! if($inconcat == true && $inbrace == false)
! $code .= '(string)(const char*)';
$code .= '"' . str_replace('"', '\\"', substr($data_, 1, -1) ). '"';
break;
case T_DNUMBER:
case T_LNUMBER:
! if($inconcat == true && $inbrace == false)
! $code .= '(string)(const char*)';
$code .= '(php_var)' . $data_;
break;
***************
*** 652,658 ****
--- 646,654 ----
case '[':
$code .= '[';
+ $inbrace = true;
break;
case ']':
$code .= ']';
+ $inbrace = false;
break;
case '-':
***************
*** 684,691 ****
return array(implode(' = ', $params), $i);
}
! function debug_token(&$tokenizer, $token)
{
for($i = $token; $i < count($tokenizer->tokens); ++$i)
{
if(is_array($tokenizer->tokens[$i]))
echo $i, ' - ', token_name($tokenizer->tokens[$i][0]), ': "', $tokenizer->tokens[$i][1], '"', "\n";
--- 680,689 ----
return array(implode(' = ', $params), $i);
}
! function debug_token(&$tokenizer, $token, $token_ = null)
{
for($i = $token; $i < count($tokenizer->tokens); ++$i)
{
+ if($token_ !== null && $tokenizer->tokens[$i] == $token_)
+ break;
if(is_array($tokenizer->tokens[$i]))
echo $i, ' - ', token_name($tokenizer->tokens[$i][0]), ': "', $tokenizer->tokens[$i][1], '"', "\n";
|
|
From: <da...@us...> - 2003-08-04 05:38:34
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv27272/examples Added Files: irc.php Log Message: Functional IRC bot example! --- NEW FILE: irc.php --- <?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"); } ?> |
|
From: <da...@us...> - 2003-08-04 05:36:28
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv26987/examples Log Message: Directory /cvsroot/binaryphp/binaryphp/examples added to the repository |
|
From: <ama...@us...> - 2003-08-04 04:34:35
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv18838 Modified Files: testfile.php Log Message: Index: testfile.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** testfile.php 4 Aug 2003 00:48:37 -0000 1.41 --- testfile.php 4 Aug 2003 04:34:32 -0000 1.42 *************** *** 1,2 **** <?php ! ?> --- 1,16 ---- <?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)) ! { ! $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"); ! } ! ?> \ No newline at end of file |
|
From: <he...@us...> - 2003-08-04 01:58:39
|
Update of /cvsroot/binaryphp/binaryphp/DOCS In directory sc8-pr-cvs1:/tmp/cvs-serv29711/DOCS Modified Files: AUTHORS Log Message: Index: AUTHORS =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/DOCS/AUTHORS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AUTHORS 4 Aug 2003 01:52:16 -0000 1.2 --- AUTHORS 4 Aug 2003 01:58:36 -0000 1.3 *************** *** 4,6 **** Amaranth <ama...@ph...> ReDucTor <red...@ai...> ! Hexus <nfl...@ya...> --- 4,6 ---- Amaranth <ama...@ph...> ReDucTor <red...@ai...> ! Hexus <he...@ph...> |
|
From: <as...@us...> - 2003-08-04 01:52:20
|
Update of /cvsroot/binaryphp/binaryphp/DOCS In directory sc8-pr-cvs1:/tmp/cvs-serv28677/DOCS Modified Files: AUTHORS Log Message: Added ReDucTor's email. Index: AUTHORS =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/DOCS/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AUTHORS 3 Aug 2003 21:33:34 -0000 1.1 --- AUTHORS 4 Aug 2003 01:52:16 -0000 1.2 *************** *** 3,6 **** Daeken <dae...@ya...> Amaranth <ama...@ph...> ! ReDucTor Hexus <nfl...@ya...> --- 3,6 ---- Daeken <dae...@ya...> Amaranth <ama...@ph...> ! ReDucTor <red...@ai...> Hexus <nfl...@ya...> |