--- texk/web2c/pdftexdir/epdf.c | 2 - texk/web2c/pdftexdir/mapfile.c | 2 - texk/web2c/pdftexdir/pdftex-common.h | 6 ++--- texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc | 28 ++++++++++++------------ texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc | 28 ++++++++++++------------ texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc | 22 +++++++++--------- texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc | 22 +++++++++--------- texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc | 22 +++++++++--------- texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc | 22 +++++++++--------- texk/web2c/pdftexdir/pdftosrc-newpoppler.cc | 2 - texk/web2c/pdftexdir/writeenc.c | 2 - 11 files changed, 79 insertions(+), 79 deletions(-) Index: texk/web2c/pdftexdir/pdftosrc.cc =================================================================== --- texk/web2c/pdftexdir/pdftosrc-newpoppler.cc +++ texk/web2c/pdftexdir/pdftosrc-newpoppler.cc @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) Stream *s; Object srcStream, srcName, catalogDict; FILE *outfile; - char *outname; + const char *outname = NULL; int objnum = 0, objgen = 0; bool extract_xref_table = false; int c; --- texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc 2019-05-13 08:37:11.562085046 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -683,7 +683,7 @@ static void writeEncodings() } // get the pagebox according to the pagebox_spec -static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) +static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) { if (pagebox_spec == pdfboxspecmedia) return page->getMediaBox(); @@ -715,7 +715,7 @@ read_pdf_info(char *image_name, char *pa { PdfDocument *pdf_doc; Page *page; - PDFRectangle *pagebox; + const PDFRectangle *pagebox; #ifdef POPPLER_VERSION int pdf_major_version_found, pdf_minor_version_found; #else @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; @@ -849,7 +849,7 @@ void write_epdf(void) pageObj = xref->fetch(pageRef->num, pageRef->gen); pageDict = pageObj.getDict(); rotate = page->getRotate(); - PDFRectangle *pagebox; + const PDFRectangle *pagebox; // write the Page header pdf_puts("/Type /XObject\n"); pdf_puts("/Subtype /Form\n"); --- texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc 2019-05-13 08:37:19.877927300 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -683,7 +683,7 @@ static void writeEncodings() } // get the pagebox according to the pagebox_spec -static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) +static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec) { if (pagebox_spec == pdfboxspecmedia) return page->getMediaBox(); @@ -715,7 +715,7 @@ read_pdf_info(char *image_name, char *pa { PdfDocument *pdf_doc; Page *page; - PDFRectangle *pagebox; + const PDFRectangle *pagebox; #ifdef POPPLER_VERSION int pdf_major_version_found, pdf_minor_version_found; #else @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; @@ -849,7 +849,7 @@ void write_epdf(void) pageObj = xref->fetch(pageRef->num, pageRef->gen); pageDict = pageObj.getDict(); rotate = page->getRotate(); - PDFRectangle *pagebox; + const PDFRectangle *pagebox; // write the Page header pdf_puts("/Type /XObject\n"); pdf_puts("/Subtype /Form\n"); --- texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc 2019-05-13 08:37:25.761815685 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; --- texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc 2019-05-13 08:38:42.464360579 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; --- texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc 2019-05-13 08:38:55.432114555 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; --- texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc +++ texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc 2019-05-13 08:39:36.183341391 +0000 @@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); -static void copyName(char *s) +static void copyName(const char *s) { pdf_puts("/"); for (; *s != 0; s++) { @@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { Object obj1; copyName((char *)obj->dictGetKey(i)); @@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } -static void copyDict(Object * obj) +static void copyDict(const Object * obj) { int i, l; if (!obj->isDict()) @@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } -static void copyFontDict(Object * obj, InObj * r) +static void copyFontDict(const Object * obj, InObj * r) { int i, l; - char *key; + const char *key; if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); @@ -382,7 +382,7 @@ static bool embeddableFont(Object * font return false; } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, stemV; @@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } -static void copyOtherResources(Object * obj, char *key) +static void copyOtherResources(Object * obj, const char *key) { // copies all other resources (write_epdf handles Fonts and ProcSets), @@ -554,8 +554,8 @@ static void copyObject(Object * obj) Object obj1; int i, l, c; Ref ref; - char *p; - GString *s; + const char *p; + const GString *s; if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { @@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; - char *glyphNames[256], *s; + const char *glyphNames[256], *s; int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { @@ -822,7 +822,7 @@ void write_epdf(void) Object groupDict; bool writeSepGroup = false; Object info; - char *key; + const char *key; char s[256]; int i, l; int rotate; Index: texk/web2c/pdftexdir/epdf.c =================================================================== --- texk/web2c/pdftexdir/epdf.c +++ texk/web2c/pdftexdir/epdf.c @@ -73,7 +73,7 @@ int get_fn_objnum(fd_entry * fd) #define Isgenericspace(c) (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f') -void epdf_mark_glyphs(fd_entry * fd, char *charset) +void epdf_mark_glyphs(fd_entry * fd, const char *charset) { char *p, *q, *s; char *glyph; Index: texk/web2c/pdftexdir/mapfile.c =================================================================== --- texk/web2c/pdftexdir/mapfile.c +++ texk/web2c/pdftexdir/mapfile.c @@ -682,7 +682,7 @@ static boolean fm_valid_for_font_replace * used for Type1 font replacement when embedding of PDF files */ -fm_entry *lookup_fontmap(char *ps_name) +fm_entry *lookup_fontmap(const char *ps_name) { fm_entry *fm, *fm2, tmp; char *a, *b, *c, *d, *e, *s; Index: texk/web2c/pdftexdir/pdftex-common.h =================================================================== --- texk/web2c/pdftexdir/pdftex-common.h +++ texk/web2c/pdftexdir/pdftex-common.h @@ -67,7 +67,7 @@ extern void zpdfbeginobj(integer, intege extern void embed_whole_font(fd_entry *); extern fd_entry *epdf_create_fontdescriptor(fm_entry *, int); extern void epdf_free(void); -extern void epdf_mark_glyphs(fd_entry *, char *); +extern void epdf_mark_glyphs(fd_entry *, const char *); extern int get_fd_objnum(fd_entry *); extern int get_fn_objnum(fd_entry *); extern int is_subsetable(fm_entry *); @@ -76,7 +76,7 @@ extern int is_subsetable(fm_entry *); extern char notdef[]; /* mapfile.c */ -extern fm_entry *lookup_fontmap(char *); +extern fm_entry *lookup_fontmap(const char *); #undef fd_entry #undef fm_entry @@ -101,7 +101,7 @@ extern void tex_printf(const char *, ...); extern void write_epdf(void); /* writeenc.c */ -extern void epdf_write_enc(char **, int); +extern void epdf_write_enc(const char **, int); /* writeimg.c */ extern float epdf_width; Index: texk/web2c/pdftexdir/writeenc.c =================================================================== --- texk/web2c/pdftexdir/writeenc.c +++ texk/web2c/pdftexdir/writeenc.c @@ -83,7 +83,7 @@ fe_entry *get_fe_entry(char *s) /**********************************************************************/ -void epdf_write_enc(char **glyph_names, int fe_objnum) +void epdf_write_enc(const char **glyph_names, int fe_objnum) { int i, i_old; assert(glyph_names != NULL);