亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nls.c

?? 分享:Dos操作系統的源程序
?? C
?? 第 1 頁 / 共 2 頁
字號:

/****************************************************************/
/*                                                              */
/*                            nls.c                             */
/*                            DOS-C                             */
/*                                                              */
/*    National Languge Support functions and data structures    */
/*                                                              */
/*                   Copyright (c) 1995, 1996                   */
/*                      Pasquale J. Villani                     */
/*                      All Rights Reserved                     */
/*                                                              */
/*                   Copyright (c) 1995, 1996                   */
/*                         Steffen Kaiser                       */
/*                      All Rights Reserved                     */
/*                                                              */
/* This file is part of DOS-C.                                  */
/*                                                              */
/* DOS-C is free software; you can redistribute it and/or       */
/* modify it under the terms of the GNU General Public License  */
/* as published by the Free Software Foundation; either version */
/* 2, or (at your option) any later version.                    */
/*                                                              */
/* DOS-C is distributed in the hope that it will be useful, but */
/* WITHOUT ANY WARRANTY; without even the implied warranty of   */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See    */
/* the GNU General Public License for more details.             */
/*                                                              */
/* You should have received a copy of the GNU General Public    */
/* License along with DOS-C; see the file COPYING.  If not,     */
/* write to the Free Software Foundation, 675 Mass Ave,         */
/* Cambridge, MA 02139, USA.                                    */
/****************************************************************/

/* $Logfile:   C:/dos-c/src/kernel/nls.c_v  $ */
#ifdef VERSION_STRINGS
static BYTE *RcsId = "$Header:   C:/dos-c/src/kernel/nls.c_v   1.4   04 Jan 1998 23:15:16   patv  $";
#endif

/* $Log:   C:/dos-c/src/kernel/nls.c_v  $
 * 
 *    Rev 1.4   04 Jan 1998 23:15:16   patv
 * Changed Log for strip utility
 * 
 *    Rev 1.3   16 Jan 1997 12:46:54   patv
 * pre-Release 0.92 feature additions
 * 
 *    Rev 1.2   29 May 1996 21:03:46   patv
 * bug fixes for v0.91a
 * 
 *    Rev 1.1   19 Feb 1996  4:34:46   patv
 * Corrected typo
 * 
 *    Rev 1.0   19 Feb 1996  3:21:46   patv
 * Added NLS, int2f and config.sys processing
 */
/* $EndLog$ */

#include "../../hdr/portab.h"
#include "globals.h"

extern UWORD internalUpcase(UWORD c);

#ifndef lint
static char const rcsid[] = 
        "$Id$";
#endif

/* one byte alignment */

#if defined(_MSC_VER) 
    #define asm __asm
    #pragma pack(1)
#elif defined(_QC) || defined(__WATCOM__)
    #pragma pack(1)
#elif defined(__ZTC__)
    #pragma ZTC align 1
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
    #pragma option -a-
#endif

struct ctryInfo {       /* Country Information DOS-38 */
        WORD dateFmt;                   /* 0: USA, 1: Europe, 2: Japan */
        char curr[5];                   /* ASCIZ of currency string */
        char thSep[2];                  /* ASCIZ of thousand's separator */
        char point[2];                  /* ASCIZ of decimal point */
        char dateSep[2];                /* ASCIZ of date separator */
        char timeSep[2];                /* ASCIZ of time separator */
        BYTE currFmt;                   /* format of currency:
                                                bit 0: currency string is placed 0: before, 1: behind number
                                                bit 1: currency string and number are separated by a space; 0: No, 1: Yes
                                        */
        BYTE prescision;                /* */
        BYTE timeFmt;                   /* time format: 0: 12 hours; 1: 24 houres */
        VOID (FAR *upCaseFct)(VOID);    /* far call to a function mapping character in register AL */
        char dataSep[2];                /* ASCIZ of separator in data records */
};

struct _VectorTable
{
        VOID FAR *Table;
        BYTE FnCode;
}; 


struct _NlsInfo
{
        struct extCtryInfo
        {
                BYTE reserved[8];
                BYTE countryFname[64];
                WORD sysCodePage;
                WORD nFnEntries;
                struct _VectorTable VectorTable[6];
                
                /* Extended Country Information DOS-65-01 */
                WORD countryCode;               /* current COUNTRY= code */
                WORD codePage;                  /* current code page (CP) */

                struct ctryInfo nlsCtryInfo;
        } nlsExtCtryInfo;

/* characters of Yes/No prompt for DOS-65-23 */
        char yesCharacter;
        char noCharacter;

/* upcased characters for ECS-ASCII > 0x7f for DOS-65-02 */
        WORD upNCsize;                  /* number of entries in the following array */
        char upNormCh[128];

/* upcased characters for ECS-ASCII > 0x7f for file names for DOS-65-04 */
        WORD upFCsize;                  /* number of entries in the following array */
        char upFileCh[128];

/* collating sequence for ECS-ASCII 0..0xff for DOS-65-06 */
        WORD collSize;                  /* number of entries in the following array */
        char collSeq[256];

/* DBC support for DOS-65-07 */
        WORD dbcSize;                   /* number of entries in the following array */
        /* char dbcTable[1024]; no DBC support */
        WORD dbcEndMarker;              /* contains always 0 */

/* in file names permittable characters for DOS-65-05 */
        struct chFileNames {
                WORD fnSize;                    /* size of this structure */
                BYTE dummy1;
                char firstCh, lastCh;   /* first, last permittable character */
                BYTE dummy2;
                char firstExcl, lastExcl;       /* first, last excluded character */
                BYTE dummy3;
                BYTE numSep;            /* number of file name separators */
                char fnSeparators[14];
        } nlsFn;
} nlsInfo
#ifdef INIT_NLS_049
=               /* let's initialize it with values for Germany */
#include "049-437.nls"
#else
=               /* let's initialize it with default values (USA) */
#include "001-437.nls"
#endif
;

#define normalCh nlsInfo.upNormCh
#define fileCh nlsInfo.upFileCh
#define yesChar nlsInfo.yesCharacter
#define noChar nlsInfo.noCharacter

#define PathSep(c) ((c)=='/'||(c)=='\\')
#define DriveChar(c) (((c)>='A'&&(c)<='Z')||((c)>='a'&&(c)<='z'))

/*  COUNTRY.SYS structures */
struct  CpiHeader
{
        BYTE    name[8];                /* signature */
        BYTE    reserved[8];
        WORD    nPointers;              /* size of following array */
        
        struct  
        {
                BYTE    pointerType;    /* always 1 */
                DWORD   offset;         /* offset to data */
        }       pointer[1];
};

struct  CountryRecord
{
        WORD    length;                 /* size of record */
        WORD    country;                /* country code */
        WORD    codePage;               /* code page */
        WORD    reserved[2];
        DWORD   subCountryOffset;       /* offset to data record */
};

struct  CountryTableDescr
{
        WORD    length;         /* size of structure */
        WORD    id;             /* table type id */
        DWORD   offset;         /* offset to table data */
};

/* standard alignment */

#if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__)
 #pragma pack()
#elif defined (__ZTC__)
 #pragma ZTC align
#elif defined(__TURBOC__) && (__TURBOC__ > 0x202)
 #pragma option -a.
#endif

 
COUNT NlsFuncInst(VOID)
{
        BYTE cNlsRet;

        asm {
                xor     bx,bx
                mov     ax,1400h
                int     2Fh
                mov     cNlsRet,al
        }

        /* Return the al register as sign extended:                     */
        /*               0 == not installed, ok to install              */
        /*               1 == not installed, not ok to install          */
        /*              -1 == installed                                 */
        return cNlsRet;
}

BOOL
GetGlblCodePage(UWORD FAR *ActvCodePage, UWORD FAR *SysCodePage)
{
        *ActvCodePage = nlsInfo.nlsExtCtryInfo.codePage;
        *SysCodePage = nlsInfo.nlsExtCtryInfo.sysCodePage;
        return TRUE;
}


BOOL
SetGlblCodePage(UWORD FAR *ActvCodePage, UWORD FAR *SysCodePage)
{
        nlsInfo.nlsExtCtryInfo.codePage = *ActvCodePage;
        nlsInfo.nlsExtCtryInfo.sysCodePage = *SysCodePage;
        return TRUE;
}


UWORD SetCtryInfo(UBYTE FAR *lpShrtCode, UWORD FAR *lpLongCode,
        BYTE FAR *lpTable, UBYTE *nRetCode)
{
        UWORD CntryCode;
        UBYTE nNlsEntry;
        UWORD uSegTable, uOffTable;
        UBYTE nLclRet;

        /* Get the Country Code according to the DOS silly rules.       */
        if(0xff != *lpShrtCode)
                CntryCode = *lpShrtCode;
        else
                CntryCode = *lpLongCode;

        /* If it's the same country code as what's installed, just      */
        /* return because there's nothing to do.                        */
        if(CntryCode == nlsInfo.nlsExtCtryInfo.countryCode)
        {
                *nRetCode = 0;
                return CntryCode;
        }

        /* Check if nlsfunc is installed                                */
        if(NlsFuncInst() >= 0)
        {
                *nRetCode = 0xff;
                return 0xffff;
        }

        /* Get the country information from nlsfunc                     */
        uSegTable = FP_SEG(lpTable);
        uOffTable = FP_OFF(lpTable);

        asm {
                push    ds
                mov     bx,CntryCode

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品污污网站在线观看| 狂野欧美性猛交blacked| 国产婷婷精品av在线| 精品久久久久一区| 91精品国产一区二区人妖| 欧美日韩一级二级| 欧美日韩美女一区二区| 欧美性一二三区| 91国产成人在线| 欧美中文字幕久久| 欧美在线影院一区二区| 欧美日韩一级黄| 91精品国产入口| 制服.丝袜.亚洲.另类.中文| 欧美精品电影在线播放| 欧美精品丝袜中出| 日韩欧美亚洲国产精品字幕久久久| 欧美色国产精品| 在线不卡中文字幕| 日韩欧美色综合网站| 欧美精品一区二区三区四区| 亚洲精品在线电影| 中文字幕欧美三区| 亚洲免费观看高清完整| 亚洲综合在线电影| 婷婷亚洲久悠悠色悠在线播放| 日韩国产精品久久| 精品在线观看免费| 成人性生交大片免费看视频在线 | 亚洲成a人v欧美综合天堂下载| 亚洲精品国产无天堂网2021| 一区二区欧美国产| 日本不卡免费在线视频| 激情综合色综合久久| 国产高清亚洲一区| 色一情一伦一子一伦一区| 欧美亚洲综合网| 日韩欧美综合在线| 国产精品人成在线观看免费| 一区二区在线电影| 视频一区视频二区中文字幕| 久久国产麻豆精品| 国产不卡视频在线播放| 91亚洲精品久久久蜜桃网站 | 91免费国产视频网站| 欧美撒尿777hd撒尿| 欧美成人a在线| 国产精品美女一区二区三区| 亚洲国产日产av| 久久精品国内一区二区三区| 成人一区二区三区中文字幕| 欧美日韩中文字幕一区| 久久先锋资源网| 亚洲精品自拍动漫在线| 青青草97国产精品免费观看 | 91在线国产福利| 欧美肥妇bbw| 国产精品私房写真福利视频| 亚洲成人免费影院| 国产成人免费xxxxxxxx| 欧美视频在线播放| 国产日韩综合av| 三级一区在线视频先锋| 成人av小说网| 欧美一二三区在线| 亚洲蜜臀av乱码久久精品蜜桃| 久久av资源网| 欧美性受xxxx黑人xyx| 国产日韩av一区二区| 首页亚洲欧美制服丝腿| 97精品视频在线观看自产线路二| 欧美一级搡bbbb搡bbbb| 亚洲免费av网站| 国产.欧美.日韩| 51午夜精品国产| 亚洲视频你懂的| 国产中文一区二区三区| 欧美日韩精品系列| 最新国产精品久久精品| 国产在线不卡视频| 欧美高清精品3d| 亚洲激情自拍偷拍| 成人黄色国产精品网站大全在线免费观看| 欧美美女bb生活片| 亚洲女同一区二区| 丁香天五香天堂综合| 欧美成人aa大片| 日韩激情一二三区| 欧美色倩网站大全免费| 亚洲欧美日韩中文播放| 国产99久久久精品| 2023国产一二三区日本精品2022| 午夜一区二区三区视频| 91极品美女在线| 国产精品久久久久一区二区三区| 久久国产尿小便嘘嘘尿| 日韩一区二区精品葵司在线| 亚洲福利一区二区三区| 91精品91久久久中77777| 亚洲男人天堂av网| aa级大片欧美| 1024精品合集| 91免费国产在线| 亚洲毛片av在线| 色婷婷激情久久| 一个色综合av| 91久久精品网| 樱桃国产成人精品视频| 91丨porny丨蝌蚪视频| 亚洲天堂久久久久久久| 99在线精品观看| 国产精品国产三级国产a| 成人午夜视频在线观看| 欧美韩国日本不卡| 成人免费视频视频| 国产精品美女久久久久久| www.综合网.com| 亚洲人成精品久久久久| 日本韩国欧美国产| 亚洲第一狼人社区| 欧美精品丝袜久久久中文字幕| 日韩精品午夜视频| 日韩欧美色综合网站| 国产乱人伦偷精品视频免下载| 国产日韩欧美精品一区| 粉嫩久久99精品久久久久久夜 | 天堂va蜜桃一区二区三区| 欧美日本国产一区| 日产欧产美韩系列久久99| 日韩免费一区二区| 国产成人免费网站| 亚洲女同一区二区| 欧美日产在线观看| 久久福利视频一区二区| 国产视频911| 91亚洲男人天堂| 日韩激情一区二区| 国产亚洲综合在线| 91高清在线观看| 美女一区二区在线观看| 国产欧美精品区一区二区三区| 99re热视频这里只精品| 亚洲123区在线观看| 精品国产乱码久久久久久夜甘婷婷 | 亚洲国产成人高清精品| 欧美一区二区女人| 成人听书哪个软件好| 亚洲影院在线观看| 欧美va在线播放| av电影在线观看不卡| 首页国产丝袜综合| 国产日韩av一区二区| 91国偷自产一区二区三区观看| 美国毛片一区二区三区| 国产精品丝袜一区| 欧美日韩一级视频| 国产精品一二三| 亚洲午夜精品17c| 久久久久久久久岛国免费| 99久久国产免费看| 水野朝阳av一区二区三区| 亚洲国产成人自拍| 欧美一级在线免费| 99国产一区二区三精品乱码| 日韩精品每日更新| 一色桃子久久精品亚洲| 欧美一级欧美三级在线观看| 波多野结衣精品在线| 免费成人在线观看视频| 亚洲少妇最新在线视频| 日韩欧美成人一区| 91久久精品一区二区二区| 国产高清久久久久| 日本怡春院一区二区| 最新国产精品久久精品| 精品99一区二区| 5月丁香婷婷综合| 91色在线porny| 国产酒店精品激情| 日韩精品五月天| 亚洲黄色录像片| 中文字幕av一区二区三区免费看| 91超碰这里只有精品国产| 91视频在线观看免费| 风间由美一区二区三区在线观看| 日韩一区欧美二区| 亚洲午夜免费电影| 自拍偷在线精品自拍偷无码专区| 久久尤物电影视频在线观看| 在线91免费看| 欧美私人免费视频| 99国产欧美久久久精品| 国产 欧美在线| 国产精品一线二线三线精华| 日本不卡一二三| 日韩国产精品大片| 午夜精品视频一区| 亚洲午夜久久久| 亚洲黄色av一区| 一二三四区精品视频|