Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <process.h>
    char *getcmd( char *cmd_line );

Description:
    The getcmd function causes the command line information, with the
    program name removed, to be copied to cmd_line.  The information is
    terminated with a '\0' character.  This provides a method of obtaining
    the original parameters to a program unchanged (with the white space
    intact).

    This information can also be obtained by examining the vector of program
    parameters passed to the main function in the program.

Returns:
    The address of the target cmd_line is returned.

See Also:
    abort, atexit, _bgetcmd, exec Functions Functions, exit, _exit, getenv, main,
    onexit, putenv, spawn Functions Functions, system

Example:
    Suppose a program were invoked with the command line

         myprog arg-1 ( my   stuff ) here

    where that program contains

    #include <stdio.h>
    #include <process.h>

    void main()
      {
        char cmds[128];

        printf( "%s\n", getcmd( cmds ) );
      }

    produces the following:

      arg-1 ( my   stuff ) here

Classification:
    WATCOM

Systems:
    All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson