From 12e8f5e5b3f33dbd1290c76dd0d6a4cf832993d7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 11 Aug 2008 15:40:03 +0930 Subject: Add a few explanatory comments. --- keymap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'keymap.c') 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<type))!=0) { @@ -129,6 +133,7 @@ LEDInfo * unbound= NULL; have|= (1<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); -- cgit v1.2.1