use getprogname if we have, otherwise punt, remove roken dependency
This commit is contained in:
		| @@ -53,8 +53,11 @@ mandoc_template(SL_cmd *cmds, | ||||
|     t = time(NULL); | ||||
|     strftime(timestr, sizeof(timestr), "%b %d, %Y", localtime(&t)); | ||||
|     printf(".Dd %s\n", timestr); | ||||
|     p = strrchr(getprogname(), '/'); | ||||
|     if(p) p++; else p = getprogname(); | ||||
| #ifdef HAVE_GETPROGNAME | ||||
|     p = getprogname(); | ||||
| #else | ||||
|     p = "unknown-application"; | ||||
| #endif | ||||
|     strncpy(cmd, p, sizeof(cmd)); | ||||
|     cmd[sizeof(cmd)-1] = '\0'; | ||||
|     strupr(cmd); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand