summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvipdfmx/src/pdfencoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/pdfencoding.c')
-rw-r--r--Build/source/texk/xdvipdfmx/src/pdfencoding.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/pdfencoding.c b/Build/source/texk/xdvipdfmx/src/pdfencoding.c
index 296674d9880..00a041c3b81 100644
--- a/Build/source/texk/xdvipdfmx/src/pdfencoding.c
+++ b/Build/source/texk/xdvipdfmx/src/pdfencoding.c
@@ -92,7 +92,7 @@ typedef struct pdf_encoding
static int pdf_encoding_new_encoding (const char *enc_name,
const char *ident,
const char **encoding_vec,
- char *baseenc_name,
+ const char *baseenc_name,
int flags);
static void
@@ -285,7 +285,8 @@ load_encoding_file (const char *filename)
FILE *fp;
pdf_obj *enc_name = NULL;
pdf_obj *encoding_array = NULL;
- char *wbuf, *p, *endptr;
+ char *wbuf;
+ const char *p, *endptr;
char *enc_vec[256];
int code, fsize, enc_id;
@@ -306,12 +307,12 @@ load_encoding_file (const char *filename)
fsize = file_size(fp);
wbuf = NEW(fsize + 1, char);
+ wbuf[fsize] = '\0';
fread(wbuf, sizeof(char), fsize, fp);
DPXFCLOSE(fp);
p = wbuf;
endptr = wbuf + fsize;
- p[fsize] = '\0';
skip_white(&p, endptr);
@@ -404,7 +405,7 @@ pdf_init_encodings (void)
static int
pdf_encoding_new_encoding (const char *enc_name, const char *ident,
const char **encoding_vec,
- char *baseenc_name, int flags)
+ const char *baseenc_name, int flags)
{
int enc_id, code;
@@ -457,7 +458,7 @@ pdf_encoding_new_encoding (const char *enc_name, const char *ident,
/* Creates Encoding resource and ToUnicode CMap
* for all non-predefined encodings.
*/
-void pdf_encoding_complete ()
+void pdf_encoding_complete (void)
{
int enc_id;
@@ -506,7 +507,7 @@ pdf_close_encodings (void)
}
int
-pdf_encoding_findresource (char *enc_name)
+pdf_encoding_findresource (const char *enc_name)
{
int enc_id;
pdf_encoding *encoding;