program.h
Package: WA2L/edrc 1.5.57
Section: WA2L C Programmer's Manual (3)
Updated: 27 June 2024
Index
Return to Main Contents
NAME
version, msg - general program functions
SYNOPSIS
#define PROGNAME "mycommand"
#define PROGVERSION "1.0.07"
#define PROGAUTHOR "John Doe"
#include "program.h"
void version();
void msg(char *level, char *format, ...);
AVAILABILITY
WA2L/edrc
DESCRIPTION
program.h
provides general program functions.
msg()
return a structured message to
stderr.
Example:
msg("error", "cannot open file '%s' defined in line number '%d'\n", filename, 16);
Output:
mycommand-ERROR: cannot open file 'config.cfg' defined in line number '16'
version()
print program version information.
The program name, version and author is printed from the
PROGVERSION,
PROGNAME,
and
PROGAUTHOR
defines.
The output of the program name and version is printed
stdout,
the program author is printed to
stderr.
Example:
version();
Output:
mycommand 1.0.07 John Doe
RETURN VALUE
-
ENVIRONMENT
-
FILES
- lib/$OSID/includes/program.h
-
EXAMPLES
-
SEE ALSO
edrcintro(1),
https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html,
checkopt.h(3),
osid(3),
strings.h(3),
utility.h(3),
wa2lc(3)
NOTES
-
BUGS
-
AUTHOR
program.h was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2024
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 16:54:05 GMT, August 28, 2024