version 1.34, 2015/03/19 09:53:36 |
version 1.35, 2018/11/13 08:45:29 |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <time.h> |
|
#include <unistd.h> |
#include <unistd.h> |
|
|
#include "extern.h" |
#include "extern.h" |
Line 1731 texicache(struct texi *p, const char *buf, size_t sz) |
|
Line 1730 texicache(struct texi *p, const char *buf, size_t sz) |
|
* We use the title set with @settitle for the `Nd' description |
* We use the title set with @settitle for the `Nd' description |
* and the source document filename (the first one as invoked on |
* and the source document filename (the first one as invoked on |
* the command line) for the title. |
* the command line) for the title. |
* The date is set to the current date. |
* The date is set to the modification time of the input. |
*/ |
*/ |
void |
void |
teximdocopen(struct texi *p, size_t *pos) |
teximdocopen(struct texi *p, size_t *pos) |
{ |
{ |
const char *cp; |
const char *cp; |
time_t t; |
|
char date[32]; |
|
|
|
t = time(NULL); |
|
strftime(date, sizeof(date), "%F", localtime(&t)); |
|
|
|
p->seenvs = -1; |
p->seenvs = -1; |
teximacroopen(p, "Dd"); |
teximacroopen(p, "Dd"); |
texiputchars(p, date); |
texiputchars(p, p->date); |
teximacroclose(p); |
teximacroclose(p); |
teximacroopen(p, "Dt"); |
teximacroopen(p, "Dt"); |
for (cp = p->title; '\0' != *cp; cp++) |
for (cp = p->title; '\0' != *cp; cp++) |