.\" Man page generated from reStructuredText
.\" by the Docutils 0.23 manpage writer.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "PMIX_ARGV_PREPEND_NOSIZE" "3" "Sep 27, 2026" "" "OpenPMIx"
.sp
\fBPMIx_Argv_prepend_nosize\fP — Insert a copy of a string at the front
of a NULL\-terminated \fBargv\fP\-style array.
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.EX
#include <pmix.h>

pmix_status_t PMIx_Argv_prepend_nosize(char ***argv, const char *arg);
.EE
.UNINDENT
.UNINDENT
.SS Python Syntax
.sp
No Python equivalent
.SH INPUT/OUTPUT PARAMETERS
.INDENT 0.0
.IP \(bu 2
\fBargv\fP: Address of a pointer to a NULL\-terminated \fBargv\fP\-style array.
On input, \fB*argv\fP may be \fBNULL\fP (in which case a new array is created)
or point to an existing array. On output, \fB*argv\fP is updated to point at
the (possibly reallocated) array.
.UNINDENT
.SH INPUT PARAMETERS
.INDENT 0.0
.IP \(bu 2
\fBarg\fP: The string to prepend. The routine stores a private copy; the
caller retains ownership of \fBarg\fP\&.
.UNINDENT
.SH DESCRIPTION
.sp
Insert the string \fBarg\fP at position zero of the array referenced by
\fB*argv\fP, shifting every existing entry up by one position.
.sp
If \fB*argv\fP is \fBNULL\fP, a new two\-element array is allocated holding a copy
of \fBarg\fP followed by the terminating \fBNULL\fP\&. If \fB*argv\fP already points
to an array, the array is reallocated one entry larger, the existing entries
are moved down one slot to make room, and a copy of \fBarg\fP (made with
\fBstrdup\fP) is stored in element zero. \fB*argv\fP is updated to the resulting
array pointer, which the caller must use in place of any prior value because
reallocation may move the array.
.sp
This routine is the front\-insertion counterpart to
PMIx_Argv_append_nosize(3) \%<#\:man3-pmix-argv-append-nosize>\&.
.SH RETURN VALUE
.sp
Returns one of:
.INDENT 0.0
.IP \(bu 2
\fBPMIX_SUCCESS\fP The string was prepended successfully.
.IP \(bu 2
\fBPMIX_ERR_OUT_OF_RESOURCE\fP Memory could not be allocated for the array.
.UNINDENT
.SH EXAMPLES
.INDENT 0.0
.INDENT 3.5
.sp
.EX
char **argv = NULL;

PMIx_Argv_append_nosize(&argv, \(dqb\(dq);
PMIx_Argv_prepend_nosize(&argv, \(dqa\(dq);
/* argv == { \(dqa\(dq, \(dqb\(dq, NULL } */

PMIx_Argv_free(argv);
.EE
.UNINDENT
.UNINDENT
.sp
\fBSee also:\fP
.INDENT 0.0
.INDENT 3.5
PMIx_Argv_append_nosize(3) \%<#\:man3-pmix-argv-append-nosize>,
PMIx_Argv_append_unique_nosize(3) \%<#\:man3-pmix-argv-append-unique-nosize>,
PMIx_Argv_count(3) \%<#\:man3-pmix-argv-count>,
PMIx_Argv_copy(3) \%<#\:man3-pmix-argv-copy>,
PMIx_Argv_free(3) \%<#\:man3-pmix-argv-free>
.UNINDENT
.UNINDENT
.SH Copyright
2014-2026, OpenPMIx Community
.\" End of generated man page.
