From 6462d00d2f5e2f8b7a8fa6eea4004333d053fa03 Mon Sep 17 00:00:00 2001 From: Nicolas Vion Date: Wed, 29 Oct 2008 13:48:57 +0000 Subject: [PATCH] * Add php binding for 3 caca charset conversion functions * Change php header for sample program "text.php" --- caca-php/examples/text.php | 2 +- caca-php/php_caca.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/caca-php/examples/text.php b/caca-php/examples/text.php index 31fd869..7973f7b 100755 --- a/caca-php/examples/text.php +++ b/caca-php/examples/text.php @@ -1,5 +1,5 @@ #!/usr/bin/php5 - diff --git a/caca-php/php_caca.c b/caca-php/php_caca.c index 0cd6ebb..535ae70 100644 --- a/caca-php/php_caca.c +++ b/caca-php/php_caca.c @@ -701,12 +701,21 @@ PHP_FUNCTION(caca_utf32_to_utf8) { } PHP_FUNCTION(caca_utf32_to_cp437) { + long l; + FETCH_LONG(l); + RETURN_LONG(caca_utf32_to_cp437(l)); } PHP_FUNCTION(caca_cp437_to_utf32) { + long l; + FETCH_LONG(l); + RETURN_LONG(caca_cp437_to_utf32(l)); } PHP_FUNCTION(caca_utf32_to_ascii) { + long l; + FETCH_LONG(l); + RETURN_CHAR(caca_utf32_to_ascii(l)); } PHP_FUNCTION(caca_utf32_is_fullwidth) {