Mandoc patched and added for MIPSPro

master
Kazuo Kuroi 3 years ago
parent fa43114010
commit f29efd3d02
  1. 1
      mandoc/CREDITS
  2. 542
      mandoc/mandoc.patch
  3. BIN
      mandoc/mandoc.tar.gz

@ -0,0 +1 @@
Patches by Raion, assisted by jpstewart

@ -0,0 +1,542 @@
Only in mandoc-1.14.5-patched: Makefile.local
Only in mandoc-1.14.5-patched: arch.o
Only in mandoc-1.14.5-patched: att.o
Only in mandoc-1.14.5-patched: chars.o
Only in mandoc-1.14.5-patched: compat_err.o
Only in mandoc-1.14.5-patched: compat_fts.o
Only in mandoc-1.14.5-patched: compat_getline.o
Only in mandoc-1.14.5-patched: compat_getsubopt.o
Only in mandoc-1.14.5-patched: compat_isblank.o
Only in mandoc-1.14.5-patched: compat_mkdtemp.o
Only in mandoc-1.14.5-patched: compat_ohash.o
Only in mandoc-1.14.5-patched: compat_progname.o
Only in mandoc-1.14.5-patched: compat_reallocarray.o
Only in mandoc-1.14.5-patched: compat_recallocarray.o
Only in mandoc-1.14.5-patched: compat_strcasestr.o
Only in mandoc-1.14.5-patched: compat_stringlist.o
Only in mandoc-1.14.5-patched: compat_strlcat.o
Only in mandoc-1.14.5-patched: compat_strlcpy.o
Only in mandoc-1.14.5-patched: compat_strndup.o
Only in mandoc-1.14.5-patched: compat_strsep.o
Only in mandoc-1.14.5-patched: compat_strtonum.o
Only in mandoc-1.14.5-patched: compat_vasprintf.o
Only in mandoc-1.14.5-patched: config.h
Only in mandoc-1.14.5-patched: config.h.old
Only in mandoc-1.14.5-patched: config.log
Only in mandoc-1.14.5-patched: config.log.old
diff -urnp mandoc-1.14.5/configure mandoc-1.14.5-patched/configure
*** mandoc-1.14.5/configure Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/configure Sun May 31 16:30:00 2020
*************** OSENUM=
*** 41,48 ****
OSNAME=
UTF8_LOCALE=
! CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -`
! CFLAGS=
LDADD=
LDFLAGS=
LD_NANOSLEEP=
--- 41,48 ----
OSNAME=
UTF8_LOCALE=
! CC=c99
! CFLAGS='-O3 -mips3 '
LDADD=
LDFLAGS=
LD_NANOSLEEP=
Only in mandoc-1.14.5-patched: dba.o
Only in mandoc-1.14.5-patched: dba_array.o
Only in mandoc-1.14.5-patched: dba_read.o
Only in mandoc-1.14.5-patched: dba_write.o
Only in mandoc-1.14.5-patched: dbm.o
Only in mandoc-1.14.5-patched: dbm_map.o
Only in mandoc-1.14.5-patched: demandoc
Only in mandoc-1.14.5-patched: demandoc.o
Only in mandoc-1.14.5-patched: eqn.o
Only in mandoc-1.14.5-patched: eqn_html.o
Only in mandoc-1.14.5-patched: eqn_term.o
Only in mandoc-1.14.5-patched: html.o
Only in mandoc-1.14.5-patched: lib.o
Only in mandoc-1.14.5-patched: libmandoc.a
Only in mandoc-1.14.5-patched: main.o
Only in mandoc-1.14.5-patched: man.o
Only in mandoc-1.14.5-patched: man_html.o
Only in mandoc-1.14.5-patched: man_macro.o
Only in mandoc-1.14.5-patched: man_term.o
Only in mandoc-1.14.5-patched: man_validate.o
Only in mandoc-1.14.5-patched: mandoc
diff -urnp mandoc-1.14.5/mandoc.h mandoc-1.14.5-patched/mandoc.h
*** mandoc-1.14.5/mandoc.h Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/mandoc.h Sun May 31 16:25:43 2020
*************** enum mandocerr mandoc_msg_getmin(void)
*** 279,286 ****
void mandoc_msg_setmin(enum mandocerr);
enum mandoclevel mandoc_msg_getrc(void);
void mandoc_msg_setrc(enum mandoclevel);
! void mandoc_msg(enum mandocerr, int, int, const char *, ...)
! __attribute__((__format__ (__printf__, 4, 5)));
void mchars_alloc(void);
void mchars_free(void);
int mchars_num2char(const char *, size_t);
--- 279,285 ----
void mandoc_msg_setmin(enum mandocerr);
enum mandoclevel mandoc_msg_getrc(void);
void mandoc_msg_setrc(enum mandoclevel);
! void mandoc_msg(enum mandocerr, int, int, const char *, ...);
void mchars_alloc(void);
void mchars_free(void);
int mchars_num2char(const char *, size_t);
Only in mandoc-1.14.5-patched: mandoc.o
diff -urnp mandoc-1.14.5/mandoc_aux.h mandoc-1.14.5-patched/mandoc_aux.h
*** mandoc-1.14.5/mandoc_aux.h Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/mandoc_aux.h Sun May 31 16:33:09 2020
***************
*** 16,23 ****
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
! int mandoc_asprintf(char **, const char *, ...)
! __attribute__((__format__ (__printf__, 2, 3)));
void *mandoc_calloc(size_t, size_t);
void *mandoc_malloc(size_t);
void *mandoc_realloc(void *, size_t);
--- 16,22 ----
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
! int mandoc_asprintf(char **, const char *, ...);
void *mandoc_calloc(size_t, size_t);
void *mandoc_malloc(size_t);
void *mandoc_realloc(void *, size_t);
Only in mandoc-1.14.5-patched: mandoc_aux.o
Only in mandoc-1.14.5-patched: mandoc_msg.o
Only in mandoc-1.14.5-patched: mandoc_ohash.o
Only in mandoc-1.14.5-patched: mandoc_xr.o
Only in mandoc-1.14.5-patched: mandocdb.o
diff -urnp mandoc-1.14.5/manpath.c mandoc-1.14.5-patched/manpath.c
*** mandoc-1.14.5/manpath.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/manpath.c Mon Jun 1 19:40:42 2020
*************** manconf_output(struct manoutput *conf, c
*** 293,299 ****
return 0;
case 4:
if (conf->indent) {
! mandoc_asprintf(&oldval, "%zu", conf->indent);
break;
}
conf->indent = strtonum(cp, 0, 1000, &errstr);
--- 293,299 ----
return 0;
case 4:
if (conf->indent) {
! mandoc_asprintf(&oldval, "%u", conf->indent);
break;
}
conf->indent = strtonum(cp, 0, 1000, &errstr);
*************** manconf_output(struct manoutput *conf, c
*** 303,309 ****
return -1;
case 5:
if (conf->width) {
! mandoc_asprintf(&oldval, "%zu", conf->width);
break;
}
conf->width = strtonum(cp, 1, 1000, &errstr);
--- 303,309 ----
return -1;
case 5:
if (conf->width) {
! mandoc_asprintf(&oldval, "%u", conf->width);
break;
}
conf->width = strtonum(cp, 1, 1000, &errstr);
Only in mandoc-1.14.5-patched: manpath.o
Only in mandoc-1.14.5-patched: mansearch.o
Only in mandoc-1.14.5-patched: mdoc.o
Only in mandoc-1.14.5-patched: mdoc_argv.o
Only in mandoc-1.14.5-patched: mdoc_html.o
Only in mandoc-1.14.5-patched: mdoc_macro.o
Only in mandoc-1.14.5-patched: mdoc_man.o
Only in mandoc-1.14.5-patched: mdoc_markdown.o
Only in mandoc-1.14.5-patched: mdoc_state.o
Only in mandoc-1.14.5-patched: mdoc_term.o
diff -urnp mandoc-1.14.5/mdoc_validate.c mandoc-1.14.5-patched/mdoc_validate.c
*** mandoc-1.14.5/mdoc_validate.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/mdoc_validate.c Mon Jun 1 19:41:06 2020
*************** rewrite_macro2len(struct roff_man *mdoc,
*** 1648,1654 ****
width = macro2len(tok);
free(*arg);
! mandoc_asprintf(arg, "%zun", width);
}
static void
--- 1648,1654 ----
width = macro2len(tok);
free(*arg);
! mandoc_asprintf(arg, "%un", width);
}
static void
Only in mandoc-1.14.5-patched: mdoc_validate.o
Only in mandoc-1.14.5-patched: msec.o
Only in mandoc-1.14.5-patched: out.o
Only in mandoc-1.14.5-patched: preconv.o
Only in mandoc-1.14.5-patched: read.o
Only in mandoc-1.14.5-patched: roff.o
Only in mandoc-1.14.5-patched: roff_html.o
Only in mandoc-1.14.5-patched: roff_term.o
Only in mandoc-1.14.5-patched: roff_validate.o
Only in mandoc-1.14.5-patched: soelim
Only in mandoc-1.14.5-patched: soelim.o
Only in mandoc-1.14.5-patched: st.o
diff -urnp mandoc-1.14.5/tag.c mandoc-1.14.5-patched/tag.c
*** mandoc-1.14.5/tag.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/tag.c Mon Jun 1 19:44:50 2020
*************** tag_write(void)
*** 229,235 ****
while (entry != NULL) {
if (stream != NULL && entry->prio >= 0)
for (i = 0; i < entry->nlines; i++)
! fprintf(stream, "%s %s %zu\n",
entry->s, tag_files.ofn, entry->lines[i]);
free(entry->lines);
free(entry);
--- 229,235 ----
while (entry != NULL) {
if (stream != NULL && entry->prio >= 0)
for (i = 0; i < entry->nlines; i++)
! fprintf(stream, "%s %s %u\n",
entry->s, tag_files.ofn, entry->lines[i]);
free(entry->lines);
free(entry);
Only in mandoc-1.14.5-patched: tag.o
Only in mandoc-1.14.5-patched: tbl.o
Only in mandoc-1.14.5-patched: tbl_data.o
Only in mandoc-1.14.5-patched: tbl_html.o
Only in mandoc-1.14.5-patched: tbl_layout.o
Only in mandoc-1.14.5-patched: tbl_opts.o
Only in mandoc-1.14.5-patched: tbl_term.o
Only in mandoc-1.14.5-patched: term.o
Only in mandoc-1.14.5-patched: term_ascii.o
diff -urnp mandoc-1.14.5/term_ps.c mandoc-1.14.5-patched/term_ps.c
*** mandoc-1.14.5/term_ps.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/term_ps.c Mon Jun 1 19:47:10 2020
*************** pdf_obj(struct termp *p, size_t obj)
*** 723,729 ****
}
p->ps->pdfobjs[(int)obj - 1] = p->ps->pdfbytes;
! ps_printf(p, "%zu 0 obj\n", obj);
}
static void
--- 723,729 ----
}
p->ps->pdfobjs[(int)obj - 1] = p->ps->pdfbytes;
! ps_printf(p, "%u 0 obj\n", obj);
}
static void
*************** ps_closepage(struct termp *p)
*** 750,756 ****
/* Length of content. */
pdf_obj(p, base + 1);
! ps_printf(p, "%zu\nendobj\n", len);
/* Resource for content. */
pdf_obj(p, base + 2);
--- 750,756 ----
/* Length of content. */
pdf_obj(p, base + 1);
! ps_printf(p, "%u\nendobj\n", len);
/* Resource for content. */
pdf_obj(p, base + 2);
*************** ps_closepage(struct termp *p)
*** 765,772 ****
ps_printf(p, "<<\n");
ps_printf(p, "/Type /Page\n");
ps_printf(p, "/Parent 2 0 R\n");
! ps_printf(p, "/Resources %zu 0 R\n", base + 2);
! ps_printf(p, "/Contents %zu 0 R\n", base);
ps_printf(p, ">>\nendobj\n");
} else
ps_printf(p, "showpage\n");
--- 765,772 ----
ps_printf(p, "<<\n");
ps_printf(p, "/Type /Page\n");
ps_printf(p, "/Parent 2 0 R\n");
! ps_printf(p, "/Resources %u 0 R\n", base + 2);
! ps_printf(p, "/Contents %u 0 R\n", base);
ps_printf(p, ">>\nendobj\n");
} else
ps_printf(p, "showpage\n");
*************** ps_end(struct termp *p)
*** 799,805 ****
if (TERMTYPE_PS == p->type) {
ps_printf(p, "%%%%Trailer\n");
! ps_printf(p, "%%%%Pages: %zu\n", p->ps->pages);
ps_printf(p, "%%%%EOF\n");
return;
}
--- 799,805 ----
if (TERMTYPE_PS == p->type) {
ps_printf(p, "%%%%Trailer\n");
! ps_printf(p, "%%%%Pages: %u\n", p->ps->pages);
ps_printf(p, "%%%%EOF\n");
return;
}
*************** ps_end(struct termp *p)
*** 806,820 ****
pdf_obj(p, 2);
ps_printf(p, "<<\n/Type /Pages\n");
! ps_printf(p, "/MediaBox [0 0 %zu %zu]\n",
(size_t)AFM2PNT(p, p->ps->width),
(size_t)AFM2PNT(p, p->ps->height));
! ps_printf(p, "/Count %zu\n", p->ps->pages);
ps_printf(p, "/Kids [");
for (i = 0; i < p->ps->pages; i++)
! ps_printf(p, " %zu 0 R", i * 4 + p->ps->pdfbody + 3);
base = (p->ps->pages - 1) * 4 + p->ps->pdfbody + 4;
--- 806,820 ----
pdf_obj(p, 2);
ps_printf(p, "<<\n/Type /Pages\n");
! ps_printf(p, "/MediaBox [0 0 %u %u]\n",
(size_t)AFM2PNT(p, p->ps->width),
(size_t)AFM2PNT(p, p->ps->height));
! ps_printf(p, "/Count %u\n", p->ps->pages);
ps_printf(p, "/Kids [");
for (i = 0; i < p->ps->pages; i++)
! ps_printf(p, " %u 0 R", i * 4 + p->ps->pdfbody + 3);
base = (p->ps->pages - 1) * 4 + p->ps->pdfbody + 4;
*************** ps_end(struct termp *p)
*** 826,846 ****
ps_printf(p, ">>\nendobj\n");
xref = p->ps->pdfbytes;
ps_printf(p, "xref\n");
! ps_printf(p, "0 %zu\n", base + 1);
ps_printf(p, "0000000000 65535 f \n");
for (i = 0; i < base; i++)
! ps_printf(p, "%.10zu 00000 n \n",
p->ps->pdfobjs[(int)i]);
ps_printf(p, "trailer\n");
ps_printf(p, "<<\n");
! ps_printf(p, "/Size %zu\n", base + 1);
! ps_printf(p, "/Root %zu 0 R\n", base);
ps_printf(p, "/Info 1 0 R\n");
ps_printf(p, ">>\n");
ps_printf(p, "startxref\n");
! ps_printf(p, "%zu\n", xref);
ps_printf(p, "%%%%EOF\n");
}
--- 826,846 ----
ps_printf(p, ">>\nendobj\n");
xref = p->ps->pdfbytes;
ps_printf(p, "xref\n");
! ps_printf(p, "0 %u\n", base + 1);
ps_printf(p, "0000000000 65535 f \n");
for (i = 0; i < base; i++)
! ps_printf(p, "%.10u 00000 n \n",
p->ps->pdfobjs[(int)i]);
ps_printf(p, "trailer\n");
ps_printf(p, "<<\n");
! ps_printf(p, "/Size %u\n", base + 1);
! ps_printf(p, "/Root %u 0 R\n", base);
ps_printf(p, "/Info 1 0 R\n");
ps_printf(p, ">>\n");
ps_printf(p, "startxref\n");
! ps_printf(p, "%u\n", xref);
ps_printf(p, "%%%%EOF\n");
}
*************** ps_begin(struct termp *p)
*** 898,904 ****
ps_printf(p, "%%%%Orientation: Portrait\n");
ps_printf(p, "%%%%Pages: (atend)\n");
ps_printf(p, "%%%%PageOrder: Ascend\n");
! ps_printf(p, "%%%%DocumentMedia: man-%s %zu %zu 0 () ()\n",
p->ps->medianame, width, height);
ps_printf(p, "%%%%DocumentNeededResources: font");
--- 898,904 ----
ps_printf(p, "%%%%Orientation: Portrait\n");
ps_printf(p, "%%%%Pages: (atend)\n");
ps_printf(p, "%%%%PageOrder: Ascend\n");
! ps_printf(p, "%%%%DocumentMedia: man-%s %u %u 0 () ()\n",
p->ps->medianame, width, height);
ps_printf(p, "%%%%DocumentNeededResources: font");
*************** ps_begin(struct termp *p)
*** 912,918 ****
ps_printf(p, "%%%%BeginResource: procset MandocProcs "
"10170 10170\n");
/* The font size is effectively hard-coded for now. */
! ps_printf(p, "/fs %zu def\n", p->ps->scale);
for (i = 0; i < (int)TERMFONT__MAX; i++)
ps_printf(p, "/f%d { /%s fs selectfont } def\n",
i, fonts[i].name);
--- 912,918 ----
ps_printf(p, "%%%%BeginResource: procset MandocProcs "
"10170 10170\n");
/* The font size is effectively hard-coded for now. */
! ps_printf(p, "/fs %u def\n", p->ps->scale);
for (i = 0; i < (int)TERMFONT__MAX; i++)
ps_printf(p, "/f%d { /%s fs selectfont } def\n",
i, fonts[i].name);
*************** ps_begin(struct termp *p)
*** 924,930 ****
ps_printf(p, "%%%%BeginSetup\n");
ps_printf(p, "%%%%BeginFeature: *PageSize %s\n",
p->ps->medianame);
! ps_printf(p, "<</PageSize [%zu %zu]>>setpagedevice\n",
width, height);
ps_printf(p, "%%%%EndFeature\n");
ps_printf(p, "%%%%EndSetup\n");
--- 924,930 ----
ps_printf(p, "%%%%BeginSetup\n");
ps_printf(p, "%%%%BeginFeature: *PageSize %s\n",
p->ps->medianame);
! ps_printf(p, "<</PageSize [%u %u]>>setpagedevice\n",
width, height);
ps_printf(p, "%%%%EndFeature\n");
ps_printf(p, "%%%%EndSetup\n");
*************** ps_pletter(struct termp *p, int c)
*** 965,971 ****
if (PS_NEWPAGE & p->ps->flags) {
if (TERMTYPE_PS == p->type) {
! ps_printf(p, "%%%%Page: %zu %zu\n",
p->ps->pages + 1, p->ps->pages + 1);
ps_printf(p, "f%d\n", (int)p->ps->lastf);
} else {
--- 965,971 ----
if (PS_NEWPAGE & p->ps->flags) {
if (TERMTYPE_PS == p->type) {
! ps_printf(p, "%%%%Page: %u %u\n",
p->ps->pages + 1, p->ps->pages + 1);
ps_printf(p, "f%d\n", (int)p->ps->lastf);
} else {
*************** ps_pletter(struct termp *p, int c)
*** 972,978 ****
pdf_obj(p, p->ps->pdfbody +
p->ps->pages * 4);
ps_printf(p, "<<\n");
! ps_printf(p, "/Length %zu 0 R\n",
p->ps->pdfbody + 1 + p->ps->pages * 4);
ps_printf(p, ">>\nstream\n");
}
--- 972,978 ----
pdf_obj(p, p->ps->pdfbody +
p->ps->pages * 4);
ps_printf(p, "<<\n");
! ps_printf(p, "/Length %u 0 R\n",
p->ps->pdfbody + 1 + p->ps->pages * 4);
ps_printf(p, ">>\nstream\n");
}
*************** ps_pletter(struct termp *p, int c)
*** 987,993 ****
if ( ! (PS_INLINE & p->ps->flags)) {
if (TERMTYPE_PS != p->type) {
! ps_printf(p, "BT\n/F%d %zu Tf\n",
(int)p->ps->lastf, p->ps->scale);
ps_printf(p, "%.3f %.3f Td\n(",
AFM2PNT(p, p->ps->pscol),
--- 987,993 ----
if ( ! (PS_INLINE & p->ps->flags)) {
if (TERMTYPE_PS != p->type) {
! ps_printf(p, "BT\n/F%d %u Tf\n",
(int)p->ps->lastf, p->ps->scale);
ps_printf(p, "%.3f %.3f Td\n(",
AFM2PNT(p, p->ps->pscol),
*************** ps_setfont(struct termp *p, enum termfon
*** 1274,1280 ****
if (TERMTYPE_PS == p->type)
ps_printf(p, "f%d\n", (int)f);
else
! ps_printf(p, "/F%d %zu Tf\n",
(int)f, p->ps->scale);
}
--- 1274,1280 ----
if (TERMTYPE_PS == p->type)
ps_printf(p, "f%d\n", (int)f);
else
! ps_printf(p, "/F%d %u Tf\n",
(int)f, p->ps->scale);
}
Only in mandoc-1.14.5-patched: term_ps.o
Only in mandoc-1.14.5-patched: term_tab.o
diff -urnp mandoc-1.14.5/test-wchar.c mandoc-1.14.5-patched/test-wchar.c
*** mandoc-1.14.5/test-wchar.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/test-wchar.c Mon Jun 1 19:47:48 2020
*************** main(void)
*** 38,44 ****
}
if (sizeof(wchar_t) < 4) {
! fprintf(stderr, "wchar_t is only %zu bytes\n",
sizeof(wchar_t));
return 1;
}
--- 38,44 ----
}
if (sizeof(wchar_t) < 4) {
! fprintf(stderr, "wchar_t is only %u bytes\n",
sizeof(wchar_t));
return 1;
}
diff -urnp mandoc-1.14.5/tree.c mandoc-1.14.5-patched/tree.c
*** mandoc-1.14.5/tree.c Sun Mar 10 05:56:43 2019
--- mandoc-1.14.5-patched/tree.c Mon Jun 1 19:47:36 2020
*************** print_box(const struct eqn_box *ep, int
*** 364,372 ****
if (ep->size != EQN_DEFSIZE)
printf(" size=%d", ep->size);
if (ep->expectargs != UINT_MAX && ep->expectargs != ep->args)
! printf(" badargs=%zu(%zu)", ep->args, ep->expectargs);
else if (ep->args)
! printf(" args=%zu", ep->args);
putchar('\n');
print_box(ep->first, indent + 4);
--- 364,372 ----
if (ep->size != EQN_DEFSIZE)
printf(" size=%d", ep->size);
if (ep->expectargs != UINT_MAX && ep->expectargs != ep->args)
! printf(" badargs=%u(%u)", ep->args, ep->expectargs);
else if (ep->args)
! printf(" args=%u", ep->args);
putchar('\n');
print_box(ep->first, indent + 4);
Only in mandoc-1.14.5-patched: tree.o

Binary file not shown.
Loading…
Cancel
Save