_cmdname.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 34 行

GML
34
字号
.func _cmdname
#include <process.h>
char *_cmdname( char *buffer );
.ixfunc2 '&String' &func
.funcend
.desc begin
The &func function obtains a copy of the executing program's pathname
and places it in
.arg buffer.
.desc end
.return begin
If the pathname of the executing program cannot be determined then
.mono NULL
is returned; otherwise the address of
.arg buffer
is returned.
.return end
.see begin
.seelist _cmdname getcmd
.see end
.exmp begin
#include <stdio.h>
#include <process.h>

void main()
  {
    char buffer[PATH_MAX];
.exmp break
    printf( "%s\n", _cmdname( buffer ) );
  }
.exmp end
.class WATCOM
.system

⌨️ 快捷键说明

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