From ce3c33cc9f11b36e13839ff4d0dfb8662ec3606d Mon Sep 17 00:00:00 2001 From: Arch Blackmann Date: Thu, 5 Nov 2009 02:04:04 +0000 Subject: [PATCH] Now write out the DEF file (okay that was too easy). svn path=/trunk/; revision=43967 --- reactos/tools/kbdtool/output.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/reactos/tools/kbdtool/output.c b/reactos/tools/kbdtool/output.c index 2f90dba9ae9..bb274c4dc0b 100644 --- a/reactos/tools/kbdtool/output.c +++ b/reactos/tools/kbdtool/output.c @@ -348,8 +348,32 @@ kbd_rc(IN PKEYNAME DescriptionData, 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