[ros-diffs] [ablackmann] 43967: Now write out the DEF file (okay that was too easy).

ablackmann at svn.reactos.org ablackmann at svn.reactos.org
Thu Nov 5 03:04:05 CET 2009


Author: ablackmann
Date: Thu Nov  5 03:04:04 2009
New Revision: 43967

URL: http://svn.reactos.org/svn/reactos?rev=43967&view=rev
Log:
Now write out the DEF file (okay that was too easy).

Modified:
    trunk/reactos/tools/kbdtool/output.c

Modified: trunk/reactos/tools/kbdtool/output.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/kbdtool/output.c?rev=43967&r1=43966&r2=43967&view=diff
==============================================================================
--- trunk/reactos/tools/kbdtool/output.c [iso-8859-1] (original)
+++ trunk/reactos/tools/kbdtool/output.c [iso-8859-1] Thu Nov  5 03:04:04 2009
@@ -348,8 +348,32 @@
 BOOLEAN
 kbd_def(VOID)
 {
-    /* FIXME: Stub */
-    return FALSE;   
+    CHAR OutputFile[13];
+    FILE *FileHandle;
+    
+    /* Build the keyboard name and internal name */
+    strcpy(OutputFile, gKBDName);
+    strcat(OutputFile, ".DEF");
+    
+    /* Open it */
+    FileHandle = fopen(OutputFile, "wt");
+    if (!FileHandle)
+    {
+        /* Fail */
+        printf(" %12s : can't open for write.\n", OutputFile);
+        return FALSE;
+    }
+    
+    /* Write the file exports */
+    fprintf(FileHandle,
+            "LIBRARY %s\n\n"
+            "EXPORTS\n"
+            "    KbdLayerDescriptor @1\n",
+            gKBDName);
+    
+    /* Clean up */
+    fclose(FileHandle);
+    return TRUE;
 }
 
 BOOLEAN




More information about the Ros-diffs mailing list