Author: ken
Date: 2012-05-01 16:29:43 -0600 (Tue, 01 May 2012)
New Revision: 2434

Added:
   trunk/kbd/kbd-1.15.3-upstream_fixes-1.patch
Log:
Upstream patch to fix the kbd-1.15.3 regression.

Added: trunk/kbd/kbd-1.15.3-upstream_fixes-1.patch
===================================================================
--- trunk/kbd/kbd-1.15.3-upstream_fixes-1.patch                         (rev 0)
+++ trunk/kbd/kbd-1.15.3-upstream_fixes-1.patch 2012-05-01 22:29:43 UTC (rev 
2434)
@@ -0,0 +1,66 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2012-05-01
+Initial Package Version: 1.15.3
+Upstream Status: Applied
+Origin: Upstream, commit:83f0743c1fed872d80a0dd31924575d9bf9c2770
+Description:
+
+loadkeys from 1.15.3 introduced a regression where it doesn’t default to
+reading from stdin when started without a filename argument.
+
+---
+ src/loadkeys.y |   33 +++++++++++++++++++++------------
+ 1 files changed, 21 insertions(+), 12 deletions(-)
+
+Index: devel/src/loadkeys.y
+===================================================================
+--- devel.orig/src/loadkeys.y  2011-07-22 19:06:52.000000000 +0200
++++ devel/src/loadkeys.y       2011-07-22 19:07:10.000000000 +0200
+@@ -1035,6 +1035,22 @@
+               ;
+ %%
+ 
++static void parse_keymap(FILE *fd) {
++      if (!quiet && !optm)
++              fprintf(stdout, _("Loading %s\n"), pathname);
++
++      stack_push(fd, 0, pathname);
++
++      if (yyparse()) {
++              fprintf(stderr, _("syntax error in map file\n"));
++
++              if (!optm)
++                      fprintf(stderr,
++                              _("key bindings not changed\n"));
++              exit(EXIT_FAILURE);
++      }
++}
++
+ int main(int argc, char *argv[])
+ {
+       const char *short_opts = "abcC:dhmsuqvV";
+@@ -1180,19 +1196,12 @@
+               }
+ 
+  gotf:
+-              if (!quiet && !optm)
+-                      fprintf(stdout, _("Loading %s\n"), pathname);
+-
+-              stack_push(f, 0, pathname);
+-
+-              if (yyparse()) {
+-                      fprintf(stderr, _("syntax error in map file\n"));
++              parse_keymap(f);
++      }
+ 
+-                      if (!optm)
+-                              fprintf(stderr,
+-                                      _("key bindings not changed\n"));
+-                      exit(EXIT_FAILURE);
+-              }
++      if (optind == argc) {
++              strcpy(pathname, "<stdin>");
++              parse_keymap(stdin);
+       }
+ 
+       do_constant();

-- 
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to