summaryrefslogtreecommitdiff
path: root/source/fitz/string.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-14 15:03:05 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-14 16:24:54 +0100
commit6273edc2e7179a4bd1a542de69871084e1f18daa (patch)
tree67a85b6760a68df2bff404107fc260dfefeb6b32 /source/fitz/string.c
parentd79f72365de5b27b31953f614eb35f8a18b91247 (diff)
downloadmupdf-6273edc2e7179a4bd1a542de69871084e1f18daa.tar.xz
Add scripts to remove/replace 'static' from functions.
Getting a backtrace out with missing functions makes the backtrace much less useful. Some backtrace routines (such as that used by Memento on Android) are incapable of resolving static functions. We therefore provide 2 scripts (scripts/destatic.sh and scripts/restatic.sh) that respectively remove and replace the 'static' from function definitions. The scripts do not affect "static inline" or "static const" definitions, and they are are restricted to working in the source directory (excluding source/tools), thirdparty/mujs and the platform/{java,android} directories. The transformed source should NOT be checked in. To avoid problems with clashing symbols, some functions are renamed or tweaked slightly in this patch.
Diffstat (limited to 'source/fitz/string.c')
-rw-r--r--source/fitz/string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/string.c b/source/fitz/string.c
index 2eb67d4f..e9d8b086 100644
--- a/source/fitz/string.c
+++ b/source/fitz/string.c
@@ -104,14 +104,14 @@ fz_dirname(char *dir, const char *path, size_t n)
dir[i+1] = 0;
}
-static int ishex(int a)
+static inline int ishex(int a)
{
return (a >= 'A' && a <= 'F') ||
(a >= 'a' && a <= 'f') ||
(a >= '0' && a <= '9');
}
-static int tohex(int c)
+static inline int tohex(int c)
{
if (c >= '0' && c <= '9') return c - '0';
if (c >= 'a' && c <= 'f') return c - 'a' + 0xA;