root.txt

来自「dos 1.0 其中包含quick basic源代码、内存管理himem emm」· 文本 代码 · 共 42 行

TXT
42
字号
SUMMARY rootpath

#include <tools.h>

int rootpath(pstrSrc, pstrDest)
char *pstrSrc, *pstrDest;


DESCRIPTION

rootpath generates a path to a file from the root.  *pstrDest is assumed to
be large enough to hold the result.  The source may specify a drive other
than the current drive.

RETURN VALUE

Returns zero if it succeeds else non-zero.

IMPLEMENTATION


SEE ALSO


NOTE


EXAMPLE

#include <tools.h>

main(c, argv)
int c;
char *argv[];
{
    char str[MAXPATHLEN];

    rootpath("temp.txt",     str); printf("%s\n", str);
    rootpath("..\\temp.txt", str); printf("%s\n", str);
    rootpath("b:temp.txt",   str); printf("%s\n", str);
}

⌨️ 快捷键说明

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