Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37816851
en ru br
ALT Linux repositórios
S:2.6.1-alt1
5.0: 1.14.1.20081023-alt1
4.1: 1.13.99-alt5.M41.1
4.0: 1.12.1-alt2
3.0: 1.12-alt2.1
+updates:1.12-alt2.2

Group :: Terminais
RPM: kbd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: main_argc.diff
Download


#! /bin/sh -e
## 20_main_argc.dpatch by Denis Barbier <barbier@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Description: Fix handling of program arguments.
## DP: Date: 2004-08-02
if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac
exit 0
@DPATCH@
diff -urNad /opt/tmp/kbd-1.12/src/getunimap.c kbd-1.12/src/getunimap.c
--- /opt/tmp/kbd-1.12/src/getunimap.c	2004-08-01 20:33:38.000000000 +0200
+++ kbd-1.12/src/getunimap.c	2004-08-02 22:45:30.000000000 +0200
@@ -62,7 +62,7 @@
 		}
 	}
 
-	if (argc != 1)
+	if (optind < argc)
 		usage();
 
 	fd = getfd(console);
diff -urNad /opt/tmp/kbd-1.12/src/loadunimap.c kbd-1.12/src/loadunimap.c
--- /opt/tmp/kbd-1.12/src/loadunimap.c	2004-08-02 22:45:06.000000000 +0200
+++ kbd-1.12/src/loadunimap.c	2004-08-02 22:46:39.000000000 +0200
@@ -73,18 +73,18 @@
 		}
 	}
 
-	if (argc > 2 || (argc == 1 && !outfnam))
+	if (argc > optind+1 || (argc == optind && !outfnam))
 		usage();
 
 	fd = getfd(console);
 
 	if (outfnam) {
 		saveunicodemap(fd, outfnam);
-		if (argc == 1)
+		if (argc == optind)
 			exit(0);
 	}
 
-	if (argc == 2)
+	if (argc == optind+1)
 		infnam = argv[optind];
 	loadunicodemap(fd, infnam);
 	exit(0);
diff -urNad /opt/tmp/kbd-1.12/src/showconsolefont.c kbd-1.12/src/showconsolefont.c
--- /opt/tmp/kbd-1.12/src/showconsolefont.c	2004-08-02 22:44:30.000000000 +0200
+++ kbd-1.12/src/showconsolefont.c	2004-08-02 22:47:07.000000000 +0200
@@ -135,7 +135,7 @@
 		}
 	}
 
-	if (argc != 1)
+	if (optind < argc)
 		usage();
 
 	fd = getfd(console);
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009