|
|
| version 1.17, 2005/02/07 14:46:07 | version 1.18, 2005/03/18 09:23:10 |
|---|---|
| Line 26 static KEYSTAT keystat; | Line 26 static KEYSTAT keystat; |
| void keystat_initialize(void) { | void keystat_initialize(void) { |
| char path[MAX_PATH]; | OEMCHAR path[MAX_PATH]; |
| ZeroMemory(&keyctrl, sizeof(keyctrl)); | ZeroMemory(&keyctrl, sizeof(keyctrl)); |
| keyctrl.keyrep = 0x21; | keyctrl.keyrep = 0x21; |
| Line 36 void keystat_initialize(void) { | Line 36 void keystat_initialize(void) { |
| ZeroMemory(&keystat, sizeof(keystat)); | ZeroMemory(&keystat, sizeof(keystat)); |
| FillMemory(keystat.ref, sizeof(keystat.ref), NKEYREF_NC); | FillMemory(keystat.ref, sizeof(keystat.ref), NKEYREF_NC); |
| keystat_tblreset(); | keystat_tblreset(); |
| getbiospath(path, "key.txt", sizeof(path)); | getbiospath(path, OEMTEXT("key.txt"), NELEMENTS(path)); |
| keystat_tblload(path); | keystat_tblload(path); |
| } | } |
| Line 79 void keystat_tblset(REG8 ref, const UINT | Line 79 void keystat_tblset(REG8 ref, const UINT |
| // ---- config... | // ---- config... |
| static const char str_userkey1[] = "userkey1"; | static const OEMCHAR str_userkey1[] = OEMTEXT("userkey1"); |
| static const char str_userkey2[] = "userkey2"; | static const OEMCHAR str_userkey2[] = OEMTEXT("userkey2"); |
| static REG8 searchkeynum(const char *str, BOOL user) { | static REG8 searchkeynum(const OEMCHAR *str, BOOL user) { |
| const KEYNAME *n; | const KEYNAME *n; |
| const KEYNAME *nterm; | const KEYNAME *nterm; |
| Line 106 const KEYNAME *nterm; | Line 106 const KEYNAME *nterm; |
| return(0xff); | return(0xff); |
| } | } |
| void keystat_tblload(const char *filename) { | void keystat_tblload(const OEMCHAR *filename) { |
| TEXTFILEH tfh; | TEXTFILEH tfh; |
| char work[256]; | OEMCHAR work[256]; |
| char *p; | OEMCHAR *p; |
| char *q; | OEMCHAR *q; |
| char *r; | OEMCHAR *r; |
| UINT8 ref; | UINT8 ref; |
| UINT8 key[15]; | UINT8 key[15]; |
| UINT cnt; | UINT cnt; |
| Line 121 void keystat_tblload(const char *filenam | Line 121 void keystat_tblload(const char *filenam |
| if (tfh == NULL) { | if (tfh == NULL) { |
| goto kstbl_err; | goto kstbl_err; |
| } | } |
| while(textfile_read(tfh, work, sizeof(work)) == SUCCESS) { | while(textfile_read(tfh, work, NELEMENTS(work)) == SUCCESS) { |
| p = milstr_nextword(work); | p = milstr_nextword(work); |
| q = milstr_chr(p, '\t'); | q = milstr_chr(p, '\t'); |
| if (q == NULL) { | if (q == NULL) { |