2019-01-02 10:34:52 +01:00
|
|
|
From 2ba61d7e191d753ce9f8bfeed1dacf0922ff8a1f Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
|
|
Date: Sat, 22 Dec 2018 00:42:23 +0100
|
|
|
|
Subject: [PATCH] std::string
|
|
|
|
|
|
|
|
---
|
2019-05-10 16:09:22 +02:00
|
|
|
texk/web2c/pdftexdir/pdftoepdf.cc | 6 +++---
|
|
|
|
texk/web2c/pdftexdir/pdftosrc.cc | 6 +++---
|
|
|
|
2 files changed, 6 insertions(+), 6 deletions(-)
|
2019-01-02 10:34:52 +01:00
|
|
|
|
|
|
|
diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
|
|
index d26ac61..7c14570 100644
|
|
|
|
--- a/texk/web2c/pdftexdir/pdftoepdf.cc
|
|
|
|
+++ b/texk/web2c/pdftexdir/pdftoepdf.cc
|
2019-05-10 16:09:22 +02:00
|
|
|
@@ -437,7 +437,7 @@ static void copyFont(const char *tag, Ob
|
|
|
|
fd = epdf_create_fontdescriptor(fontmap, zround(stemV->getNum()));
|
|
|
|
if (fontdesc->dictLookup("CharSet", &charset) &&
|
|
|
|
charset->isString() && is_subsetable(fontmap))
|
|
|
|
- epdf_mark_glyphs(fd, charset->getString()->getCString());
|
|
|
|
+ epdf_mark_glyphs(fd, charset->getString()->c_str());
|
2019-01-02 10:34:52 +01:00
|
|
|
else
|
|
|
|
embed_whole_font(fd);
|
2019-05-10 16:09:22 +02:00
|
|
|
addFontDesc(fontdescRef->getRef(), fd);
|
|
|
|
@@ -576,7 +576,7 @@ static void copyObject(Object * obj)
|
2019-01-02 10:34:52 +01:00
|
|
|
pdf_printf("%s", convertNumToPDF(obj->getNum()));
|
|
|
|
} else if (obj->isString()) {
|
|
|
|
s = obj->getString();
|
|
|
|
- p = s->getCString();
|
|
|
|
+ p = s->c_str();
|
|
|
|
l = s->getLength();
|
|
|
|
if (strlen(p) == (unsigned int) l) {
|
|
|
|
pdf_puts("(");
|
|
|
|
diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc
|
|
|
|
index 7dbee00..cc44daf 100644
|
|
|
|
--- a/texk/web2c/pdftexdir/pdftosrc.cc
|
|
|
|
+++ b/texk/web2c/pdftexdir/pdftosrc.cc
|
2019-05-10 16:09:22 +02:00
|
|
|
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
2019-01-02 10:34:52 +01:00
|
|
|
fprintf(stderr, "No SourceName found\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
2019-05-10 16:09:22 +02:00
|
|
|
- outname = (char *)srcName.getString()->getCString();
|
|
|
|
+ outname = (char *)srcName.getString()->c_str();
|
2019-01-02 10:34:52 +01:00
|
|
|
// We cannot free srcName, as objname shares its string.
|
|
|
|
// srcName.free();
|
|
|
|
} else if (objnum > 0) {
|
2019-05-10 16:09:22 +02:00
|
|
|
@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
|
2019-01-02 10:34:52 +01:00
|
|
|
fprintf(stderr, "Not a Stream object\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
- sprintf(buf, "%s", fileName->getCString());
|
|
|
|
+ sprintf(buf, "%s", fileName->c_str());
|
|
|
|
if ((p = strrchr(buf, '.')) == 0)
|
|
|
|
p = strchr(buf, 0);
|
|
|
|
if (objgen == 0)
|
2019-05-10 16:09:22 +02:00
|
|
|
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
|
2019-01-02 10:34:52 +01:00
|
|
|
outname = buf;
|
|
|
|
} else { // objnum < 0 means we are extracting the XRef table
|
|
|
|
extract_xref_table = true;
|
|
|
|
- sprintf(buf, "%s", fileName->getCString());
|
|
|
|
+ sprintf(buf, "%s", fileName->c_str());
|
|
|
|
if ((p = strrchr(buf, '.')) == 0)
|
|
|
|
p = strchr(buf, 0);
|
|
|
|
sprintf(p, ".xref");
|
|
|
|
--
|
|
|
|
2.20.1
|
|
|
|
|