summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-24 16:50:54 +0000
committerKarl Berry <karl@freefriends.org>2008-05-24 16:50:54 +0000
commitbae50404b950f4bf0c8728e806a438bcdd2ba2f0 (patch)
treee21232976fce3b27b56de44069f798f9e0fa8bc0 /Build/source/texk/dvipdfmx/src
parentfdfc1c7792088e2a3e0544ffb1f4869467da521a (diff)
dvipdfmx 20080524
git-svn-id: svn://tug.org/texlive/trunk@8322 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx/src')
-rw-r--r--Build/source/texk/dvipdfmx/src/cff_dict.c3
-rw-r--r--Build/source/texk/dvipdfmx/src/dpxconf.c5
-rw-r--r--Build/source/texk/dvipdfmx/src/dpxfile.c4
-rw-r--r--Build/source/texk/dvipdfmx/src/dvipdfmx.c4
-rw-r--r--Build/source/texk/dvipdfmx/src/epdf.c19
-rw-r--r--Build/source/texk/dvipdfmx/src/fontmap.c32
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfdoc.c33
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfdraw.c14
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfdraw.h4
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfencoding.c13
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfobj.c8
-rw-r--r--Build/source/texk/dvipdfmx/src/pst_obj.c8
-rw-r--r--Build/source/texk/dvipdfmx/src/sfnt.c8
-rw-r--r--Build/source/texk/dvipdfmx/src/spc_pdfm.c3
-rw-r--r--Build/source/texk/dvipdfmx/src/specials.c9
-rw-r--r--Build/source/texk/dvipdfmx/src/truetype.c3
-rw-r--r--Build/source/texk/dvipdfmx/src/xbb.c7
17 files changed, 72 insertions, 105 deletions
diff --git a/Build/source/texk/dvipdfmx/src/cff_dict.c b/Build/source/texk/dvipdfmx/src/cff_dict.c
index 44f9c24931e..764c392bd8d 100644
--- a/Build/source/texk/dvipdfmx/src/cff_dict.c
+++ b/Build/source/texk/dvipdfmx/src/cff_dict.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/cff_dict.c,v 1.15 2007/07/05 05:45:06 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/cff_dict.c,v 1.16 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -428,7 +428,6 @@ static long pack_integer (card8 *dest, long destlen, long value)
static long pack_real (card8 *dest, long destlen, double value)
{
- long e;
int i = 0, pos = 2;
char buffer[32];
diff --git a/Build/source/texk/dvipdfmx/src/dpxconf.c b/Build/source/texk/dvipdfmx/src/dpxconf.c
index 9004573228e..29193df1032 100644
--- a/Build/source/texk/dvipdfmx/src/dpxconf.c
+++ b/Build/source/texk/dvipdfmx/src/dpxconf.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dpxconf.c,v 1.1 2005/07/20 10:41:54 hirata Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dpxconf.c,v 1.2 2008/05/22 10:08:02 matthias Exp $
This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
@@ -83,7 +83,8 @@ paperinfo (const char *ppformat)
ppinfo = paperfirst();
while (ppinfo && papername(ppinfo)) {
- if (!strcmp(ppformat, papername(ppinfo)))
+ if (!strcmp(ppformat, ppinfo->name))
+ /* ppinfo->name == papername(ppinfo), but gcc doesn't like the latter */
break;
ppinfo = papernext(ppinfo);
}
diff --git a/Build/source/texk/dvipdfmx/src/dpxfile.c b/Build/source/texk/dvipdfmx/src/dpxfile.c
index 682db495135..1107e73a943 100644
--- a/Build/source/texk/dvipdfmx/src/dpxfile.c
+++ b/Build/source/texk/dvipdfmx/src/dpxfile.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dpxfile.c,v 1.23 2008/05/18 14:12:20 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dpxfile.c,v 1.24 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -614,7 +614,7 @@ dpx_find_dfont_file (const char *filename)
if (fqpn) {
int len = strlen(fqpn);
if (len > 6 && strncmp(fqpn+len-6, ".dfont", 6)) {
- RENEW(fqpn, len+6, char);
+ fqpn = RENEW(fqpn, len+6, char);
strcat(fqpn, "/rsrc");
}
}
diff --git a/Build/source/texk/dvipdfmx/src/dvipdfmx.c b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
index 3886310f908..08fdabcfc08 100644
--- a/Build/source/texk/dvipdfmx/src/dvipdfmx.c
+++ b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.63 2008/05/20 13:05:14 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.64 2008/05/22 10:08:02 matthias Exp $
This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
@@ -317,7 +317,7 @@ static void
set_verbose (int argc, char *argv[])
{
while (argc > 0 && *argv[0] == '-') {
- char *flag, *nextptr;
+ char *flag;
for (flag = argv[0] + 1; *flag != 0; flag++) {
if (*flag == 'q')
diff --git a/Build/source/texk/dvipdfmx/src/epdf.c b/Build/source/texk/dvipdfmx/src/epdf.c
index 2471f4a6152..31b938a9ca3 100644
--- a/Build/source/texk/dvipdfmx/src/epdf.c
+++ b/Build/source/texk/dvipdfmx/src/epdf.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/epdf.c,v 1.22 2008/05/18 14:31:06 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/epdf.c,v 1.23 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -47,7 +47,6 @@
#include "epdf.h"
-static void print_bbox_info (pdf_obj *rect, const char *type, pdf_obj *crop_box);
static int rect_equal (pdf_obj *rect1, pdf_obj *rect2);
/*
@@ -118,22 +117,6 @@ rect_equal (pdf_obj *rect1, pdf_obj *rect2)
return 1;
}
-static void
-print_bbox_info (pdf_obj *rect, const char *type, pdf_obj *crop_box)
-{
- WARN("\"%s\" different from current CropBox found.", type);
- WARN("%s (PDF): [ %g %g %g %g ]", type,
- pdf_number_value(pdf_get_array(rect, 0)),
- pdf_number_value(pdf_get_array(rect, 1)),
- pdf_number_value(pdf_get_array(rect, 2)),
- pdf_number_value(pdf_get_array(rect, 3)));
- WARN("CropBox/MediaBox (PDF) : [ %g %g %g %g ]",
- pdf_number_value(pdf_get_array(crop_box, 0)),
- pdf_number_value(pdf_get_array(crop_box, 1)),
- pdf_number_value(pdf_get_array(crop_box, 2)),
- pdf_number_value(pdf_get_array(crop_box, 3)));
-}
-
int
pdf_include_page (pdf_ximage *ximage, FILE *image_file)
{
diff --git a/Build/source/texk/dvipdfmx/src/fontmap.c b/Build/source/texk/dvipdfmx/src/fontmap.c
index 9b573419a03..2076eaedb97 100644
--- a/Build/source/texk/dvipdfmx/src/fontmap.c
+++ b/Build/source/texk/dvipdfmx/src/fontmap.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/fontmap.c,v 1.39 2008/05/18 08:09:09 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/fontmap.c,v 1.40 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -580,7 +580,7 @@ fontmap_parse_mapdef_dps (fontmap_rec *mrec,
case '<': /* encoding or fontfile field */
if (++p < endptr && *p == '[') p++; /*skip */
skip_blank(&p, endptr);
- if (q = parse_string_value(&p, endptr)) {
+ if ((q = parse_string_value(&p, endptr))) {
int n = strlen(q);
if (n > 4 && strncmp(q+n-4, ".enc", 4) == 0)
mrec->enc_name = q;
@@ -591,13 +591,13 @@ fontmap_parse_mapdef_dps (fontmap_rec *mrec,
break;
case '"': /* Options */
- if (q = parse_string_value(&p, endptr)) {
+ if ((q = parse_string_value(&p, endptr))) {
char *r = q, *e = q+strlen(q), *s, *t;
skip_blank(&r, e);
while (r < e) {
- if (s = parse_float_decimal(&r, e)) {
+ if ((s = parse_float_decimal(&r, e))) {
skip_blank(&r, e);
- if (t = parse_string_value(&r, e)) {
+ if ((t = parse_string_value(&r, e))) {
if (strcmp(t, "SlantFont") == 0)
mrec->opt.slant = atof(s);
else if (strcmp(r, "ExtendFont") == 0)
@@ -605,7 +605,7 @@ fontmap_parse_mapdef_dps (fontmap_rec *mrec,
RELEASE(t);
}
RELEASE(s);
- } else if (s = parse_string_value(&r, e)) { /* skip */
+ } else if ((s = parse_string_value(&r, e))) { /* skip */
RELEASE(s);
}
skip_blank(&r, e);
@@ -946,26 +946,6 @@ is_pdfm_mapline (const char *mline) /* NULL terminated. */
return (n == 2 ? 0 : 1);
}
-static void
-delete_records (FILE *fp, long num_lines)
-{
- char *q, *p;
-
- while (num_lines-- > 0 &&
- (p = readline(work_buffer, WORK_BUFFER_SIZE, fp)) != NULL) {
- skip_blank(&p, p + strlen(p));
- if (*p == 0)
- continue;
- q = parse_string_value(&p, p + strlen(p));
- if (q) {
- WARN("Deleting fontmap record for \"%s\"", q);
- pdf_remove_fontmap_record(q);
- RELEASE(q);
- }
- }
- return;
-}
-
int
pdf_load_fontmap_file (const char *filename, int mode)
{
diff --git a/Build/source/texk/dvipdfmx/src/pdfdoc.c b/Build/source/texk/dvipdfmx/src/pdfdoc.c
index 8dbc246ccc5..663d9ef3941 100644
--- a/Build/source/texk/dvipdfmx/src/pdfdoc.c
+++ b/Build/source/texk/dvipdfmx/src/pdfdoc.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfdoc.c,v 1.52 2008/05/20 13:05:14 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfdoc.c,v 1.55 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -86,7 +86,6 @@ read_thumbnail (const char *thumb_filename)
{
pdf_obj *image_ref;
int xobj_id;
- int found_in_cwd = 0;
FILE *fp;
fp = MFOPEN(thumb_filename, FOPEN_RBIN_MODE);
@@ -421,6 +420,9 @@ pdf_doc_set_eop_content (const char *content, unsigned length)
return;
}
+#ifndef HAVE_TM_GMTOFF
+#ifndef HAVE_TIMEZONE
+
/* auxiliary function to compute timezone offset on
systems that do not support the tm_gmtoff in struct tm,
or have a timezone variable. Such as i386-solaris. */
@@ -438,28 +440,37 @@ compute_timezone_offset()
return (mktime(&local) - mktime(&tm));
}
+#endif /* HAVE_TIMEZONE */
+#endif /* HAVE_TM_GMTOFF */
+
/*
* Docinfo
*/
static long
asn_date (char *date_string)
{
-#ifndef HAVE_TIMEZONE
-# ifdef HAVE_TM_GMTOFF
-# define timezone (-bd_time->tm_gmtoff)
-# else
-# define timezone (-compute_timezone_offset())
-# endif /* not HAVE_TM_GMTOFF */
-#endif /* not HAVE_TIMEZONE */
+ long tz_offset;
time_t current_time;
struct tm *bd_time;
time(&current_time);
bd_time = localtime(&current_time);
- sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%+03ld'%02ld'",
+
+#ifdef HAVE_TM_GMTOFF
+ tz_offset = bd_time->tm_gmtoff;
+#else
+# ifdef HAVE_TIMEZONE
+ tz_offset = -timezone;
+# else
+ tz_offset = compute_timezone_offset();
+# endif /* HAVE_TIMEZONE */
+#endif /* HAVE_TM_GMTOFF */
+
+ sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%c%02ld'%02ld'",
bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday,
bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec,
- (-timezone / 3600), (timezone % 3600) / 60);
+ (tz_offset > 0) ? '+' : '-', labs(tz_offset) / 3600,
+ (labs(tz_offset) / 60) % 60);
return strlen(date_string);
}
diff --git a/Build/source/texk/dvipdfmx/src/pdfdraw.c b/Build/source/texk/dvipdfmx/src/pdfdraw.c
index cb348206c4b..671dbbf5d25 100644
--- a/Build/source/texk/dvipdfmx/src/pdfdraw.c
+++ b/Build/source/texk/dvipdfmx/src/pdfdraw.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.c,v 1.14 2007/11/22 17:10:12 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.c,v 1.15 2008/05/22 11:03:09 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -500,6 +500,7 @@ pdf_path__curveto (pdf_path *pa,
return 0;
}
+#if 0
#define QB_TWO_THIRD (2.0/3.0)
#define QB_ONE_THIRD (1.0/3.0)
@@ -520,6 +521,7 @@ pdf_path__curveto_QB (pdf_path *pa,
return pdf_path__curveto(pa, cp, &q0, &q1, p1);
}
+#endif
/* This isn't specified as cp to somewhere. */
@@ -1116,7 +1118,6 @@ int
pdf_dev_grestore (void)
{
pdf_gstate *gs;
- pdf_color sc, fc;
if (m_stack_depth(&gs_stack) <= 1) { /* Initial state at bottom */
WARN("Too many grestores.");
@@ -1124,16 +1125,12 @@ pdf_dev_grestore (void)
}
gs = m_stack_pop(&gs_stack);
-// pdf_color_copycolor(&sc, &gs->strokecolor);
-// pdf_color_copycolor(&fc, &gs->fillcolor);
clear_a_gstate(gs);
RELEASE(gs);
pdf_doc_add_page_content(" Q", 2);
pdf_dev_reset_fonts();
-// pdf_dev_set_strokingcolor(&sc);
-// pdf_dev_set_nonstrokingcolor(&fc);
return 0;
}
@@ -1185,7 +1182,6 @@ pdf_dev_grestore_to (int depth)
{
m_stack *gss = &gs_stack;
pdf_gstate *gs;
- pdf_color sc, fc;
ASSERT(depth >= 0);
@@ -1196,14 +1192,10 @@ pdf_dev_grestore_to (int depth)
while (m_stack_depth(gss) > depth + 1) {
pdf_doc_add_page_content(" Q", 2);
gs = m_stack_pop(gss);
-// pdf_color_copycolor(&sc, &gs->strokecolor);
-// pdf_color_copycolor(&fc, &gs->fillcolor);
clear_a_gstate(gs);
RELEASE(gs);
}
pdf_dev_reset_fonts();
-// pdf_dev_set_strokingcolor(&sc);
-// pdf_dev_set_nonstrokingcolor(&fc);
return;
}
diff --git a/Build/source/texk/dvipdfmx/src/pdfdraw.h b/Build/source/texk/dvipdfmx/src/pdfdraw.h
index 1c90851dd75..cd6d01f0f1c 100644
--- a/Build/source/texk/dvipdfmx/src/pdfdraw.h
+++ b/Build/source/texk/dvipdfmx/src/pdfdraw.h
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.h,v 1.11 2006/12/11 12:46:03 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfdraw.h,v 1.12 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -32,7 +32,7 @@
#define PDF_GSAVE_MAX 256
extern void pdf_dev_init_gstates (void);
-extern void pdf_dev_clean_gstates (void);
+extern void pdf_dev_clear_gstates (void);
#define pdf_copymatrix(m,n) do {\
(m)->a = (n)->a; (m)->b = (n)->b;\
diff --git a/Build/source/texk/dvipdfmx/src/pdfencoding.c b/Build/source/texk/dvipdfmx/src/pdfencoding.c
index b595edee385..4f50b312372 100644
--- a/Build/source/texk/dvipdfmx/src/pdfencoding.c
+++ b/Build/source/texk/dvipdfmx/src/pdfencoding.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfencoding.c,v 1.9 2008/05/13 12:23:45 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfencoding.c,v 1.11 2008/05/22 11:03:09 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -48,8 +48,10 @@ static unsigned char verbose = 0;
static const char *MacRomanEncoding[256];
static const char *MacExpertEncoding[256];
static const char *WinAnsiEncoding[256];
+#if 0
static const char *StandardEncoding[256];
static const char *ISOLatin1Encoding[256];
+#endif
void
pdf_encoding_set_verbose (void)
@@ -199,6 +201,7 @@ pdf_clean_encoding_struct (pdf_encoding *encoding)
return;
}
+#if 0
static int CDECL
glycmp (const void *pv1, const void *pv2)
{
@@ -209,6 +212,7 @@ glycmp (const void *pv1, const void *pv2)
return strcmp(v1, v2);
}
+#endif
static int
is_similar_charset (char **enc_vec, const char **enc_vec2)
@@ -366,9 +370,6 @@ struct {
void
pdf_init_encodings (void)
{
- pdf_encoding *encoding;
- int code;
-
enc_cache.count = 0;
enc_cache.capacity = 3;
enc_cache.encodings = NEW(enc_cache.capacity, pdf_encoding);
@@ -404,8 +405,6 @@ pdf_encoding_new_encoding (const char *enc_name, const char *ident,
const char **encoding_vec,
char *baseenc_name, int flags)
{
- char **baseenc_vec = NULL;
- pdf_obj *differences;
int enc_id, code;
pdf_encoding *encoding;
@@ -940,6 +939,7 @@ WinAnsiEncoding[256] = {
"udieresis", "yacute", "thorn", "ydieresis"
};
+#if 0
static const char *
StandardEncoding[256] = {
".notdef", ".notdef", ".notdef", ".notdef",
@@ -1075,3 +1075,4 @@ ISOLatin1Encoding[256] = {
"oslash", "ugrave", "uacute", "ucircumflex",
"udieresis", "yacute", "thorn", "ydieresis"
};
+#endif
diff --git a/Build/source/texk/dvipdfmx/src/pdfobj.c b/Build/source/texk/dvipdfmx/src/pdfobj.c
index f770cbeaba0..f0560134200 100644
--- a/Build/source/texk/dvipdfmx/src/pdfobj.c
+++ b/Build/source/texk/dvipdfmx/src/pdfobj.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfobj.c,v 1.57 2008/05/20 13:05:14 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfobj.c,v 1.58 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -1513,7 +1513,7 @@ pdf_remove_dict (pdf_obj *dict, const char *name)
TYPECHECK(dict, PDF_DICT);
data = dict->data;
- data_p = (pdf_dict **) &(dict->data);
+ data_p = (pdf_dict **) (void *) &(dict->data);
while (data->key != NULL) {
if (pdf_match_name(data->key, name)) {
pdf_release_obj(data->key);
@@ -1525,8 +1525,6 @@ pdf_remove_dict (pdf_obj *dict, const char *name)
data_p = &(data->next);
data = data->next;
}
-
- return;
}
pdf_obj *
@@ -2535,7 +2533,7 @@ pdf_get_object (pdf_file *pf, unsigned long obj_num, unsigned short obj_gen)
error:
WARN("Could not read object from object stream.");
- result = pdf_new_null();
+ return pdf_new_null();
}
#define OBJ_FILE(o) (((pdf_indirect *)((o)->data))->pf)
diff --git a/Build/source/texk/dvipdfmx/src/pst_obj.c b/Build/source/texk/dvipdfmx/src/pst_obj.c
index 5f0a1fc0e1e..3d34b13a6e1 100644
--- a/Build/source/texk/dvipdfmx/src/pst_obj.c
+++ b/Build/source/texk/dvipdfmx/src/pst_obj.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pst_obj.c,v 1.7 2008/01/13 21:25:31 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pst_obj.c,v 1.8 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -531,11 +531,11 @@ pst_parse_number (unsigned char **inbuf, unsigned char *inbufend)
double dval;
errno = 0;
- lval = strtol(*inbuf, (char **) &cur, 10);
+ lval = strtol((char *) *inbuf, (char **) (void *) &cur, 10);
if (errno || *cur == '.' || *cur == 'e' || *cur == 'E') {
/* real */
errno = 0;
- dval = strtod(*inbuf, (char **) &cur);
+ dval = strtod((char *) *inbuf, (char **) (void *) &cur);
if (!errno && PST_TOKEN_END(cur, inbufend)) {
*inbuf = cur;
return pst_new_obj(PST_TYPE_REAL, pst_real_new(dval));
@@ -550,7 +550,7 @@ pst_parse_number (unsigned char **inbuf, unsigned char *inbufend)
/* integer with radix */
/* Can the base have a (plus) sign? I think yes. */
errno = 0;
- lval = strtol(cur, (char **) &cur, lval);
+ lval = strtol((char *) cur, (char **) (void *) &cur, lval);
if (!errno && PST_TOKEN_END(cur, inbufend)) {
*inbuf = cur;
return pst_new_obj(PST_TYPE_INTEGER, pst_integer_new(lval));
diff --git a/Build/source/texk/dvipdfmx/src/sfnt.c b/Build/source/texk/dvipdfmx/src/sfnt.c
index 55e285a989e..a1e8a4c6057 100644
--- a/Build/source/texk/dvipdfmx/src/sfnt.c
+++ b/Build/source/texk/dvipdfmx/src/sfnt.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/sfnt.c,v 1.13 2008/05/08 18:51:59 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/sfnt.c,v 1.14 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -88,7 +88,7 @@ sfnt *
dfont_open (FILE *fp, int index)
{
sfnt *sfont;
- ULONG rdata_pos, map_pos, tags_pos, types_pos, res_pos, tag, type;
+ ULONG rdata_pos, map_pos, tags_pos, types_pos, res_pos, tag;
USHORT tags_num, types_num, i;
ASSERT(fp);
@@ -125,8 +125,8 @@ dfont_open (FILE *fp, int index)
}
for (i = 0; i <= types_num; i++) {
- sfnt_get_ushort(sfont); /* resource id */
- sfnt_get_ushort(sfont); /* resource name position from name_list */
+ (void) sfnt_get_ushort(sfont); /* resource id */
+ (void) sfnt_get_ushort(sfont); /* resource name position from name_list */
res_pos = sfnt_get_ulong(sfont); /* resource flag (byte) + resource offset */
sfnt_get_ulong(sfont); /* mbz */
if (i == index) break;
diff --git a/Build/source/texk/dvipdfmx/src/spc_pdfm.c b/Build/source/texk/dvipdfmx/src/spc_pdfm.c
index a18addfd7d0..ee6d9f89d70 100644
--- a/Build/source/texk/dvipdfmx/src/spc_pdfm.c
+++ b/Build/source/texk/dvipdfmx/src/spc_pdfm.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.34 2008/05/18 12:05:22 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.35 2008/05/22 10:08:02 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -1281,7 +1281,6 @@ static int
spc_handler_pdfm_literal (struct spc_env *spe, struct spc_arg *args)
{
int direct = 0;
- long len;
skip_white(&args->curptr, args->endptr);
while (args->curptr < args->endptr) {
diff --git a/Build/source/texk/dvipdfmx/src/specials.c b/Build/source/texk/dvipdfmx/src/specials.c
index ae9cd63ae57..ac938c0b61b 100644
--- a/Build/source/texk/dvipdfmx/src/specials.c
+++ b/Build/source/texk/dvipdfmx/src/specials.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/specials.c,v 1.9 2005/08/15 16:40:10 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/specials.c,v 1.10 2008/05/24 08:37:49 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -354,6 +354,7 @@ init_special (struct spc_handler *special,
args->curptr = (char *) p;
args->endptr = args->curptr + size;
args->base = args->curptr;
+ args->command = NULL;
return;
}
@@ -521,8 +522,10 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap)
c.x = spe->x_user; c.y = spe->y_user;
pdf_dev_transform(&c, NULL);
- WARN("Interpreting special command %s (%s) failed.", ap->command, name);
- WARN(">> at page=\"%ld\" position=\"(%g, %g)\" (in PDF)", pg, c.x, c.y);
+ if (ap->command && name) {
+ WARN("Interpreting special command %s (%s) failed.", ap->command, name);
+ WARN(">> at page=\"%ld\" position=\"(%g, %g)\" (in PDF)", pg, c.x, c.y);
+ }
for (i = 0, p = ap->base; i < 63 && p < ap->endptr; p++) {
if (isprint(*p))
ebuf[i++] = *p;
diff --git a/Build/source/texk/dvipdfmx/src/truetype.c b/Build/source/texk/dvipdfmx/src/truetype.c
index 1ab5143b27f..3d70e8dcbd6 100644
--- a/Build/source/texk/dvipdfmx/src/truetype.c
+++ b/Build/source/texk/dvipdfmx/src/truetype.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.9 2008/05/18 14:52:39 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/truetype.c,v 1.10 2008/05/22 11:03:09 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -871,7 +871,6 @@ do_custom_encoding (pdf_font *font,
int
pdf_font_load_truetype (pdf_font *font)
{
- pdf_obj *fontdict = pdf_font_get_resource(font);
pdf_obj *descriptor = pdf_font_get_descriptor(font);
char *ident = pdf_font_get_ident(font);
int encoding_id = pdf_font_get_encoding(font);
diff --git a/Build/source/texk/dvipdfmx/src/xbb.c b/Build/source/texk/dvipdfmx/src/xbb.c
index cac27b3867b..788a4246218 100644
--- a/Build/source/texk/dvipdfmx/src/xbb.c
+++ b/Build/source/texk/dvipdfmx/src/xbb.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/xbb.c,v 1.12 2008/05/18 14:31:06 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/xbb.c,v 1.13 2008/05/22 10:08:02 matthias Exp $
This is extractbb, a bounding box extraction program.
@@ -23,6 +23,7 @@
#include <string.h>
#include "system.h"
#include "mem.h"
+#include "error.h"
#include "mfileio.h"
#include "numbers.h"
#include "pdfobj.h"
@@ -313,7 +314,7 @@ static int pdf_get_info (FILE *image_file, char *filename, int *llx, int *lly, i
page_tree = NULL;
{
- pdf_obj *trailer, *catalog, *tmp;
+ pdf_obj *trailer, *catalog;
pf = pdf_open(filename, image_file);
if (!pf)
@@ -472,7 +473,7 @@ int extractbb (int argc, char *argv[], int mode)
}
}
for (; argc > 0; argc--, argv++) {
- FILE *infile;
+ FILE *infile = NULL;
char *kpse_file_name;
if (!(kpse_file_name = kpse_find_pict(argv[0])) ||
(infile = MFOPEN(kpse_file_name, FOPEN_RBIN_MODE)) == NULL) {