1 Star 0 Fork 9

lyn/netpbm

forked from src-openEuler/netpbm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
netpbm-ppmfadeusage.patch 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
香帅醉花香 提交于 2019-11-29 19:22 . package init
diff -urNp old/editor/ppmfade new/editor/ppmfade
--- old/editor/ppmfade 2017-11-01 11:47:49.869611402 +0100
+++ new/editor/ppmfade 2017-11-01 11:53:25.524973342 +0100
@@ -84,7 +84,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $first_file) {
} else {
print "I can't find first file '$first_file'\n";
- exit 20;
+ exit 1;
}
} elsif ($ARGV[$n] eq "-l") {
$n++;
@@ -92,7 +92,7 @@ for ($n = 0; $n < @ARGV; $n++) {
if (-e $last_file) {
} else {
print "I can't find last file '$last_file'\n";
- exit 20;
+ exit 1;
}
} elsif ($ARGV[$n] eq "-base") {
$n++;
@@ -113,9 +113,12 @@ for ($n = 0; $n < @ARGV; $n++) {
$mode = $BLOCK;
} elsif ("$ARGV[$n]" eq "-mix") {
$mode = $MIX;
+ } elsif ($ARGV[$n] eq "-help" || $ARGV[$n] eq "--help" || $ARGV[$n] eq "-h") {
+ print "ppmfade: Use 'man ppmfade' for help.\n";
+ exit 1;
} else {
print "Unknown argument: $ARGV[$n]\n";
- exit 100;
+ exit 1;
}
}
#
@@ -134,18 +137,18 @@ if ($first_file ne "undefined") {
$width = $1; $height = $2;
} else {
print("Unrecognized results from pnmfile on $first_file.\n");
- exit(50);
+ exit 1;
}
} elsif ($last_file ne "undefined") {
if ((`pnmfile $last_file` =~ m{\b(\d+)\sby\s(\d+)} )) {
$width = $1; $height = $2;
} else {
print("Unrecognized results from pnmfile on $first_file.\n");
- exit(50);
+ exit 1;
}
} else {
print("ppmfade: You must specify -f or -l (or both)\n");
- exit(90);
+ exit 1;
}
print("Frames are " . $width . "W x " . $height . "H\n");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lyn1001/netpbm.git
git@gitee.com:lyn1001/netpbm.git
lyn1001
netpbm
netpbm
master

搜索帮助