diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-04-11 17:07:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-04-11 17:07:59 +0200 |
commit | 914285f775944ea54ca708741eb58d020e2b1976 (patch) | |
tree | 219ee8fe1f05823ce06105cac02e62c9ebf9d887 /fitz | |
parent | 08251cb7666032cd610ee4bc9e34dd486f226a7a (diff) | |
download | mupdf-914285f775944ea54ca708741eb58d020e2b1976.tar.xz |
Revert to using fitz string functions instead of non-standard libc variants.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/filt_dctd.c | 2 | ||||
-rw-r--r-- | fitz/fitz_base.h | 7 | ||||
-rw-r--r-- | fitz/res_font.c | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/fitz/filt_dctd.c b/fitz/filt_dctd.c index 3018218a..b10a321e 100644 --- a/fitz/filt_dctd.c +++ b/fitz/filt_dctd.c @@ -17,7 +17,7 @@ static void myerrexit(j_common_ptr cinfo) struct myerrmgr *err = (struct myerrmgr *)cinfo->err; char msgbuf[JMSG_LENGTH_MAX]; err->super.format_message(cinfo, msgbuf); - strlcpy(err->msg, msgbuf, sizeof err->msg); + fz_strlcpy(err->msg, msgbuf, sizeof err->msg); longjmp(err->jb, 1); } diff --git a/fitz/fitz_base.h b/fitz/fitz_base.h index 52a93f0c..6e6bc294 100644 --- a/fitz/fitz_base.h +++ b/fitz/fitz_base.h @@ -39,13 +39,6 @@ extern char *fz_strsep(char **stringp, const char *delim); extern int fz_strlcpy(char *dst, const char *src, int n); extern int fz_strlcat(char *dst, const char *src, int n); -#undef strsep -#define strsep fz_strsep -#undef strlcpy -#define strlcpy fz_strlcpy -#undef strlcat -#define strlcat fz_strlcat - extern int fz_getopt(int nargc, char * const * nargv, const char *ostr); extern int fz_opterr, fz_optind, fz_optopt; extern char *fz_optarg; diff --git a/fitz/res_font.c b/fitz/res_font.c index ea8eec98..f56a1ac8 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -342,7 +342,7 @@ fz_newtype3font(char *name, fz_matrix matrix) font->t3procs = fz_malloc(sizeof(fz_buffer*) * 256); font->t3widths = fz_malloc(sizeof(float) * 256); - strlcpy(font->name, name, sizeof(font->name)); + fz_strlcpy(font->name, name, sizeof(font->name)); font->t3matrix = matrix; for (i = 0; i < 256; i++) { |