version 1.20, 2015/03/01 00:25:08 |
version 1.21, 2015/03/01 13:39:51 |
Line 472 texiexecmacro(struct texi *p, struct teximacro *m, siz |
|
Line 472 texiexecmacro(struct texi *p, struct teximacro *m, siz |
|
aasz = asz < m->argsz ? asz : m->argsz; |
aasz = asz < m->argsz ? asz : m->argsz; |
|
|
if (0 == aasz) { |
if (0 == aasz) { |
texisplice(p, m->value, valsz, pos); |
texisplice(p, m->value, valsz, *pos); |
return; |
return; |
} |
} |
|
|
Line 535 texiexecmacro(struct texi *p, struct teximacro *m, siz |
|
Line 535 texiexecmacro(struct texi *p, struct teximacro *m, siz |
|
i = end; |
i = end; |
} |
} |
|
|
texisplice(p, val, strlen(val), pos); |
texisplice(p, val, strlen(val), *pos); |
|
|
for (i = 0; i < asz; i++) |
for (i = 0; i < asz; i++) |
free(args[i]); |
free(args[i]); |
Line 927 parseeof(struct texi *p) |
|
Line 927 parseeof(struct texi *p) |
|
} |
} |
|
|
void |
void |
texisplice(struct texi *p, const char *buf, size_t sz, size_t *pos) |
texisplice(struct texi *p, const char *buf, size_t sz, size_t pos) |
{ |
{ |
char *cp; |
char *cp; |
struct texifile *f; |
struct texifile *f; |
Line 944 texisplice(struct texi *p, const char *buf, size_t sz, |
|
Line 944 texisplice(struct texi *p, const char *buf, size_t sz, |
|
} |
} |
|
|
f->insplice += sz; |
f->insplice += sz; |
memmove(f->map + *pos + sz, f->map + *pos, f->mapsz - *pos); |
memmove(f->map + pos + sz, f->map + pos, f->mapsz - pos); |
memcpy(f->map + *pos, buf, sz); |
memcpy(f->map + pos, buf, sz); |
f->mapsz += sz; |
f->mapsz += sz; |
} |
} |
|
|
Line 1405 teximdocclose(struct texi *p, int last) |
|
Line 1405 teximdocclose(struct texi *p, int last) |
|
* Otherwise just print the mdoc(7) prologue. |
* Otherwise just print the mdoc(7) prologue. |
*/ |
*/ |
void |
void |
teximdocopen(struct texi *p) |
teximdocopen(struct texi *p, size_t *pos) |
{ |
{ |
const char *cp; |
const char *cp; |
time_t t; |
time_t t; |
Line 1445 teximdocopen(struct texi *p) |
|
Line 1445 teximdocopen(struct texi *p) |
|
texiputchar(p, *cp); |
texiputchar(p, *cp); |
teximacroclose(p); |
teximacroclose(p); |
teximacroopen(p, "Nd"); |
teximacroopen(p, "Nd"); |
if (NULL != p->subtitle) |
/* |
for (cp = p->subtitle; '\0' != *cp; cp++) |
* The subtitle `Nd' can consist of arbitrary macros, so paste |
texiputchar(p, *cp); |
* it and parse to the end of the line. |
else |
*/ |
|
if (NULL != p->subtitle) { |
|
texisplice(p, p->subtitle, strlen(p->subtitle), *pos); |
|
parseeoln(p, pos); |
|
} else |
texiputchars(p, "Unknown description"); |
texiputchars(p, "Unknown description"); |
teximacroclose(p); |
teximacroclose(p); |
p->seenvs = 1; |
p->seenvs = 1; |