From 7aac8dc8533347e21311b15186e0af82f1b22fd6 Mon Sep 17 00:00:00 2001 From: Martin Kretzschmar Date: Wed, 18 Sep 2002 20:32:18 +0000 Subject: Synched with Xpdf 0.92 this adds "decryption" support testing this code after six weeks immediately gives me segfaults (image drawing) :-O must have fixed that later without knowing :-O --- (limited to 'pdf/goo/GString.h') diff --git a/pdf/goo/GString.h b/pdf/goo/GString.h index 6fa24a6..4c3b95f 100644 --- a/pdf/goo/GString.h +++ b/pdf/goo/GString.h @@ -37,6 +37,9 @@ public: // Concatenate two strings. GString(GString *str1, GString *str2); + // Convert an integer to a string. + static GString *fromInt(int x); + // Destructor. ~GString(); @@ -58,14 +61,14 @@ public: // Append a character or string. GString *append(char c); GString *append(GString *str); - GString *append(char *str); - GString *append(char *str, int length1); + GString *append(const char *str); + GString *append(const char *str, int length1); // Insert a character or string. GString *insert(int i, char c); GString *insert(int i, GString *str); - GString *insert(int i, char *str); - GString *insert(int i, char *str, int length1); + GString *insert(int i, const char *str); + GString *insert(int i, const char *str, int length1); // Delete a character or range of characters. GString *del(int i, int n = 1); @@ -78,8 +81,8 @@ public: // These functions assume the strings do not contain null characters. int cmp(GString *str) { return strcmp(s, str->getCString()); } int cmpN(GString *str, int n) { return strncmp(s, str->getCString(), n); } - int cmp(char *s1) { return strcmp(s, s1); } - int cmpN(char *s1, int n) { return strncmp(s, s1, n); } + int cmp(const char *s1) { return strcmp(s, s1); } + int cmpN(const char *s1, int n) { return strncmp(s, s1, n); } private: -- cgit v0.9.1