'\" te .\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. .TH getprogname 3C "11 Oct 2010" "SunOS 5.11" "Standard C Library Functions" .SH NAME getprogname, setprogname \- get or set the program name .SH SYNOPSIS .LP .nf #include const char *getprogname(void); .fi .LP .nf void setprogname(const char *\fIprogname\fR); .fi .SH DESCRIPTION .sp .LP The \fBgetprogname()\fR function returns the name of the program. If the name has not yet been set, it returns \fINULL\fR. .sp .LP The \fBsetprogname()\fR function sets the name of the program to be the last component of the \fIprogname\fR argument. Since a pointer to the given string is kept as the program name, it should not be modified for the duration of the program. .sp .LP These functions are used by error-reporting routines to produce consistent output. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBerr\fR(3C), \fBattributes\fR(5)