From ee60fb10b8d6b8636487d8a26c92436b77ac65ba Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sun, 25 Jan 2004 22:12:30 +0000 Subject: [PATCH] From Lucho: implement --------D-2F1211----------------------------- INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@747 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/inthndlr.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 6759458..e9e9cf8 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1905,6 +1905,27 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs r) r.dx = dos_gettime(); break; + case 0x11: /* normalise ASCIIZ filename */ + { + char c; + char FAR *s = MK_FP(r.ds, r.si); + char FAR *t = MK_FP(r.es, r.di); + + do + { + c = *s++; + /* uppercase character */ + /* for now, ASCII only because nls.c cannot handle DS!=SS */ + if (c >= 'a' && c <= 'z') + c -= 'a' - 'A'; + else if (c == '/') + c = '\\'; + *t++ = c; + } + while (c); + break; + } + case 0x12: /* get length of asciiz string */ r.cx = fstrlen(MK_FP(r.es, r.di)) + 1;