Return to test-progname.c CVS log | Up to [cvsweb.bsd.lv] / mandoc |
File: [cvsweb.bsd.lv] / mandoc / test-progname.c (download)
Revision 1.2, Fri Nov 6 16:30:33 2015 UTC (8 years, 10 months ago) by schwarze
Use getprogname(3) rather than __progname. Suggested by Joerg@ Sonnenberger (NetBSD). Last year, deraadt@ confirmed on tech@ that this "has the potential to be more portable", and micro-optimizing for speed is not relevant here. Also gets rid of one global variable. |
#include <stdlib.h> int main(void) { const char * progname; progname = getprogname(); return progname == NULL; }