Browse Source

more accurate error message

tags/v0.99.beta17
Ben Wiley Sittler bsittler 16 years ago
parent
commit
4c5f2a9098
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      caca-php/examples/img2txt.php

+ 3
- 3
caca-php/examples/img2txt.php View File

@@ -272,8 +272,8 @@ function main()
$opt = $opt_and_arg[0];
$arg = $opt_and_arg[1];
if((substr($opt, 0, 2) == '--')
&&
array_key_exists(substr($opt, strlen('--')) . (($arg !== NULL) ? ':' : ''), $long_options))
&&
array_key_exists(substr($opt, strlen('--')) . (($arg !== NULL) ? ':' : ''), $long_options))
{
$opt = '-' . $long_options[substr($opt, strlen('--')) . (($arg !== NULL) ? ':' : '')];
}
@@ -374,7 +374,7 @@ function main()
$export = caca_export_string($cv, $format?$format:"ansi");
if(!$export)
{
fprintf(STDERR, "%s: Can't export to format '%s'\n", $argv[0], $format);
fprintf(STDERR, "%s: Can't export to format '%s'\n", $argv[0], $format?$format:"ansi");
return -1;
}
else


Loading…
Cancel
Save