summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2004-01-29 00:51:57 +0000
committerMartin Schlemmer <azarah@gentoo.org>2004-01-29 00:51:57 +0000
commit176d36cfcbf9d5d6766dcd6a51312b51f569e123 (patch)
treee5e8194d73bbce9ab7990e4d0572a722627963f3 /sys-apps/kbd/files/kbd-1.08-find-map-fix.patch
parentAdded app-emacs/css-mode ebuild. (diff)
downloadhistorical-176d36cfcbf9d5d6766dcd6a51312b51f569e123.tar.gz
historical-176d36cfcbf9d5d6766dcd6a51312b51f569e123.tar.bz2
historical-176d36cfcbf9d5d6766dcd6a51312b51f569e123.zip
Fixes a problem where loadkeys matches dvorak the dir, and not the .map file.
Diffstat (limited to 'sys-apps/kbd/files/kbd-1.08-find-map-fix.patch')
-rw-r--r--sys-apps/kbd/files/kbd-1.08-find-map-fix.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/sys-apps/kbd/files/kbd-1.08-find-map-fix.patch b/sys-apps/kbd/files/kbd-1.08-find-map-fix.patch
new file mode 100644
index 000000000000..bdb06d31246b
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.08-find-map-fix.patch
@@ -0,0 +1,35 @@
+--- kbd-1.08/src/findfile.c.orig 2004-01-29 01:47:40.735190832 +0200
++++ kbd-1.08/src/findfile.c 2004-01-29 02:06:51.703217096 +0200
+@@ -167,6 +167,7 @@
+ FILE *fp;
+ int dl, recdepth;
+ struct decompressor *dc;
++ struct stat tstat;
+
+ if (strlen(fnam) >= sizeof(pathname))
+ return NULL;
+@@ -211,6 +212,7 @@
+
+ /* delete trailing slashes; trailing stars denote recursion */
+ dir = xstrdup(*dp);
++loop:
+ dl = strlen(dir);
+ recdepth = 0;
+ while (dl && dir[dl-1] == '*') {
+@@ -224,8 +226,15 @@
+ }
+
+ fp = findfile_in_dir(fnam, dir, recdepth, suffixes);
+- if (fp)
++ if (fp) {
++ if ((lstat(pathname, &tstat) == 0)
++ && (S_ISDIR(tstat.st_mode) != 0)) {
++ dir = xstrdup(pathname);
++ goto loop;
++ }
++
+ return fp;
++ }
+ }
+
+ return NULL;