function version() { printf("img2txt Copyright 2006-2007 Sam Hocevar and Jean-Yves Lamoureux\n" . " Copyright 2008 Benjamin C. Wiley Sittler\n" . "Internet: <*****@*****.**> <*****@*****.**>\n" . " <*****@*****.**> Version: %s\n" . "\n" . "img2txt, along with its documentation, may be freely copied and distributed.\n" . "\n" . "The latest version of img2txt is available from the web site,\n" . " http://caca.zoy.org/wiki/libcaca in the libcaca package.\n" . "\n", caca_get_version()); }
static function getVersion() { return caca_get_version(); }
} caca_set_canvas_size($cv, 18, 6); caca_set_color_ansi($cv, CACA_LIGHTGREEN, CACA_DEFAULT); caca_put_str($cv, 14, 0, "Moo!"); caca_set_color_ansi($cv, CACA_LIGHTRED, CACA_DEFAULT); caca_put_char($cv, 14, 1, hexdec("2765")); //U+2765 caca_put_char($cv, 16, 1, hexdec("2764")); //U+2764 echo caca_export_string($cv, "html3"); } just_for_fun(); //--- Show caca's information ---// ?> <p>libcaca version: <?php echo htmlspecialchars(caca_get_version()); ?> </p> <p>Available drivers:</p> <ul> <?php $list = caca_get_display_driver_list(); foreach ($list as $type => $name) { echo '<li>' . htmlspecialchars("{$name} ({$type})") . '</li>'; } ?> </ul> <p>Available import formats:</p> <ul>
caca_set_canvas_size($cv, 18, 6); caca_set_color_ansi($cv, CACA_LIGHTGREEN, CACA_DEFAULT); caca_put_str($cv, 14, 0, "Moo!"); caca_set_color_ansi($cv, CACA_LIGHTRED, CACA_DEFAULT); caca_put_char($cv, 14, 1, hexdec("2765")); //U+2765 caca_put_char($cv, 16, 1, hexdec("2764")); //U+2764 echo caca_export_string($cv, "utf8"); } if (php_sapi_name() != "cli") { die("You have to run this program with php-cli!\n"); } just_for_fun(); //--- Show caca's information ---// echo "libcaca version: " . caca_get_version() . "\n\n"; echo "Available drivers:\n"; $list = caca_get_display_driver_list(); foreach ($list as $type => $name) { echo "* {$name} ({$type})\n"; } echo "\n"; echo "Available import formats:\n"; $list = caca_get_import_list(); foreach ($list as $format => $name) { echo "* {$name} ({$format})\n"; } echo "\n"; echo "Available export formats:\n"; $list = caca_get_export_list(); foreach ($list as $format => $name) {