mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-11-01 02:04:32 +00:00
46 lines
1.1 KiB
Groff
46 lines
1.1 KiB
Groff
|
.\" This man page was written to conform with the lenviron v1.1.3
|
||
|
.\" release for Gno v2.0.3 and later by Devin Reade.
|
||
|
.\"
|
||
|
.\" $Id: buildCmd.3,v 1.1 1997/02/27 07:32:21 gdr Exp $
|
||
|
.\"
|
||
|
.TH BUILDCMD 3 "30 January 1997" GNO "Library Routines"
|
||
|
.SH NAME
|
||
|
buildCmd - build a command string from an argument vector
|
||
|
.SH SYNOPSIS
|
||
|
#include <gno/gno.h>
|
||
|
.sp 1
|
||
|
char *\fBbuildCmd\fR (char *const *\fIargv\fR);
|
||
|
.SH DESCRIPTION
|
||
|
.BR buildCmd
|
||
|
constructs a single string from the NULL-terminated array of arguments
|
||
|
.IR argv .
|
||
|
The string will be allocated via
|
||
|
.BR malloc (3),
|
||
|
and will consist of all of the elements of
|
||
|
.IR argv ,
|
||
|
delimited by single spaces.
|
||
|
.LP
|
||
|
If
|
||
|
.IR argv [0]
|
||
|
is NULL, a zero-length string will be constructed.
|
||
|
Any GS/OS prefix (numerical or otherwise) on
|
||
|
.IR argv [0]
|
||
|
will be stripped.
|
||
|
.SH RETURN VALUE
|
||
|
On success,
|
||
|
.BR buildCmd
|
||
|
returns the constructed string. On failure it returns NULL.
|
||
|
.SH HISTORY
|
||
|
This routine was originally called
|
||
|
.BR build_cmd
|
||
|
and was part of the
|
||
|
.BR lenviron
|
||
|
library written by Devin Reade for GNO v2.0.3 in April 1994.
|
||
|
It was incorporated into the GNO
|
||
|
.BR libc
|
||
|
as of v2.0.6.
|
||
|
.SH SEE ALSO
|
||
|
.BR buildEnv (3),
|
||
|
.BR buildPath (3),
|
||
|
.BR environ (7).
|