Subversion Repositories SvarDOS

Rev

Rev 1072 | Rev 1823 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1072 Rev 1137
Line 619... Line 619...
619
 
619
 
620
  return(sl);
620
  return(sl);
621
}
621
}
622
 
622
 
623
 
623
 
-
 
624
/* capitalize an ASCIZ string following country-dependent rules */
-
 
625
void nls_strtoup(char *buff) {
-
 
626
  unsigned short errcode = 0;
-
 
627
  /* requires DOS 4+ */
-
 
628
  _asm {
-
 
629
    push ax
-
 
630
    push dx
-
 
631
 
-
 
632
    mov ax, 0x6522 /* country-dependent capitalize string (DOS 4+) */
-
 
633
    mov dx, buff   /* DS:DX -> string to capitalize */
-
 
634
    int 0x21
-
 
635
    jnc DONE
-
 
636
 
-
 
637
    mov errcode, ax /* set errcode on failure */
-
 
638
    DONE:
-
 
639
 
-
 
640
    pop dx
-
 
641
    pop ax
-
 
642
  }
-
 
643
 
-
 
644
  /* rely on OpenWatcom's strupr() if DOS has no NLS support */
-
 
645
  if (errcode != 0) strupr(buff);
-
 
646
}
-
 
647
 
-
 
648
 
624
/* reload nls ressources from svarcom.lng into svarlang_mem */
649
/* reload nls ressources from svarcom.lng into svarlang_mem */
625
void nls_langreload(char *buff, unsigned short env) {
650
void nls_langreload(char *buff, unsigned short env) {
626
  const char far *nlspath;
651
  const char far *nlspath;
627
  const char far *lang;
652
  const char far *lang;
628
  static unsigned short lastlang;
653
  static unsigned short lastlang;