BUILDCMD(3)                    Library Routines                    BUILDCMD(3)




NAME

       buildCmd - build a command string from an argument vector


SYNOPSIS

       #include <gno/gno.h>

       char *buildCmd (char *const *argv);


DESCRIPTION

       buildCmd  constructs  a single string from the NULL-terminated array of
       arguments argv.  The string will be allocated via malloc(3),  and  will
       consist of all of the elements of argv, delimited by single spaces.

       If  argv[0]  is  NULL,  a  zero-length string will be constructed.  Any
       GS/OS prefix (numerical or otherwise) on argv[0] will be stripped.


RETURN VALUE

       On success, buildCmd returns the constructed  string.   On  failure  it
       returns NULL.


HISTORY

       This routine was originally called build_cmd and was part of the lenvi-
       ron library written by Devin Reade for GNO v2.0.3 in  April  1994.   It
       was incorporated into the GNO libc as of v2.0.6.


SEE ALSO

       buildEnv(3), buildPath(3), environ(7).



GNO                             30 January 1997                    BUILDCMD(3)

Man(1) output converted with man2html