shie Mon Apr 19 11:50:18 2004 EDT
Modified files:
/non-pecl/simple_cvs simple_cvs.c php_simple_cvs.h
Log:
fixed: some function names had uppercase letters.
this dies, since zend_hash_del_key doesn't lower the uppercase before
searching
http://cvs.php.net/diff.php/non-pecl/simple_cvs/simple_cvs.c?r1=1.2&r2=1.3&ty=u
Index: non-pecl/simple_cvs/simple_cvs.c
diff -u non-pecl/simple_cvs/simple_cvs.c:1.2 non-pecl/simple_cvs/simple_cvs.c:1.3
--- non-pecl/simple_cvs/simple_cvs.c:1.2 Mon Apr 19 06:35:07 2004
+++ non-pecl/simple_cvs/simple_cvs.c Mon Apr 19 11:50:18 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simple_cvs.c,v 1.2 2004/04/19 10:35:07 shie Exp $ */
+/* $Id: simple_cvs.c,v 1.3 2004/04/19 15:50:18 shie Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -44,24 +44,25 @@
function_entry simple_cvs_functions[] = {
PHP_FE(scvs_checkout, NULL)
PHP_FE(scvs_update, NULL)
- PHP_FE(scvs_login, NULL)
+ PHP_FE(scvs_login, NULL)
PHP_FE(scvs_status, NULL)
PHP_FE(scvs_commit, NULL)
- PHP_FE(scvs_diff, NULL)
- PHP_FE(scvs_get_host, NULL)
- PHP_FE(scvs_get_authMethod, NULL)
- PHP_FE(scvs_get_compressionLevel, NULL)
- PHP_FE(scvs_get_username, NULL)
+ PHP_FE(scvs_diff, NULL)
+ PHP_FE(scvs_get_host, NULL)
+ PHP_FE(scvs_get_module_name, NULL)
PHP_FE(scvs_get_cvsroot, NULL)
- PHP_FE(scvs_get_moduleName, NULL)
- PHP_FE(scvs_get_workingDir, NULL)
+ PHP_FE(scvs_get_compression_level, NULL)
+ PHP_FE(scvs_get_username, NULL)
+ PHP_FE(scvs_get_auth_method, NULL)
+ PHP_FE(scvs_get_working_dir, NULL)
+ PHP_FE(scvs_set_compression_level, NULL)
PHP_FE(scvs_set_host, NULL)
- PHP_FE(scvs_set_authMethod, NULL)
- PHP_FE(scvs_set_compressionLevel, NULL)
+ PHP_FE(scvs_set_auth_method, NULL)
PHP_FE(scvs_set_username, NULL)
PHP_FE(scvs_set_cvsroot, NULL)
- PHP_FE(scvs_set_moduleName, NULL)
- PHP_FE(scvs_set_workingDir, NULL)
+ PHP_FE(scvs_set_module_name, NULL)
+ PHP_FE(scvs_set_working_dir, NULL)
+ PHP_FE(scvs_set_cvsroot, NULL)
{NULL, NULL, NULL} /* Must be the last line in simple_cvs_functions[] */
};
/* }}} */
@@ -109,7 +110,6 @@
*/
static void init_globals(zend_simple_cvs_globals *simple_cvs_globals)
{
-/*zend_error(E_WARNING,"init_globals");*/
simple_cvs_globals->host = NULL;
simple_cvs_globals->userName = NULL;
simple_cvs_globals->moduleName = NULL;
@@ -124,7 +124,6 @@
*/
PHP_MINIT_FUNCTION(simple_cvs)
{
-/*zend_error(E_WARNING,"m_init");*/
#ifdef ZTS
ZEND_INIT_MODULE_GLOBALS(simple_cvs, NULL, NULL);
#endif
@@ -148,7 +147,6 @@
REGISTER_LONG_CONSTANT("SCVS_STAT_UPDATED", SCVS_STAT_UPDATED, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SCVS_STAT_PATCHED", SCVS_STAT_PATCHED, CONST_CS |
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SCVS_STAT_NOTINCVS", SCVS_STAT_NOTINCVS, CONST_CS |
CONST_PERSISTENT);
-
return SUCCESS;
}
/* }}} */
@@ -157,7 +155,6 @@
*/
PHP_MSHUTDOWN_FUNCTION(simple_cvs)
{
-/*zend_error(E_WARNING,"m_shutdown");*/
UNREGISTER_INI_ENTRIES();
return SUCCESS;
@@ -169,7 +166,6 @@
*/
PHP_RINIT_FUNCTION(simple_cvs)
{
-/*zend_error(E_WARNING,"r_init");*/
init_globals(&simple_cvs_globals);
return SUCCESS;
}
@@ -180,13 +176,12 @@
*/
PHP_RSHUTDOWN_FUNCTION(simple_cvs)
{
-/*zend_error(E_WARNING,"r_shutdown");*/
if (GGET(host)) efree(GGET(host));
if (GGET(userName)) efree(GGET(userName));
if (GGET(moduleName)) efree(GGET(moduleName));
if (GGET(cvsRoot)) efree(GGET(cvsRoot));
if (GGET(workingDir)) efree(GGET(workingDir));
-
+
return SUCCESS;
}
/* }}} */
@@ -231,23 +226,21 @@
if (GGET(host) != NULL) efree(GGET(host));
GGET(host) = estrndup(hn, hn_len); /* might be an extra \0 hiding inside */
- /*zend_printf("got new hostname: %s\n", cvs_id.host);*/
-
RETURN_BOOL(1);
}
/* }}} */
-/* {{{ proto string scvs_get_authMethod()
+/* {{{ proto string scvs_get_auth_method()
Return the authentication method (SCVS_AUTH_PSERVER or SCVS_AUTH_EXT) */
-PHP_FUNCTION(scvs_get_authMethod)
+PHP_FUNCTION(scvs_get_auth_method)
{
RETURN_LONG(GGET(authMethod));
}
/* }}} */
-/* {{{ proto Boolean scvs_set_authMethod(int method)
+/* {{{ proto Boolean scvs_set_auth_method(int method)
Sets the authentication method (0 is pserver, 1 is ext) */
-PHP_FUNCTION(scvs_set_authMethod)
+PHP_FUNCTION(scvs_set_auth_method)
{
long am;
@@ -266,17 +259,17 @@
/* }}} */
-/* {{{ proto string scvs_get_compressionLevel()
+/* {{{ proto string scvs_get_compression_level()
Return the compression level */
-PHP_FUNCTION(scvs_get_compressionLevel)
+PHP_FUNCTION(scvs_get_compression_level)
{
RETURN_LONG(GGET(compressionLevel));
}
/* }}} */
-/* {{{ proto Boolean scvs_set_compressionLevel(int level)
+/* {{{ proto Boolean scvs_set_compression_level(int level)
Sets the compression level */
-PHP_FUNCTION(scvs_set_compressionLevel)
+PHP_FUNCTION(scvs_set_compression_level)
{
long cl;
@@ -356,18 +349,18 @@
/* }}} */
-/* {{{ proto string scvs_get_moduleName()
+/* {{{ proto string scvs_get_module_name()
Return the module name */
-PHP_FUNCTION(scvs_get_moduleName)
+PHP_FUNCTION(scvs_get_module_name)
{
if (GGET(moduleName) == NULL) RETURN_EMPTY_STRING()
else RETURN_STRING(GGET(moduleName),1);
}
/* }}} */
-/* {{{ proto Boolean scvs_set_moduleName(string name)
+/* {{{ proto Boolean scvs_set_module_name(string name)
Sets the module name */
-PHP_FUNCTION(scvs_set_moduleName)
+PHP_FUNCTION(scvs_set_module_name)
{
char *un;
int un_len;
@@ -386,18 +379,18 @@
}
/* }}} */
-/* {{{ proto string scvs_get_workingDir()
+/* {{{ proto string scvs_get_working_dir()
Return the working directory */
-PHP_FUNCTION(scvs_get_workingDir)
+PHP_FUNCTION(scvs_get_working_dir)
{
if (GGET(workingDir) == NULL) RETURN_EMPTY_STRING()
else RETURN_STRING(GGET(workingDir),1);
}
/* }}} */
-/* {{{ proto Boolean scvs_set_workingDir(string dir)
+/* {{{ proto Boolean scvs_set_working_dir(string dir)
Sets the working directory */
-PHP_FUNCTION(scvs_set_workingDir)
+PHP_FUNCTION(scvs_set_working_dir)
{
char *un;
int un_len;
http://cvs.php.net/diff.php/non-pecl/simple_cvs/php_simple_cvs.h?r1=1.1&r2=1.2&ty=u
Index: non-pecl/simple_cvs/php_simple_cvs.h
diff -u non-pecl/simple_cvs/php_simple_cvs.h:1.1
non-pecl/simple_cvs/php_simple_cvs.h:1.2
--- non-pecl/simple_cvs/php_simple_cvs.h:1.1 Wed Apr 14 12:42:41 2004
+++ non-pecl/simple_cvs/php_simple_cvs.h Mon Apr 19 11:50:18 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_simple_cvs.h,v 1.1 2004/04/14 16:42:41 shie Exp $ */
+/* $Id: php_simple_cvs.h,v 1.2 2004/04/19 15:50:18 shie Exp $ */
/*
This module makes it possible to perform CVS operations within PHP.
@@ -134,22 +134,20 @@
PHP_FUNCTION(scvs_diff);
/* GET functions */
PHP_FUNCTION(scvs_get_host);
-PHP_FUNCTION(scvs_get_authMethod); /* authentication: 0 == pserver, 1 == ext */
-PHP_FUNCTION(scvs_get_compressionLevel); /* compression level {1..3} */
+PHP_FUNCTION(scvs_get_auth_method); /* authentication: 0 == pserver, 1 == ext */
+PHP_FUNCTION(scvs_get_compression_level); /* compression level {1..3} */
PHP_FUNCTION(scvs_get_username);
PHP_FUNCTION(scvs_get_cvsroot);
-PHP_FUNCTION(scvs_get_moduleName);
-PHP_FUNCTION(scvs_get_workingDir);
+PHP_FUNCTION(scvs_get_module_name);
+PHP_FUNCTION(scvs_get_working_dir);
/* SET functions */
PHP_FUNCTION(scvs_set_host);
-PHP_FUNCTION(scvs_set_authMethod); /* authentication: 0 == pserver, 1 == ext */
-PHP_FUNCTION(scvs_set_compressionLevel); /* compression level {1..3} */
+PHP_FUNCTION(scvs_set_auth_method); /* authentication: 0 == pserver, 1 == ext */
+PHP_FUNCTION(scvs_set_compression_level); /* compression level {1..3} */
PHP_FUNCTION(scvs_set_username);
PHP_FUNCTION(scvs_set_cvsroot);
-PHP_FUNCTION(scvs_set_moduleName);
-PHP_FUNCTION(scvs_set_workingDir);
-/* debug functions */
-PHP_FUNCTION(scvs_print_cmdline); /* print the CVS command line */
+PHP_FUNCTION(scvs_set_module_name);
+PHP_FUNCTION(scvs_set_working_dir);
ZEND_BEGIN_MODULE_GLOBALS(simple_cvs)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php