📄 getuser.c
字号:
/**
PC-MOS/386 Ver. 3.0 Interface Functions
Copyright (C) 1988, 1989 More Custom Software. All rights reserved.
Written in Microsoft C ver. 5.1
Copyright Microsoft Corporation, 1984-1987. All rights reserved.
- Description -
If available, will return 'user' signed on in the specified
'task'.
- Return -
'User' signed on if available.
Empty string if noone signed on.
- Note -
'user' string must be a minimum of five characters.
if 'task' == -1, current task will be used.
**/
#include <mos.h>
char *get_user(task, user)
int task;
char *user;
{
register int x;
char far *tcb;
if (ismos()) {
tcb = get_tcb(task);
for(x = 0; x != 4; x++)
*(user + x) = *(tcb + x + 123);
*(user + 4) = '\0';
return(user);
} else
return((char *)0);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -