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: <sja...@us...> - 2003-09-02 01:09:03
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv8246
Modified Files:
php_var_type.hpp
Log Message:
Added "operator char*" to make it easy to display the type of a var as a string.
Index: php_var_type.hpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var_type.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** php_var_type.hpp 2 Sep 2003 00:58:10 -0000 1.2
--- php_var_type.hpp 2 Sep 2003 01:09:00 -0000 1.3
***************
*** 45,48 ****
--- 45,60 ----
}
+ operator char*() {
+ if(is_null) return "NULL";
+ if(is_string) return "String";
+ if(is_int) return "Integer";
+ if(is_float) return "Float";
+ if(is_bool) return "Boolean";
+ if(is_array) return "Array";
+ if(is_resource) return "Resource";
+ if(is_object) return "Object";
+ return -1;
+ }
+
php_var_type &operator= (const int rhs) {
*this = php_var_type(); // reset
|
|
From: <sja...@us...> - 2003-09-02 00:58:25
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv6589
Modified Files:
php_var_type.hpp
Log Message:
Add float type to class php_var_type.
Index: php_var_type.hpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var_type.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** php_var_type.hpp 17 Aug 2003 19:48:38 -0000 1.1
--- php_var_type.hpp 2 Sep 2003 00:58:10 -0000 1.2
***************
*** 5,12 ****
#define PHP_STRING 1
#define PHP_INT 2
! #define PHP_BOOL 3
! #define PHP_ARRAY 4
! #define PHP_RESOURCE 5
! #define PHP_OBJECT 6
class php_var_type {
--- 5,13 ----
#define PHP_STRING 1
#define PHP_INT 2
! #define PHP_FLOAT 3
! #define PHP_BOOL 4
! #define PHP_ARRAY 5
! #define PHP_RESOURCE 6
! #define PHP_OBJECT 7
class php_var_type {
***************
*** 15,18 ****
--- 16,20 ----
unsigned int is_string : 1;
unsigned int is_int : 1;
+ unsigned int is_float : 1;
unsigned int is_bool : 1;
unsigned int is_array : 1;
***************
*** 24,27 ****
--- 26,30 ----
is_string = 0;
is_int = 0;
+ is_float = 0;
is_bool = 0;
is_array = 0;
***************
*** 34,37 ****
--- 37,41 ----
if(is_string) return PHP_STRING;
if(is_int) return PHP_INT;
+ if(is_float) return PHP_FLOAT;
if(is_bool) return PHP_BOOL;
if(is_array) return PHP_ARRAY;
***************
*** 47,50 ****
--- 51,55 ----
case PHP_STRING: is_string = true; break;
case PHP_INT: is_int = true; break;
+ case PHP_FLOAT: is_float = true; break;
case PHP_BOOL: is_bool = true; break;
case PHP_ARRAY: is_array = true; break;
***************
*** 60,63 ****
--- 65,69 ----
case PHP_STRING: if(is_string) return true;
case PHP_INT: if(is_int) return true;
+ case PHP_FLOAT: if(is_float) return true;
case PHP_BOOL: if(is_bool) return true;
case PHP_ARRAY: if(is_array) return true;
|
|
From: <sja...@us...> - 2003-08-31 02:16:53
|
Update of /cvsroot/binaryphp/binaryphp/functions/arrays
In directory sc8-pr-cvs1:/tmp/cvs-serv23964/functions/arrays
Modified Files:
array.cpp
Log Message:
the type should be the same on both sides of va_arg
Index: array.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions/arrays/array.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** array.cpp 31 Aug 2003 01:20:17 -0000 1.4
--- array.cpp 31 Aug 2003 02:16:03 -0000 1.5
***************
*** 9,13 ****
for(int i = 0; i < key; ++i)
{
! php_var *temp = (php_var *) va_arg(ap, void *);
php_var key2;
if(temp == NULL)
--- 9,13 ----
for(int i = 0; i < key; ++i)
{
! php_var *temp = (php_var *) va_arg(ap, php_var *);
php_var key2;
if(temp == NULL)
***************
*** 30,34 ****
else
key2 = *temp;
! php_var val = *((php_var *) va_arg(ap, void *));
arr.keys.push_back(key2);
arr.data.push_back(val);
--- 30,34 ----
else
key2 = *temp;
! php_var val = *((php_var *) va_arg(ap, php_var *));
arr.keys.push_back(key2);
arr.data.push_back(val);
|
|
From: <da...@us...> - 2003-08-31 01:20:21
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv17255
Modified Files:
testfile.php tokenflow.php
Log Message:
Arrays fully work.
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** testfile.php 16 Aug 2003 22:58:03 -0000 1.49
--- testfile.php 31 Aug 2003 01:20:17 -0000 1.50
***************
*** 1,7 ****
<?php
! function bleh($foo)
! {
! _cpp('cout << _foo << endl;');
! }
! bleh('moo!');
?>
--- 1,4 ----
<?php
! $var = array('foo', 'bleh' => 'bar');
! echo $var['bleh'];
?>
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** tokenflow.php 22 Aug 2003 03:46:46 -0000 1.60
--- tokenflow.php 31 Aug 2003 01:20:17 -0000 1.61
***************
*** 146,151 ****
if($this->token >= count($this->tokens))
return false;
! $this->buffer = (string)null;
! $code = &$this->buffer;
$params = array();
for(; $this->token < count($this->tokens); ++$this->token)
--- 146,150 ----
if($this->token >= count($this->tokens))
return false;
! $code = (string) null;
$params = array();
for(; $this->token < count($this->tokens); ++$this->token)
***************
*** 193,199 ****
break;
case T_VARIABLE:
! if($this->Define($data))
! $code .= 'php_var ';
! $code .= '_' . substr($data, 1);
break;
case T_LNUMBER:
--- 192,200 ----
break;
case T_VARIABLE:
! $this->token += 1;
! if($break == null && $end == null)
! $this->B_var($data, $this->Parse_Tokenstream(null, ';'), true);
! else
! $code .= $this->B_var($data, $this->Parse_Tokenstream(null, ';'));
break;
case T_LNUMBER:
***************
*** 252,255 ****
--- 253,261 ----
++$this->token;
break;
+ case T_ARRAY:
+ $data = $this->tokens[$this->token + 1][1];
+ ++$this->token;
+ $code .= $this->B_array($this->Parse_Tokenstream(',', ')'));
+ break;
case '-':
case '+':
***************
*** 264,267 ****
--- 270,280 ----
$code .= ' ' . $token . ' ';
break;
+ case T_DOUBLE_ARROW:
+ $code .= ' => ';
+ break;
+ case '[':
+ case ']':
+ $code .= $token;
+ break;
case T_BOOLEAN_AND:
case T_BOOLEAN_OR:
***************
*** 307,310 ****
--- 320,343 ----
}
/**
+ * Code generator for variable declarations
+ *
+ * @param string $var Variable name.
+ * @param array $code Value of the variable.
+ * @param bool $add Set to true to add the code to the source.
+ * @return string
+ * @access private
+ */
+ function B_var($var, $code, $add = false)
+ {
+ $var = '_' . substr($var, 1);
+ if($this->Define($var))
+ $code = 'php_var ' . $var . implode(' ', $code);
+ else
+ $code = $var . implode(' ', $code);
+ if($add)
+ $this->AddCode($code);
+ return $code;
+ }
+ /**
* Code generator for echo
*
***************
*** 327,331 ****
}
if($add)
! $this->AddCode($code);
return $code;
}
--- 360,364 ----
}
if($add)
! $this->AddCode($code . ';');
return $code;
}
***************
*** 394,397 ****
--- 427,450 ----
$this->AddCode($code . ';');
return $code;
+ }
+ /**
+ * Code generator for calls to the array() language construct.
+ *
+ * @param array $parameters Elements of the array.
+ * @return string
+ * @access private
+ */
+ function B_array($parameters)
+ {
+ $this->AddCPPInclude('arrays/array.cpp');
+ foreach($parameters as $key => $val)
+ {
+ $arr = explode('=>', $val);
+ if(count($arr) == 1)
+ $parameters[$key] = 'NULL, (void *)(php_var *) &(php_var(' . $val . '))';
+ else
+ $parameters[$key] = '(void *)(php_var *) &(php_var(' . trim($arr[0]) . ')), (void *)(php_var *) &(php_var(' . trim($arr[1]) . '))';
+ }
+ return 'array(' . count($parameters) . ', ' . implode(', ', $parameters);
}
/**
|
|
From: <da...@us...> - 2003-08-31 01:20:21
|
Update of /cvsroot/binaryphp/binaryphp/functions/arrays
In directory sc8-pr-cvs1:/tmp/cvs-serv17255/functions/arrays
Modified Files:
array.cpp
Log Message:
Arrays fully work.
Index: array.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions/arrays/array.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** array.cpp 7 Aug 2003 05:39:03 -0000 1.3
--- array.cpp 31 Aug 2003 01:20:17 -0000 1.4
***************
*** 7,21 ****
arr.to_array();
int i = 0;
! for(int i = 0; i < key / 2; ++i)
{
! php_var key2 = *(va_arg(ap, php_var*));
! if(key2 == -1)
{
bool found = false;
for(;;)
{
! for(i = 0;i < arr.keys.size(); ++i)
{
! if(arr.keys[i] == (php_var) i)
found = true;
}
--- 7,22 ----
arr.to_array();
int i = 0;
! for(int i = 0; i < key; ++i)
{
! php_var *temp = (php_var *) va_arg(ap, void *);
! php_var key2;
! if(temp == NULL)
{
bool found = false;
for(;;)
{
! for(int z = 0; z < arr.keys.size(); ++z)
{
! if(arr.keys[z] == (php_var) i)
found = true;
}
***************
*** 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;
--- 28,37 ----
key2 = i;
}
! else
! key2 = *temp;
! php_var val = *((php_var *) va_arg(ap, void *));
arr.keys.push_back(key2);
arr.data.push_back(val);
! };
va_end(ap);
return arr;
|
|
From: <ama...@us...> - 2003-08-22 07:19:22
|
Update of /cvsroot/binaryphp/binaryphp/tests/arrays
In directory sc8-pr-cvs1:/tmp/cvs-serv14901/tests/arrays
Modified Files:
implode.php
Log Message:
fixed an echo bug
Index: implode.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tests/arrays/implode.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** implode.php 11 Aug 2003 11:21:33 -0000 1.1
--- implode.php 22 Aug 2003 03:46:46 -0000 1.2
***************
*** 1,4 ****
<?php
! $array = array('This', 'is', 'a', 'test.');
! echo implode(' ', $array);
?>
--- 1,4 ----
<?php
! $a = array('This', 'is', 'a', 'test.');
! echo implode(' ', $a);
?>
|
|
From: <ama...@us...> - 2003-08-22 03:46:54
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv14901
Modified Files:
tokenflow.php
Log Message:
fixed an echo bug
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** tokenflow.php 16 Aug 2003 22:58:03 -0000 1.59
--- tokenflow.php 22 Aug 2003 03:46:46 -0000 1.60
***************
*** 322,326 ****
{
if($param == '"\n"')
! $code .= ' << endl';
else
$code .= ' << ' . $param;
--- 322,326 ----
{
if($param == '"\n"')
! $code .= ' << endl;';
else
$code .= ' << ' . $param;
|
|
From: <sja...@us...> - 2003-08-17 20:55:29
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv3517
Modified Files:
php_var.cpp
Log Message:
Fix typos.
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** php_var.cpp 17 Aug 2003 20:13:10 -0000 1.29
--- php_var.cpp 17 Aug 2003 20:38:06 -0000 1.30
***************
*** 55,64 ****
{
container = str;
! typ.is_string = true;
}
php_var::php_var(string str)
{
container = str;
! typ.is_string = true;
}
php_var::php_var(bool b)
--- 55,64 ----
{
container = str;
! type.is_string = true;
}
php_var::php_var(string str)
{
container = str;
! type.is_string = true;
}
php_var::php_var(bool b)
***************
*** 68,72 ****
else
container = "0";
! typ.is_bool = true;
}
php_var::operator const char*()
--- 68,72 ----
else
container = "0";
! type.is_bool = true;
}
php_var::operator const char*()
|
|
From: <sja...@us...> - 2003-08-17 20:48:57
|
Update of /cvsroot/binaryphp/binaryphp/functions/base In directory sc8-pr-cvs1:/tmp/cvs-serv5413/functions/base Modified Files: is_array.cpp is_bool.cpp is_int.cpp is_null.cpp is_resource.cpp is_string.cpp Log Message: Make is_* macros use php_var_type bitfield. Index: is_array.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_array.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_array.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_array.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_array(var) ((var).type == PHP_ARRAY ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_array(var) (php_var((bool)(var).type.is_array)) Index: is_bool.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_bool.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_bool.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_bool.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_bool(var) ((var).type == PHP_BOOL ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_bool(var) (php_var((bool)(var).type.is_bool)) Index: is_int.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_int.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_int.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_int.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_int(var) ((var).type == PHP_INT ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_int(var) (php_var((bool)(var).type.is_int)) Index: is_null.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_null.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_null.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_null.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_null(var) ((var).type == PHP_NULL ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_null(var) (php_var((bool)(var).type.is_null)) Index: is_resource.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_resource.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_resource.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_resource.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_resource(var) ((var).type == PHP_RESOURCE ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_resource(var) (php_var((bool)(var).type.is_resource)) Index: is_string.cpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/functions/base/is_string.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** is_string.cpp 11 Aug 2003 11:17:21 -0000 1.2 --- is_string.cpp 17 Aug 2003 20:48:54 -0000 1.3 *************** *** 1 **** ! #define is_string(var) ((var).type == PHP_STRING ? (php_var)true : (php_var)false) --- 1 ---- ! #define is_string(var) (php_var((bool)(var).type.is_string)) |
|
From: <sja...@us...> - 2003-08-17 20:43:16
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv4407
Modified Files:
php_var.cpp
Log Message:
Fix "int php_var::operator++(int i)" ... you don't actually use "i", its just to differentiate between prefix and postfix.
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** php_var.cpp 17 Aug 2003 20:38:06 -0000 1.30
--- php_var.cpp 17 Aug 2003 20:43:13 -0000 1.31
***************
*** 214,218 ****
{
int ret = atol(container.c_str());
! container = intstring(ret + i);
return ret;
}
--- 214,218 ----
{
int ret = atol(container.c_str());
! container = intstring(ret + 1);
return ret;
}
|
|
From: <sja...@us...> - 2003-08-17 20:13:13
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv29477
Modified Files:
php_var.cpp
Log Message:
... missed one
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** php_var.cpp 17 Aug 2003 20:11:47 -0000 1.28
--- php_var.cpp 17 Aug 2003 20:13:10 -0000 1.29
***************
*** 288,292 ****
ostream &operator<<( ostream &out, const php_var &var )
{
! if(var.type == PHP_ARRAY)
out << "Array";
else
--- 288,292 ----
ostream &operator<<( ostream &out, const php_var &var )
{
! if(var.type.is_array)
out << "Array";
else
|
|
From: <sja...@us...> - 2003-08-17 20:11:50
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv29272
Modified Files:
php_var.cpp php_var.hpp
Log Message:
Use class php_var_type.
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** php_var.cpp 14 Aug 2003 16:40:17 -0000 1.27
--- php_var.cpp 17 Aug 2003 20:11:47 -0000 1.28
***************
*** 16,46 ****
php_var::php_var() // Constructor
{
- type = PHP_NULL; // Make the var, but make it null.
container = "";
}
php_var::php_var(const char* str)
{
container = str;
! type = PHP_STRING;
}
php_var::php_var(double i)
{
- type = PHP_INT;
container = doublestring(i);
}
php_var::php_var(int i)
{
- type = PHP_INT;
container = intstring(i);
}
php_var::php_var(unsigned int i)
{
container = intstring(i);
! type = PHP_INT;
}
php_var::php_var(long i)
{
container = intstring(i);
! type = PHP_INT;
}
php_var::php_var(const php_var &temp)
--- 16,46 ----
php_var::php_var() // Constructor
{
container = "";
+ type.is_null = true; // Make the var, but make it null.
}
php_var::php_var(const char* str)
{
container = str;
! type.is_string = true;
}
php_var::php_var(double i)
{
container = doublestring(i);
+ type.is_int = true;
}
php_var::php_var(int i)
{
container = intstring(i);
+ type.is_int = true;
}
php_var::php_var(unsigned int i)
{
container = intstring(i);
! type.is_int = true;
}
php_var::php_var(long i)
{
container = intstring(i);
! type.is_int = true;
}
php_var::php_var(const php_var &temp)
***************
*** 55,64 ****
{
container = str;
! type = PHP_STRING;
}
php_var::php_var(string str)
{
container = str;
! type = PHP_STRING;
}
php_var::php_var(bool b)
--- 55,64 ----
{
container = str;
! typ.is_string = true;
}
php_var::php_var(string str)
{
container = str;
! typ.is_string = true;
}
php_var::php_var(bool b)
***************
*** 68,76 ****
else
container = "0";
! type = PHP_BOOL;
}
php_var::operator const char*()
{
! if(type == PHP_STRING || type == PHP_INT)
return container.c_str();
else
--- 68,76 ----
else
container = "0";
! typ.is_bool = true;
}
php_var::operator const char*()
{
! if(type.is_string || type.is_int)
return container.c_str();
else
***************
*** 79,83 ****
php_var::operator string()
{
! if(type == PHP_STRING || type == PHP_INT)
return container;
else
--- 79,83 ----
php_var::operator string()
{
! if(type.is_string || type.is_int)
return container;
else
***************
*** 86,90 ****
php_var::operator bool()
{
! if(type != PHP_BOOL || (type == PHP_BOOL && container.compare("1") == 0))
return true;
return false;
--- 86,90 ----
php_var::operator bool()
{
! if( !type.is_bool || (type.is_bool && container.compare("1") == 0))
return true;
return false;
***************
*** 132,140 ****
php_var &php_var::operator[](php_var subscript)
{
! if(type == PHP_STRING)
{
// return &container[subscript];
}
! else if(type == PHP_ARRAY)
{
php_var key = subscript;
--- 132,140 ----
php_var &php_var::operator[](php_var subscript)
{
! if(type.is_string)
{
// return &container[subscript];
}
! else if(type.is_array)
{
php_var key = subscript;
***************
*** 237,241 ****
void php_var::operator+=(int inc)
{
! if(type == PHP_INT)
{
container = intstring(atol(container.c_str()) + inc);
--- 237,241 ----
void php_var::operator+=(int inc)
{
! if(type.is_int)
{
container = intstring(atol(container.c_str()) + inc);
***************
*** 244,258 ****
void php_var::operator+=(php_var str)
{
! if(str.type == PHP_INT)
{
container = intstring(atol(container.c_str()) + atoi(str.container.c_str()));
! if(type != PHP_INT && type != PHP_STRING)
! type = PHP_INT;
}
else
{
container += str.container;
! if(type != PHP_STRING)
! type = PHP_STRING;
}
}
--- 244,258 ----
void php_var::operator+=(php_var str)
{
! if(str.type.is_int)
{
container = intstring(atol(container.c_str()) + atoi(str.container.c_str()));
! if(!type.is_int && !type.is_string)
! type.is_int = true;
}
else
{
container += str.container;
! if(!type.is_string)
! type.is_string = true;
}
}
***************
*** 271,275 ****
void php_var::operator-=(int dec)
{
! if(type == PHP_INT)
{
container = intstring(atol(container.c_str()) - dec);
--- 271,275 ----
void php_var::operator-=(int dec)
{
! if(type.is_int)
{
container = intstring(atol(container.c_str()) - dec);
***************
*** 278,287 ****
void php_var::operator-=(php_var i)
{
! if(type == PHP_INT)
container = doublestring(atof(container.c_str()) - atof(i.container.c_str()));
}
void php_var::to_array()
{
! type = PHP_ARRAY;
}
template<typename T> inline T * OBJ(php_var obj) { return (reinterpret_cast<T *>(obj.res)); }
--- 278,287 ----
void php_var::operator-=(php_var i)
{
! if(type.is_int)
container = doublestring(atof(container.c_str()) - atof(i.container.c_str()));
}
void php_var::to_array()
{
! type.is_array = true;
}
template<typename T> inline T * OBJ(php_var obj) { return (reinterpret_cast<T *>(obj.res)); }
Index: php_var.hpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** php_var.hpp 14 Aug 2003 16:40:17 -0000 1.3
--- php_var.hpp 17 Aug 2003 20:11:47 -0000 1.4
***************
*** 8,18 ****
#define __php_var
! #define PHP_NULL 0
! #define PHP_STRING 1
! #define PHP_INT 2
! #define PHP_BOOL 3
! #define PHP_ARRAY 4
! #define PHP_RESOURCE 5
! #define PHP_OBJECT 6
using namespace std;
--- 8,12 ----
#define __php_var
! #include "php_var_type.hpp"
using namespace std;
***************
*** 84,88 ****
void *obj_type;
int res_type;
! int type; // Contains current type.
};
php_var operator*(php_var l, php_var r);
--- 78,82 ----
void *obj_type;
int res_type;
! php_var_type type; // Contains current type.
};
php_var operator*(php_var l, php_var r);
|
|
From: <sja...@us...> - 2003-08-17 19:48:41
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv22196
Added Files:
php_var_type.hpp
Log Message:
- php_var_type class: handles the type of php_var
- uses a bitfield to store the type
- and makes working with the types of variables abit easier
- its also backward compatible to the old type handling
--- NEW FILE: php_var_type.hpp ---
#ifndef __php_var_type
#define __php_var_type
#define PHP_NULL 0
#define PHP_STRING 1
#define PHP_INT 2
#define PHP_BOOL 3
#define PHP_ARRAY 4
#define PHP_RESOURCE 5
#define PHP_OBJECT 6
class php_var_type {
public:
unsigned int is_null : 1;
unsigned int is_string : 1;
unsigned int is_int : 1;
unsigned int is_bool : 1;
unsigned int is_array : 1;
unsigned int is_resource : 1;
unsigned int is_object : 1;
php_var_type() {
is_null = 0;
is_string = 0;
is_int = 0;
is_bool = 0;
is_array = 0;
is_resource = 0;
is_object = 0;
}
operator int() {
if(is_null) return PHP_NULL;
if(is_string) return PHP_STRING;
if(is_int) return PHP_INT;
if(is_bool) return PHP_BOOL;
if(is_array) return PHP_ARRAY;
if(is_resource) return PHP_RESOURCE;
if(is_object) return PHP_OBJECT;
return -1;
}
php_var_type &operator= (const int rhs) {
*this = php_var_type(); // reset
switch( rhs ) {
case PHP_NULL: is_null = true; break;
case PHP_STRING: is_string = true; break;
case PHP_INT: is_int = true; break;
case PHP_BOOL: is_bool = true; break;
case PHP_ARRAY: is_array = true; break;
case PHP_RESOURCE: is_resource = true; break;
case PHP_OBJECT: is_object = true; break;
}
return *this;
}
bool operator== (const int rhs) {
switch( rhs ) {
case PHP_NULL: if(is_null) return true;
case PHP_STRING: if(is_string) return true;
case PHP_INT: if(is_int) return true;
case PHP_BOOL: if(is_bool) return true;
case PHP_ARRAY: if(is_array) return true;
case PHP_RESOURCE: if(is_resource) return true;
case PHP_OBJECT: if(is_object) return true;
}
return false;
}
};
#endif
|
|
From: <da...@us...> - 2003-08-16 23:08:41
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv11544
Modified Files:
testfile.php tokenflow.php
Log Message:
_cpp() implimented.
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** testfile.php 14 Aug 2003 16:40:17 -0000 1.48
--- testfile.php 16 Aug 2003 22:58:03 -0000 1.49
***************
*** 2,6 ****
function bleh($foo)
{
! echo 'Test?';
}
bleh('moo!');
--- 2,6 ----
function bleh($foo)
{
! _cpp('cout << _foo << endl;');
}
bleh('moo!');
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** tokenflow.php 14 Aug 2003 16:40:17 -0000 1.58
--- tokenflow.php 16 Aug 2003 22:58:03 -0000 1.59
***************
*** 362,366 ****
{
global $funcs;
! if(isset($funcs[$function]))
{
if(count($funcs[$function]) == 2)
--- 362,374 ----
{
global $funcs;
! if($function == '_cpp')
! {
! $parameters[count($parameters) - 1] = substr($parameters[count($parameters) - 1], 0, -1);
! $code = substr($parameters[0], 1, -1);
! if($add)
! $this->AddCode($code);
! return $code;
! }
! elseif(isset($funcs[$function]))
{
if(count($funcs[$function]) == 2)
|
|
From: <da...@us...> - 2003-08-14 17:11:11
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv23345
Modified Files:
php_var.cpp php_var.hpp testfile.php tokenflow.php
Log Message:
User-defined functions work.
Index: php_var.cpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** php_var.cpp 9 Aug 2003 03:58:34 -0000 1.26
--- php_var.cpp 14 Aug 2003 16:40:17 -0000 1.27
***************
*** 310,312 ****
--- 310,316 ----
return (float) *l / (float) *r;
}
+ php_var operator*(php_var l, php_var r)
+ {
+ return (php_var)((long) l - (long) r);
+ }
#define is_identical(var, varb) (((var) == (varb) && (var).type == (varb).type) ? (php_var)true : (php_var)false)
Index: php_var.hpp
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/php_var.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** php_var.hpp 14 Aug 2003 00:01:43 -0000 1.2
--- php_var.hpp 14 Aug 2003 16:40:17 -0000 1.3
***************
*** 86,89 ****
--- 86,90 ----
int type; // Contains current type.
};
+ php_var operator*(php_var l, php_var r);
#endif
Index: testfile.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/testfile.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** testfile.php 11 Aug 2003 11:17:21 -0000 1.47
--- testfile.php 14 Aug 2003 16:40:17 -0000 1.48
***************
*** 1,5 ****
<?php
! header('Location: http://google.com');
! header('Location: http://feetman.com');
! echo 'Test', "\n";
?>
--- 1,7 ----
<?php
! function bleh($foo)
! {
! echo 'Test?';
! }
! bleh('moo!');
?>
Index: tokenflow.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/tokenflow.php,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** tokenflow.php 11 Aug 2003 11:17:21 -0000 1.57
--- tokenflow.php 14 Aug 2003 16:40:17 -0000 1.58
***************
*** 95,98 ****
--- 95,116 ----
*/
var $scope = array();
+ /**
+ * Tab count
+ * @param int
+ * @access private
+ */
+ var $tabs;
+ /**
+ * Temporary tab count
+ * @param bool
+ * @access private
+ */
+ var $temptabs;
+ /**
+ * Array of the current hierarchy of encapsulating language constructs.
+ * @param array
+ * @access private
+ */
+ var $in = array();
/**
***************
*** 113,116 ****
--- 131,136 ----
*/
$this->scope[0] = array();
+ $this->tabs = 0;
+ $this->temptabs = 0;
$this->Parse_Tokenstream();
}
***************
*** 163,166 ****
--- 183,191 ----
case ';':
$code .= ';';
+ if($end == null && $break == null)
+ {
+ $this->AddCode($code);
+ $code = (string) null;
+ }
break;
case T_CONSTANT_ENCAPSED_STRING:
***************
*** 181,185 ****
--- 206,213 ----
++$this->token;
if($break == null && $end == null)
+ {
$this->B_function_call($data, $this->Parse_Tokenstream(',', ')'), true);
+ ++$this->token;
+ }
else
$code .= $this->B_function_call($data, $this->Parse_Tokenstream(',', ')'));
***************
*** 195,198 ****
--- 223,239 ----
$code .= $this->B_if($this->Parse_Tokenstream(null, ')'));
break;
+ case T_ELSEIF:
+ ++$this->token;
+ if($break == null && $end == null)
+ $this->B_elseif($this->Parse_Tokenstream(null, ')'), true);
+ else
+ $code .= $this->B_elseif($this->Parse_Tokenstream(null, ')'));
+ break;
+ case T_ELSE:
+ if($break == null && $end == null)
+ $this->B_else( true);
+ else
+ $code .= $this->B_else();
+ break;
case T_FOR:
++$this->token;
***************
*** 202,205 ****
--- 243,255 ----
$code .= $this->B_for($this->Parse_Tokenstream(';', ')'));
break;
+ case T_FUNCTION:
+ $data = $this->tokens[$this->token + 1][1];
+ $this->token += 3;
+ if($break == null && $end == null)
+ $this->B_function($data, $this->Parse_Tokenstream(',', ')'), true);
+ else
+ $code .= $this->B_function($data, $this->Parse_Tokenstream(',', ')'));
+ ++$this->token;
+ break;
case '-':
case '+':
***************
*** 224,229 ****
break;
case '{':
case '}':
! $this->AddCode($data);
break;
}
--- 274,302 ----
break;
case '{':
+ $this->AddCode('{');
+ ++$this->tabs;
+ break;
case '}':
! if(!isset($this->in[count($this->in) - 1]))
! {
! --$this->tabs;
! $this->AddCode('}');
! break;
! }
! switch($this->in[count($this->in) - 1])
! {
! case 'class':
! --$this->tabs;
! $this->AddCode('};');
! break;
! case 'function':
! $this->curfunction = 0;
! break;
! default:
! --$this->tabs;
! $this->AddCode('}');
! break;
! }
! unset($this->in[count($this->in) - 1]);
break;
}
***************
*** 253,257 ****
$code .= ' << ' . $param;
}
- $code .= ';';
if($add)
$this->AddCode($code);
--- 326,329 ----
***************
*** 259,280 ****
}
/**
! * Code generator for variables
*
! * @param array $parameters Things to echo.
* @param bool $add Set to true to add the code to the source.
* @return string
* @access private
*/
! function B_variable($parameters, $add = false)
{
! $code = implode(' = ', $parameters);
! if($add)
! $this->AddCode($code);
! return $code;
}
/**
! * Code generator for functions
*
! * @param string $function Name of the function calls.
* @param array $parameters Parameters to the function.
* @param bool $add Set to true to add the code to the source.
--- 331,357 ----
}
/**
! * Code generator for function definitions.
*
! * @param string $function Name of the function being defined.
! * @param array $parameters Parameters to the function.
* @param bool $add Set to true to add the code to the source.
* @return string
* @access private
*/
! function B_function($function, $params)
{
! $params[count($params) - 1] = substr($params[count($params) - 1], 0, -1);
! $this->curfunction = count($this->functions);
! $func = array($function, 'void', array());
! foreach($params as $param)
! $func[2][] = array('php_var', substr($param, 8));
! $this->functions[$this->curfunction] = $func;
! $this->scops[$this->curfunction] = array();
! $this->in[] = 'function';
}
/**
! * Code generator for function calls
*
! * @param string $function Name of the function being called.
* @param array $parameters Parameters to the function.
* @param bool $add Set to true to add the code to the source.
***************
*** 307,311 ****
$code = $function . '(' . implode(', ', $parameters);
if($add)
! $this->AddCode($code);
return $code;
}
--- 384,388 ----
$code = $function . '(' . implode(', ', $parameters);
if($add)
! $this->AddCode($code . ';');
return $code;
}
***************
*** 323,326 ****
--- 400,447 ----
if($add)
$this->AddCode($code);
+ if($this->tokens[$this->token + 1][0] != '{')
+ {
+ ++$this->tabs;
+ ++$this->temptabs;
+ }
+ return $code;
+ }
+ /**
+ * Code generator for ELSEIFs
+ *
+ * @param array $parameters Statement(s).
+ * @param bool $add Set to true to add the code to the source.
+ * @return string
+ * @access private
+ */
+ function B_elseif($parameters, $add = false)
+ {
+ $code = 'else if(' . $parameters[0];
+ if($add)
+ $this->AddCode($code);
+ if($this->tokens[$this->token + 1][0] != '{')
+ {
+ ++$this->tabs;
+ ++$this->temptabs;
+ }
+ return $code;
+ }
+ /**
+ * Code generator for ELSEs
+ *
+ * @param bool $add Set to true to add the code to the source.
+ * @return string
+ * @access private
+ */
+ function B_else($add = false)
+ {
+ $code = 'else';
+ if($add)
+ $this->AddCode($code);
+ if($this->tokens[$this->token + 1][0] != '{')
+ {
+ ++$this->tabs;
+ ++$this->temptabs;
+ }
return $code;
}
***************
*** 340,343 ****
--- 461,469 ----
if($add)
$this->AddCode($code);
+ if($this->tokens[$this->token + 1][0] != '{')
+ {
+ ++$this->tabs;
+ ++$this->temptabs;
+ }
return $code;
}
***************
*** 377,381 ****
if($function == null)
$function = $this->curfunction;
! $this->code[$function][] = $code;
}
/**
--- 503,512 ----
if($function == null)
$function = $this->curfunction;
! $this->code[$function][] = str_repeat("\t", $this->tabs + 1) . $code;
! if($this->temptabs > 0)
! {
! --$this->temptabs;
! --$this->tabs;
! }
}
/**
***************
*** 489,493 ****
$args2 = array();
foreach($args as $arg)
! $args2[] = $arg[0];
$code .= implode(', ', $args2) . ')' . "\n";
$code .= '{' . "\n";
--- 620,624 ----
$args2 = array();
foreach($args as $arg)
! $args2[] = $arg[0] . ' ' . $arg[1];
$code .= implode(', ', $args2) . ')' . "\n";
$code .= '{' . "\n";
|
|
From: <da...@us...> - 2003-08-14 17:08:56
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv23345/examples Modified Files: helloworld.php Log Message: User-defined functions work. Index: helloworld.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/examples/helloworld.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** helloworld.php 10 Aug 2003 01:42:54 -0000 1.5 --- helloworld.php 14 Aug 2003 16:40:17 -0000 1.6 *************** *** 1,4 **** <?php ! for($i = 0; $i < 50; ++$i) ! echo $i, "\n"; ?> --- 1,9 ---- <?php ! $foo = 'bar'; ! if($foo == 'bar') ! echo 'bleh'; ! elseif($foo == 'bleh') ! echo 'bleh++'; ! else ! echo 'boo!'; ?> |
|
From: <da...@us...> - 2003-08-14 17:03:37
|
Update of /cvsroot/binaryphp/binaryphp/examples In directory sc8-pr-cvs1:/tmp/cvs-serv27510/examples Modified Files: helloworld.php Log Message: Fixed 'hello world' example. Index: helloworld.php =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/examples/helloworld.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** helloworld.php 14 Aug 2003 16:40:17 -0000 1.6 --- helloworld.php 14 Aug 2003 16:58:03 -0000 1.7 *************** *** 1,9 **** <?php ! $foo = 'bar'; ! if($foo == 'bar') ! echo 'bleh'; ! elseif($foo == 'bleh') ! echo 'bleh++'; ! else ! echo 'boo!'; ! ?> \ No newline at end of file --- 1,3 ---- <?php ! echo 'Hello, World!'; ! ?> |
|
From: <sja...@us...> - 2003-08-14 01:44:54
|
Update of /cvsroot/binaryphp/binaryphp In directory sc8-pr-cvs1:/tmp/cvs-serv11243 Modified Files: php_var.hpp Log Message: Add #ifndef check so php_var.hpp can be included multiple times with out error. Index: php_var.hpp =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/php_var.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** php_var.hpp 10 Aug 2003 05:18:31 -0000 1.1 --- php_var.hpp 14 Aug 2003 00:01:43 -0000 1.2 *************** *** 4,7 **** --- 4,11 ---- #include <stdio.h> #include <iostream> + + #ifndef __php_var + #define __php_var + #define PHP_NULL 0 #define PHP_STRING 1 *************** *** 82,83 **** --- 86,89 ---- int type; // Contains current type. }; + + #endif |
|
From: <sja...@us...> - 2003-08-14 00:47:22
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv16464
Added Files:
arg_list.cpp arg_list.hpp
Log Message:
Add arg_list class.
--- NEW FILE: arg_list.cpp ---
#include "arg_list.hpp"
arg_list::arg_list() : length(0), first(NULL), current(NULL) {
this->first = this->current = this->last = new arg_item;
this->first->index = 0;
this->first->value = NULL;
this->first->next = NULL;
}
arg_list::~arg_list() {
this->current = this->first;
while( this->current != this->last ) {
arg_item *temp = this->current->next;
delete this->current;
this->current = temp;
}
delete this->last;
}
void arg_list::add( php_var *arg ) {
this->last->value = arg;
this->last->next = new arg_item;
this->last->next->index = this->last->index + 1;
this->last = this->last->next;
this->length++;
}
const php_var* arg_list::cur() {
if( this->current != NULL )
return this->current->value;
else
return NULL;
}
const php_var* arg_list::fetch() {
php_var *temp = this->current->value;
if( this->current != this->last ) {
this->current = this->current->next;
}
return temp;
}
int arg_list::pos() {
if( this->current != NULL )
return this->current->index;
else
return -1;
}
int arg_list::len() {
return this->length;
}
void arg_list::start() {
this->current = this->first;
}
void arg_list::skip( int num ) {
while( --num ) {
if( this->current != NULL && this->current != this->last )
this->current = this->current->next;
else
return;
}
}
void arg_list::end() {
while( this->current->next != this->last )
this->skip();
}
--- NEW FILE: arg_list.hpp ---
#include "php_var.hpp"
#ifndef __arg_list
#define __arg_list
class arg_list {
private:
struct arg_item {
int index;
php_var *value;
arg_item *next;
arg_item() { index = 0; value = NULL; next = NULL; }
};
int length;
arg_item *first;
arg_item *current;
arg_item *last;
public:
arg_list();
~arg_list();
void add( php_var* ); // Add an argument
const php_var* cur(); // Return current arg (does *not* iterate)
const php_var* fetch(); // Return current arg, and iterate
int pos(); // Current offset
int len(); // Number of items
void start(); // Set current arg to the first in the list
void skip( int = 1 ); // Skip args
void end(); // Set current arg to the last in the list
};
//define FUNCTION(name) php_var name(arg_list args)
//define RETURN(var) return php_var(var)
#endif
|
|
From: <sja...@us...> - 2003-08-13 08:51:38
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv21856
Modified Files:
functions.php
Log Message:
Fix whitespace
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** functions.php 12 Aug 2003 22:26:26 -0000 1.42
--- functions.php 13 Aug 2003 08:51:34 -0000 1.43
***************
*** 66,85 ****
'chr' => array(null, 'string/chr.cpp'),
'ord' => array(null, 'string/ord.cpp'),
! 'abs' => array('cstdlib', 'math/abs.cpp'),
! 'asin' => array('cmath', 'math/asin.cpp'),
! 'atan2' => array('cmath', 'math/atan2.cpp'),
! 'cos' => array('cmath', 'math/cos.cpp'),
! 'floor' => array('cmath', 'math/floor.cpp'),
! 'sin' => array('cmath', 'math/sin.cpp'),
! 'sqrt' => array('cmath', 'math/sqrt.cpp'),
! 'tanh' => array('cmath', 'math/tanh.cpp'),
! 'tan' => array('cmath', 'math/tan.cpp'),
! 'sinh' => array('cmath', 'math/sinh.cpp'),
! 'pow' => array('cmath', 'math/pow.cpp'),
! 'cosh' => array('cmath', 'math/cosh.cpp'),
! 'ceil' => array('cmath', 'math/ceil.cpp'),
! 'atan' => array('cmath', 'math/atan.cpp'),
! 'acos' => array('cmath', 'math/acos.cpp'),
! null
! );
?>
--- 66,85 ----
'chr' => array(null, 'string/chr.cpp'),
'ord' => array(null, 'string/ord.cpp'),
! 'abs' => array('cstdlib', 'math/abs.cpp'),
! 'asin' => array('cmath', 'math/asin.cpp'),
! 'atan2' => array('cmath', 'math/atan2.cpp'),
! 'cos' => array('cmath', 'math/cos.cpp'),
! 'floor' => array('cmath', 'math/floor.cpp'),
! 'sin' => array('cmath', 'math/sin.cpp'),
! 'sqrt' => array('cmath', 'math/sqrt.cpp'),
! 'tanh' => array('cmath', 'math/tanh.cpp'),
! 'tan' => array('cmath', 'math/tan.cpp'),
! 'sinh' => array('cmath', 'math/sinh.cpp'),
! 'pow' => array('cmath', 'math/pow.cpp'),
! 'cosh' => array('cmath', 'math/cosh.cpp'),
! 'ceil' => array('cmath', 'math/ceil.cpp'),
! 'atan' => array('cmath', 'math/atan.cpp'),
! 'acos' => array('cmath', 'math/acos.cpp'),
! null
! );
?>
|
|
From: <sja...@us...> - 2003-08-13 02:05:17
|
Update of /cvsroot/binaryphp/binaryphp/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv3808/examples
Modified Files:
irc.php
Log Message:
Change default channel the bot joins to #testbot
Index: irc.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/examples/irc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** irc.php 6 Aug 2003 14:09:55 -0000 1.3
--- irc.php 12 Aug 2003 16:32:19 -0000 1.4
***************
*** 5,9 ****
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))
{
--- 5,9 ----
socket_write($sock, "USER TestBOT TestBOT TestBOT :TestBOT\r\n");
socket_write($sock, "NICK TestBOT \r\n");
! socket_write($sock, "JOIN #testbot \r\n");
while ($data = socket_read($sock, 2048))
{
|
|
From: <as...@us...> - 2003-08-13 00:43:27
|
Update of /cvsroot/binaryphp/binaryphp/DOCS In directory sc8-pr-cvs1:/tmp/cvs-serv22276/DOCS Modified Files: AUTHORS Log Message: Added 'the missing link' to the authors file. ;) Index: AUTHORS =================================================================== RCS file: /cvsroot/binaryphp/binaryphp/DOCS/AUTHORS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AUTHORS 4 Aug 2003 01:58:36 -0000 1.3 --- AUTHORS 13 Aug 2003 00:43:24 -0000 1.4 *************** *** 5,6 **** --- 5,7 ---- ReDucTor <red...@ai...> Hexus <he...@ph...> + Rhapsodi <gte...@ny...> |
|
From: <rha...@us...> - 2003-08-12 22:33:47
|
Update of /cvsroot/binaryphp/binaryphp/functions/math
In directory sc8-pr-cvs1:/tmp/cvs-serv31160
Added Files:
abs.cpp acos.cpp asin.cpp atan.cpp atan2.cpp ceil.cpp cos.cpp
cosh.cpp floor.cpp pow.cpp sin.cpp sinh.cpp sqrt.cpp tan.cpp
tanh.cpp
Log Message:
--- NEW FILE: abs.cpp ---
php_var abs ( php_var v)
{
return (php_var) abs((int) v);
}
--- NEW FILE: acos.cpp ---
php_var acos (php_var v)
{
return (php_var) acos((double) v);
}
--- NEW FILE: asin.cpp ---
php_var asin ( php_var v)
{
return (php_var) asin((double)v);
}
--- NEW FILE: atan.cpp ---
php_var atan (php_var v)
{
return (php_var) atan( (double) v);
}
--- NEW FILE: atan2.cpp ---
php_var atan2 (php_var x, php_var y)
{
return (php_var) atan2( (double) x, (double) y );
}
--- NEW FILE: ceil.cpp ---
php_var ceil (php_var v)
{
return (php_var) ceil( (double) v);
}
--- NEW FILE: cos.cpp ---
php_var cos (php_var v)
{
return (php_var) cos((double) v);
}
--- NEW FILE: cosh.cpp ---
php_var cosh (php_var v)
{
return (php_var) cosh((double) v);
}
--- NEW FILE: floor.cpp ---
php_var floor (php_var v)
{
return (php_var) floor((double) v);
}
--- NEW FILE: pow.cpp ---
php_var pow (php_var base, php_var exp)
{
double ans = pow((double) base, (double) exp);
if(!ans) {
return false;
} else {
return (php_var) ans;
}
}
--- NEW FILE: sin.cpp ---
php_var sin (php_var v)
{
return (php_var) sin((double) v);
}
--- NEW FILE: sinh.cpp ---
php_var sinh(php_var v)
{
return (php_var) sinh((double)v);
}
--- NEW FILE: sqrt.cpp ---
php_var sqrt (php_var v)
{
return (php_var) sqrt( (double) v);
}
--- NEW FILE: tan.cpp ---
php_var tan (php_var v)
{
return (php_var) tan((double) v);
}
--- NEW FILE: tanh.cpp ---
php_var tanh (php_var v)
{
return (php_var) tanh((double) v);
}
|
|
From: <rha...@us...> - 2003-08-12 22:32:05
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv1570
Modified Files:
functions.php
Log Message:
fixed parse errors, turned semicolons to commas
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** functions.php 12 Aug 2003 22:10:10 -0000 1.41
--- functions.php 12 Aug 2003 22:26:26 -0000 1.42
***************
*** 67,85 ****
'ord' => array(null, 'string/ord.cpp'),
'abs' => array('cstdlib', 'math/abs.cpp'),
! 'asin' => array('cmath', 'math/asin.cpp');
! 'atan2' => array('cmath', 'math/atan2.cpp');
! 'cos' => array('cmath', 'math/cos.cpp');
! 'floor' => array('cmath', 'math/floor.cpp');
! 'sin' => array('cmath', 'math/sin.cpp');
! 'sqrt' => array('cmath', 'math/sqrt.cpp');
! 'tanh' => array('cmath', 'math/tanh.cpp');
! 'tan' => array('cmath', 'math/tan.cpp');
! 'sinh' => array('cmath', 'math/sinh.cpp');
! 'pow' => array('cmath', 'math/pow.cpp');
! 'cosh' => array('cmath', 'math/cosh.cpp');
! 'ceil' => array('cmath', 'math/ceil.cpp');
! 'atan' => array('cmath', 'math/atan.cpp');
! 'acos' => array('cmath', 'math/acos.cpp');
! null
);
?>
--- 67,85 ----
'ord' => array(null, 'string/ord.cpp'),
'abs' => array('cstdlib', 'math/abs.cpp'),
! 'asin' => array('cmath', 'math/asin.cpp'),
! 'atan2' => array('cmath', 'math/atan2.cpp'),
! 'cos' => array('cmath', 'math/cos.cpp'),
! 'floor' => array('cmath', 'math/floor.cpp'),
! 'sin' => array('cmath', 'math/sin.cpp'),
! 'sqrt' => array('cmath', 'math/sqrt.cpp'),
! 'tanh' => array('cmath', 'math/tanh.cpp'),
! 'tan' => array('cmath', 'math/tan.cpp'),
! 'sinh' => array('cmath', 'math/sinh.cpp'),
! 'pow' => array('cmath', 'math/pow.cpp'),
! 'cosh' => array('cmath', 'math/cosh.cpp'),
! 'ceil' => array('cmath', 'math/ceil.cpp'),
! 'atan' => array('cmath', 'math/atan.cpp'),
! 'acos' => array('cmath', 'math/acos.cpp'),
! null
);
?>
|
|
From: <rha...@us...> - 2003-08-12 22:18:06
|
Update of /cvsroot/binaryphp/binaryphp
In directory sc8-pr-cvs1:/tmp/cvs-serv31298
Modified Files:
functions.php
Log Message:
Index: functions.php
===================================================================
RCS file: /cvsroot/binaryphp/binaryphp/functions.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** functions.php 12 Aug 2003 08:39:07 -0000 1.40
--- functions.php 12 Aug 2003 22:10:10 -0000 1.41
***************
*** 66,69 ****
--- 66,84 ----
'chr' => array(null, 'string/chr.cpp'),
'ord' => array(null, 'string/ord.cpp'),
+ 'abs' => array('cstdlib', 'math/abs.cpp'),
+ 'asin' => array('cmath', 'math/asin.cpp');
+ 'atan2' => array('cmath', 'math/atan2.cpp');
+ 'cos' => array('cmath', 'math/cos.cpp');
+ 'floor' => array('cmath', 'math/floor.cpp');
+ 'sin' => array('cmath', 'math/sin.cpp');
+ 'sqrt' => array('cmath', 'math/sqrt.cpp');
+ 'tanh' => array('cmath', 'math/tanh.cpp');
+ 'tan' => array('cmath', 'math/tan.cpp');
+ 'sinh' => array('cmath', 'math/sinh.cpp');
+ 'pow' => array('cmath', 'math/pow.cpp');
+ 'cosh' => array('cmath', 'math/cosh.cpp');
+ 'ceil' => array('cmath', 'math/ceil.cpp');
+ 'atan' => array('cmath', 'math/atan.cpp');
+ 'acos' => array('cmath', 'math/acos.cpp');
null
);
|