cvs: embed /php-irssi channel.c ext-irssi.c genobjdefs.php gensignals.php nick.c php-irssi-obj.c typemap.php window.c

[email protected] ("Wez Furlong") Fri, 07 Mar 2003 09:35:29 -0000
Newsgroups php.embed.cvs
Message-ID <cvswez1047029729@cvsserver>
--wez1047029729
Content-Type: text/plain

wez		Fri Mar  7 04:35:29 2003 EDT

  Modified files:              
    /embed/php-irssi	channel.c ext-irssi.c genobjdefs.php 
                    	gensignals.php nick.c php-irssi-obj.c typemap.php 
                    	window.c 
  Log:
  CS patch from Magnus Määttä
  
  
--wez1047029729
Content-Type: text/plain
Content-Disposition: attachment; filename="wez-20030307043529.txt"

Index: embed/php-irssi/channel.c
diff -u embed/php-irssi/channel.c:1.5 embed/php-irssi/channel.c:1.6
--- embed/php-irssi/channel.c:1.5	Sun Feb  2 16:05:25 2003
+++ embed/php-irssi/channel.c	Fri Mar  7 04:35:28 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: channel.c,v 1.5 2003/02/02 21:05:25 wez Exp $
+  $Id: channel.c,v 1.6 2003/03/07 09:35:28 wez Exp $
 */
 #include "php-irssi.h"
 #define PHP_IRSSI_PROTOS_ONLY
@@ -47,8 +47,9 @@
 
 	ref = php_irssi_ref_from_wrapper(object, "CHANNEL" TSRMLS_CC);
 
-	if (ref == NULL)
+	if (ref == NULL) {
 		return NULL;
+	}
 
 	/* try to map it to the correct server first.
 	 * it does not have to succeed; server can be null in channel_find,
Index: embed/php-irssi/ext-irssi.c
diff -u embed/php-irssi/ext-irssi.c:1.15 embed/php-irssi/ext-irssi.c:1.16
--- embed/php-irssi/ext-irssi.c:1.15	Fri Feb  7 09:35:19 2003
+++ embed/php-irssi/ext-irssi.c	Fri Mar  7 04:35:28 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: ext-irssi.c,v 1.15 2003/02/07 14:35:19 tal Exp $
+  $Id: ext-irssi.c,v 1.16 2003/03/07 09:35:28 wez Exp $
 */
 #include "php-irssi.h"
 #include "php-signals-list.h" /* generated by php during make */
@@ -58,10 +58,6 @@
 	}
 }
 
-
-
-
-
 /* Signals */
 
 static char *signal_hash_key(char *signame, zval *callback, char *prefix TSRMLS_DC)
@@ -230,8 +226,9 @@
 
 	}
 
-	if (retval)
+	if (retval) {
 		zval_ptr_dtor(&retval);
+	}
 
 	/* release those zvals */
 	for (i = 0; i < argc; i++) {
@@ -315,8 +312,9 @@
 	} zend_catch {
 	} zend_end_try();
 	
-	if (retval)
+	if (retval) {
 		zval_ptr_dtor(&retval);
+	}
 
 	if (arg) {
 		FREE_ZVAL(arg);
@@ -615,8 +613,9 @@
 	sigid = signal_get_uniq_id(Z_STRVAL_PP(signame));
 	sigargs = sigid_to_args(sigid);
 
-	if (sigargs == NULL)
+	if (sigargs == NULL) {
 		return;
+	}
 
 	if (FAILURE == zend_get_parameters_array_ex(sigargs->argc + 1, zargs TSRMLS_CC)) {
 		WRONG_PARAM_COUNT;
Index: embed/php-irssi/genobjdefs.php
diff -u embed/php-irssi/genobjdefs.php:1.6 embed/php-irssi/genobjdefs.php:1.7
--- embed/php-irssi/genobjdefs.php:1.6	Sat Feb  1 22:27:16 2003
+++ embed/php-irssi/genobjdefs.php	Fri Mar  7 04:35:29 2003
@@ -15,7 +15,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: genobjdefs.php,v 1.6 2003/02/02 03:27:16 wez Exp $
+  $Id: genobjdefs.php,v 1.7 2003/03/07 09:35:29 wez Exp $
 */
 
 /* We build three sets of tables:
@@ -35,8 +35,9 @@
 {
 	$comma = strpos($stmt, ',');
 
-	if ($comma === false)
+	if ($comma === false) {
 		return array($stmt);
+	}
 
 	/* find the first space before the comma */
 	$base = substr($stmt, 0, $comma);
@@ -162,10 +163,11 @@
 foreach ($obj_bind as $data) {
 	list($iclass, $pclass, $iflags) = $data;
 	$label = preg_replace('/_[^_]+$/U', '', $iclass);
-	if (is_array($iflags))
+	if (is_array($iflags)) {
 		$iflags = implode("|", $iflags);
-	else
+	} else {
 		$iflags = "0";
+	}
 	
 	printf("{ PIAT_%s, \"%s\", 0, php_irssi_%s_props, php_irssi_resolve_to_%s, \"%s\", php_irssi_%s_funcs,\n" .
 			"\t%s, php_irssi_%s_prop_reader, NULL, NULL },\n",
@@ -173,7 +175,7 @@
 			$label, $iclass, $iclass, $pclass, $label, $iflags, $iclass);
 }
 printf("{ 0, NULL, 0, NULL }\n};\n\n");
-	printf("#endif /* PHP_IRSSI_PROTOS_ONLY */\n");
+printf("#endif /* PHP_IRSSI_PROTOS_ONLY */\n");
 
 
 ?>
Index: embed/php-irssi/gensignals.php
diff -u embed/php-irssi/gensignals.php:1.4 embed/php-irssi/gensignals.php:1.5
--- embed/php-irssi/gensignals.php:1.4	Sun Feb  2 16:05:26 2003
+++ embed/php-irssi/gensignals.php	Fri Mar  7 04:35:29 2003
@@ -15,7 +15,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: gensignals.php,v 1.4 2003/02/02 21:05:26 wez Exp $
+  $Id: gensignals.php,v 1.5 2003/03/07 09:35:29 wez Exp $
 */
 
 /* Generate signal information from the signals.txt file in the docs
@@ -27,11 +27,13 @@
 
 function read_signal($line)
 {
-	if (!preg_match('/^ "([^"]+)"(<.*>)?,\s*(.*)/', $line, $matches))
+	if (!preg_match('/^ "([^"]+)"(<.*>)?,\s*(.*)/', $line, $matches)) {
 		return;
+	}
 
-	if (strpos($line, '...') || strpos($line, '('))
+	if (strpos($line, '...') || strpos($line, '(')) {
 		return;
+	}
 
 	$signal = $matches[1];
 	$thing = $matches[2];
Index: embed/php-irssi/nick.c
diff -u embed/php-irssi/nick.c:1.4 embed/php-irssi/nick.c:1.5
--- embed/php-irssi/nick.c:1.4	Sun Feb  2 16:05:26 2003
+++ embed/php-irssi/nick.c	Fri Mar  7 04:35:29 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: nick.c,v 1.4 2003/02/02 21:05:26 wez Exp $
+  $Id: nick.c,v 1.5 2003/03/07 09:35:29 wez Exp $
 */
 #include "php-irssi.h"
 #define PHP_IRSSI_PROTOS_ONLY
@@ -44,8 +44,9 @@
 	SERVER_REC *server = NULL;
 	
 	ref = php_irssi_ref_from_wrapper(object, "CHANNEL" TSRMLS_CC);
-	if (ref == NULL)
+	if (ref == NULL) {
 		return NULL;
+	}
 
 	server = server_find_tag(ref->idents[IDX_SERVER]);
 	*channel = channel_find(server, ref->idents[IDX_CHANNEL]);
Index: embed/php-irssi/php-irssi-obj.c
diff -u embed/php-irssi/php-irssi-obj.c:1.6 embed/php-irssi/php-irssi-obj.c:1.7
--- embed/php-irssi/php-irssi-obj.c:1.6	Sun Feb  2 14:18:27 2003
+++ embed/php-irssi/php-irssi-obj.c	Fri Mar  7 04:35:29 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: php-irssi-obj.c,v 1.6 2003/02/02 19:18:27 wez Exp $
+  $Id: php-irssi-obj.c,v 1.7 2003/03/07 09:35:29 wez Exp $
 */
 #include "php-irssi.h"
 #include "php-irssi-obj-defs.h"
@@ -227,8 +227,9 @@
 	int i;
 
 	for (i = 0; i < PHP_IRSSI_MAX_IDENTS; i++) {
-		if (ref->idents[i])
+		if (ref->idents[i]) {
 			efree(ref->idents[i]);
+		}
 	}
 	efree(ref);
 }
Index: embed/php-irssi/typemap.php
diff -u embed/php-irssi/typemap.php:1.6 embed/php-irssi/typemap.php:1.7
--- embed/php-irssi/typemap.php:1.6	Sun Feb  2 14:18:27 2003
+++ embed/php-irssi/typemap.php	Fri Mar  7 04:35:29 2003
@@ -15,7 +15,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: typemap.php,v 1.6 2003/02/02 19:18:27 wez Exp $
+  $Id: typemap.php,v 1.7 2003/03/07 09:35:29 wez Exp $
 */
 
 /* This array describes the functions that can be used to convert between
@@ -59,8 +59,9 @@
 
 		list($handler, $impptr) = $hdata;
 	
-		if ($impptr && $pointers)
+		if ($impptr && $pointers) {
 			$type .= " *";
+		}
 	
 		if (substr($decl, 0, strlen($type)) == $type) {
 
Index: embed/php-irssi/window.c
diff -u embed/php-irssi/window.c:1.3 embed/php-irssi/window.c:1.4
--- embed/php-irssi/window.c:1.3	Sun Feb  2 16:05:56 2003
+++ embed/php-irssi/window.c	Fri Mar  7 04:35:29 2003
@@ -14,7 +14,7 @@
   +----------------------------------------------------------------------+
   | Author: Wez Furlong <[email protected]>                                    |
   +----------------------------------------------------------------------+
-  $Id: window.c,v 1.3 2003/02/02 21:05:56 wez Exp $
+  $Id: window.c,v 1.4 2003/03/07 09:35:29 wez Exp $
 */
 
 #include "php-irssi.h"
@@ -48,8 +48,9 @@
 	struct php_irssi_obj_ref *ref;
 
 	ref = php_irssi_ref_from_wrapper(object, "WINDOW" TSRMLS_CC);
-	if (ref)
+	if (ref) {
 		return ref->actual_ptr;
+	}
 
 	return NULL;
 }

--wez1047029729--