summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-08-11 15:40:03 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-08-12 10:54:45 +0930
commit12e8f5e5b3f33dbd1290c76dd0d6a4cf832993d7 (patch)
treef7dd943c72c4d1b34dba7f7a95e2744fb543271e
parentde48206e7fe2206542313a2d1d1ea3c40b06114b (diff)
Add a few explanatory comments.
-rw-r--r--keymap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/keymap.c b/keymap.c
index 610051d..5cc4c95 100644
--- a/keymap.c
+++ b/keymap.c
@@ -41,6 +41,9 @@
XkbFile * sections[MAX_SECTIONS];
+/**
+ * Compile the given file and store the output in result.
+ */
Bool
CompileKeymap(XkbFile *file,XkbFileInfo *result,unsigned merge)
{
@@ -59,7 +62,7 @@ LEDInfo * unbound= NULL;
required= XkmSemanticsRequired;
legal= XkmSemanticsLegal;
break;
- case XkmLayoutFile:
+ case XkmLayoutFile: /* standard type if setxkbmap -print */
required= XkmLayoutRequired;
legal= XkmKeymapLegal;
break;
@@ -75,6 +78,7 @@ LEDInfo * unbound= NULL;
have= 0;
ok= 1;
file= (XkbFile *)file->defs;
+ /* Check for duplicate entries in the input file */
while ((file)&&(ok)) {
file->topName= mainName;
if ((have&(1<<file->type))!=0) {
@@ -129,6 +133,7 @@ LEDInfo * unbound= NULL;
have|= (1<<file->type);
file= (XkbFile*)file->common.next;
}
+ /* compile the sections we have in the file one-by-one, or fail. */
if (ok) {
if (ok && (sections[KEYCODES]!=NULL))
ok= CompileKeycodes(sections[KEYCODES],result,MergeOverride);