merge strcpy_truncate branch

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5027 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1998-06-09 19:25:40 +00:00
parent e255dfc950
commit a5f54865d4
87 changed files with 689 additions and 499 deletions

View File

@@ -97,12 +97,11 @@ mandoc_template(struct getargs *args,
printf(".\\\" * use better macros for arguments (like .Pa for files)\n");
printf(".\\\"\n");
t = time(NULL);
strftime(timestr, sizeof(timestr), "%b %d, %Y", localtime(&t));
strftime(timestr, sizeof(timestr), "%B %e, %Y", localtime(&t));
printf(".Dd %s\n", timestr);
p = strrchr(__progname, '/');
if(p) p++; else p = __progname;
strncpy(cmd, p, sizeof(cmd));
cmd[sizeof(cmd)-1] = '\0';
strcpy_truncate(cmd, p, sizeof(cmd));
strupr(cmd);
printf(".Dt %s SECTION\n", cmd);