[cvs-annodex] commit (/annodex): phpannodex/trunk/src/config.m4 phpannodex/trunk/src/phpannodex.h phpannodex/trunk/src/phpanx_write.c phpannodex/trunk/src/phpanx_write.h +phpannodex/trunk/src/phpannodex.c

ctford nobody at lists.annodex.net
Tue Dec 6 14:18:47 EST 2005


Update of /annodex (new revision 1683)

Added files:
   phpannodex/trunk/src/phpannodex.c

Modified files:
   phpannodex/trunk/src/config.m4
   phpannodex/trunk/src/phpannodex.h
   phpannodex/trunk/src/phpanx_write.c
   phpannodex/trunk/src/phpanx_write.h

Log Message:
Compiles, and all functions so far implemented can be seen from php.

Modified: phpannodex/trunk/src/config.m4
===================================================================
--- phpannodex/trunk/src/config.m4	2005-12-06 01:33:08 UTC (rev 1682)
+++ phpannodex/trunk/src/config.m4	2005-12-06 03:18:47 UTC (rev 1683)
@@ -3,6 +3,6 @@
 
 if test "$PHP_PHPANNODEX" = "yes"; then
   AC_DEFINE(HAVE_PHPANNODEX, 1, [Whether you have phpannodex])
-  PHP_NEW_EXTENSION(phpannodex, phpannodex.c phpanx_read.c phpanx_write.c phpanx_general.c , $ext_shared)
+  PHP_NEW_EXTENSION(phpannodex, phpannodex.c phpanx_general.c phpanx_read.c phpanx_write.c , $ext_shared)
 fi
 

Added: phpannodex/trunk/src/phpannodex.c
===================================================================
--- phpannodex/trunk/src/phpannodex.c	2005-12-06 01:33:08 UTC (rev 1682)
+++ phpannodex/trunk/src/phpannodex.c	2005-12-06 03:18:47 UTC (rev 1683)
@@ -0,0 +1,62 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "php.h"
+#include "phpannodex.h"
+#include "phpanx_read.h"
+#include "phpanx_general.h"
+#include "phpanx_write.h"
+
+/* This array tells php what functions this extension provides. The functions
+ * are grouped according to which file they are located in and encapsulated in
+ * hash defines. This is so that disabling functions from a particular file is
+ * as simple as commenting out the relevant header file.
+ */
+static function_entry phpannodex_functions[] = {
+
+	/* Functions defined in anx_general.h of the original Annodex libraries,
+	 * and phpanx_general.h of the phpannodex extension.
+	 */
+#ifdef PHPANX_GENERAL_H
+	PHPANX_GENERAL_FUNCTIONS
+#endif
+
+	/* Functions defined in anx_read.h of the original Annodex libraries,
+	 * and phpanx_read.h of the phpannodex extension.
+	 */
+#ifdef PHPANX_READ_H
+	PHPANX_READ_FUNCTIONS
+#endif
+
+	/* Functions defined in anx_write.h of the original Annodex libraries,
+	 * and phpanx_write.h of the phpannodex extension.
+	 */
+#ifdef PHPANX_WRITE_H
+	PHPANX_WRITE_FUNCTIONS
+#endif
+
+	{NULL, NULL, NULL}
+};
+
+zend_module_entry phpannodex_module_entry = {
+#if ZEND_MODULE_API_NO >= 20010901
+	STANDARD_MODULE_HEADER,
+#endif
+	PHPANNODEX_EXTNAME,
+	phpannodex_functions,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+#if ZEND_MODULE_API_NO >= 20010901
+	PHPANNODEX_VERSION,
+#endif
+	STANDARD_MODULE_PROPERTIES
+};
+
+#ifdef COMPILE_DL_PHPANNODEX
+ZEND_GET_MODULE(phpannodex)
+#endif

Modified: phpannodex/trunk/src/phpannodex.h
===================================================================
--- phpannodex/trunk/src/phpannodex.h	2005-12-06 01:33:08 UTC (rev 1682)
+++ phpannodex/trunk/src/phpannodex.h	2005-12-06 03:18:47 UTC (rev 1683)
@@ -1,65 +1,10 @@
 #ifndef PHPANNODEX_H
 #define PHPANNODEX_H 1
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "php.h"
-#include "phpanx_general.h"
-//#include "phpanx_read.h"
-//#include "phpanx_write.h"
-
 #define PHPANNODEX_VERSION "1.0"
 #define PHPANNODEX_EXTNAME "phpannodex"
 
-/* This array tells php what functions this extension provides.
- */
-static function_entry phpannodex_functions[] = {
+extern zend_module_entry phpannodex_module_entry;
+#define phpext_phpannodex_ptr &phpannodex_module_entry
 
-	/* Functions defined in anx_general.h of the original Annodex libraries,
-	 * and phpanx_general.h of the phpannodex extension.
-	 */
-#ifdef PHPANX_GENERAL_H
-	PHPANX_GENERAL_FUNCTIONS
 #endif
-
-	/* Functions defined in anx_read.h of the original Annodex libraries,
-	 * and phpanx_read.h of the phpannodex extension.
-	 */
-#ifdef PHPANX_READ_H
-	PHPANX_READ_FUNCTIONS
-#endif
-
-	/* Functions defined in anx_write.h of the original Annodex libraries,
-	 * and phpanx_write.h of the phpannodex extension.
-	 */
-#ifdef PHPANX_WRITE_H
-	PHPANX_WRITE_FUNCTIONS
-#endif
-
-	{NULL, NULL, NULL}
-};
-
-zend_module_entry phpannodex_module_entry = {
-#if ZEND_MODULE_API_NO >= 20010901
-	STANDARD_MODULE_HEADER,
-#endif
-	PHPANNODEX_EXTNAME,
-	phpannodex_functions,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-#if ZEND_MODULE_API_NO >= 20010901
-	PHPANNODEX_VERSION,
-#endif
-	STANDARD_MODULE_PROPERTIES
-};
-
-#ifdef COMPILE_DL_PHPANNODEX
-ZEND_GET_MODULE(phpannodex)
-#endif
-
-#endif

Modified: phpannodex/trunk/src/phpanx_write.c
===================================================================
--- phpannodex/trunk/src/phpanx_write.c	2005-12-06 01:33:08 UTC (rev 1682)
+++ phpannodex/trunk/src/phpanx_write.c	2005-12-06 03:18:47 UTC (rev 1683)
@@ -4,11 +4,6 @@
 
 #include <annodex/annodex.h>
 
-PHP_FUNCTION(good_morning_world)
-{
-    RETURN_STRING("Good Morning World", 1);
-}
-
 PHP_FUNCTION(anx_write)
 {
 	long ptr_long, n;

Modified: phpannodex/trunk/src/phpanx_write.h
===================================================================
--- phpannodex/trunk/src/phpanx_write.h	2005-12-06 01:33:08 UTC (rev 1682)
+++ phpannodex/trunk/src/phpanx_write.h	2005-12-06 03:18:47 UTC (rev 1683)
@@ -7,7 +7,6 @@
 	PHP_FE(anx_write_import, NULL)		\
 	PHP_FE(anx_init_importers, NULL)	\
 
-PHP_FUNCTION(good_morning_world);
 PHP_FUNCTION(anx_write);
 PHP_FUNCTION(anx_insert_clip);
 PHP_FUNCTION(anx_write_import);


-- 
ctford



More information about the cvs-annodex mailing list