pathchr.txt

来自「[随书类]Dos6.0源代码」· 文本 代码 · 共 45 行

TXT
45
字号
SUMMARY fPathChr fSwitChr

#include <tools.h>

flagType fPathChr(ch)
char ch;

flagType fSwitChr(ch)
char ch;

DESCRIPTION

fPathChr and fSwitChr test whether the character is a path separator or
a command line switch character.

RETURN VALUE

fPathChr returns non-zero for \ and / otherwise zero.

fSwitChr uses DOS function 37h to determine whether non-zero should be
returned for / or for -.  Otherwise zero is returned.

IMPLEMENTATION


SEE ALSO


NOTE


EXAMPLE

#include <tools.h>

main(c, argv)
int c;
char *argv[];
{
    printf("\\ %d\n", fPathChr('\\'));
    printf("/ %d\n", fPathChr('/'));
    printf("/ %d\n", fSwitChr('/'));
    printf("- %d\n", fSwitChr('-'));
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?