summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-09-23 13:35:45 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-09-23 13:35:45 +0200
commit5c54abedbc15d373109b23bf61c4e229d9c0cd9f (patch)
tree40fff32f0241dfb73fc2741b75cc2863522e7be2 /fofi
parent70575ed3c0286cda0e288d2aff2b4c2b0e0c640a (diff)
FoFiType1C: more const
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiType1C.cc22
-rw-r--r--fofi/FoFiType1C.h18
2 files changed, 20 insertions, 20 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 52f9f5bb..d6a241d1 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -47,7 +47,7 @@ static char hexChars[17] = "0123456789ABCDEF";
// FoFiType1C
//------------------------------------------------------------------------
-FoFiType1C *FoFiType1C::make(char *fileA, int lenA) {
+FoFiType1C *FoFiType1C::make(const char *fileA, int lenA) {
FoFiType1C *ff;
ff = new FoFiType1C(fileA, lenA, gFalse);
@@ -74,7 +74,7 @@ FoFiType1C *FoFiType1C::load(const char *fileName) {
return ff;
}
-FoFiType1C::FoFiType1C(char *fileA, int lenA, GBool freeFileDataA):
+FoFiType1C::FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA):
FoFiBase(fileA, lenA, freeFileDataA)
{
name = nullptr;
@@ -1851,7 +1851,7 @@ void FoFiType1C::cvtGlyphWidth(GBool useOp, GooString *charBuf,
charBuf->append((char)13);
}
-void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) {
+void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) const {
Guchar buf[12];
int y, n;
@@ -1902,7 +1902,7 @@ void FoFiType1C::cvtNum(double x, GBool isFP, GooString *charBuf) {
charBuf->append((char *)buf, n);
}
-void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) {
+void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) const {
Guchar *p;
Guchar x;
@@ -1924,7 +1924,7 @@ void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) {
}
void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb,
- Guchar *s, int n) {
+ const Guchar *s, int n) const {
Guchar x;
int i;
@@ -1946,10 +1946,10 @@ void FoFiType1C::eexecWriteCharstring(Type1CEexecBuf *eb,
}
}
-void FoFiType1C::writePSString(char *s, FoFiOutputFunc outputFunc,
- void *outputStream) {
+void FoFiType1C::writePSString(const char *s, FoFiOutputFunc outputFunc,
+ void *outputStream) const {
char buf[80];
- char *p;
+ const char *p;
int i, c;
i = 0;
@@ -2664,7 +2664,7 @@ int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) {
}
// Convert the delta-encoded ops array to an array of ints.
-int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) {
+int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) const {
int x;
int n, i;
@@ -2687,7 +2687,7 @@ int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) {
}
// Convert the delta-encoded ops array to an array of doubles.
-int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) {
+int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) const {
double x;
int n, i;
@@ -2702,7 +2702,7 @@ int FoFiType1C::getDeltaFPArray(double *arr, int maxLen) {
return n;
}
-void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) {
+void FoFiType1C::getIndex(int pos, Type1CIndex *idx, GBool *ok) const {
idx->pos = pos;
idx->len = getU16BE(pos, ok);
if (idx->len == 0) {
diff --git a/fofi/FoFiType1C.h b/fofi/FoFiType1C.h
index 58e2b9a2..6f2c696f 100644
--- a/fofi/FoFiType1C.h
+++ b/fofi/FoFiType1C.h
@@ -149,7 +149,7 @@ class FoFiType1C: public FoFiBase {
public:
// Create a FoFiType1C object from a memory buffer.
- static FoFiType1C *make(char *fileA, int lenA);
+ static FoFiType1C *make(const char *fileA, int lenA);
// Create a FoFiType1C object from a file on disk.
static FoFiType1C *load(const char *fileName);
@@ -208,7 +208,7 @@ public:
private:
- FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
+ FoFiType1C(const char *fileA, int lenA, GBool freeFileDataA);
void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName,
int offset, int nBytes,
Type1CIndex *subrIdx,
@@ -218,10 +218,10 @@ private:
GBool top);
void cvtGlyphWidth(GBool useOp, GooString *charBuf,
Type1CPrivateDict *pDict);
- void cvtNum(double x, GBool isFP, GooString *charBuf);
- void eexecWrite(Type1CEexecBuf *eb, const char *s);
- void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n);
- void writePSString(char *s, FoFiOutputFunc outputFunc, void *outputStream);
+ void cvtNum(double x, GBool isFP, GooString *charBuf) const;
+ void eexecWrite(Type1CEexecBuf *eb, const char *s) const;
+ void eexecWriteCharstring(Type1CEexecBuf *eb, const Guchar *s, int n) const;
+ void writePSString(const char *s, FoFiOutputFunc outputFunc, void *outputStream) const;
GBool parse();
void readTopDict();
void readFD(int offset, int length, Type1CPrivateDict *pDict);
@@ -230,9 +230,9 @@ private:
void buildEncoding();
GBool readCharset();
int getOp(int pos, GBool charstring, GBool *ok);
- int getDeltaIntArray(int *arr, int maxLen);
- int getDeltaFPArray(double *arr, int maxLen);
- void getIndex(int pos, Type1CIndex *idx, GBool *ok);
+ int getDeltaIntArray(int *arr, int maxLen) const;
+ int getDeltaFPArray(double *arr, int maxLen) const;
+ void getIndex(int pos, Type1CIndex *idx, GBool *ok) const;
void getIndexVal(const Type1CIndex *idx, int i, Type1CIndexVal *val, GBool *ok) const;
char *getString(int sid, char *buf, GBool *ok) const;