summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-06-10 08:37:36 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-06-10 08:37:36 +0000
commit6450c2d311cc415ad5837f9501bb57bee3788511 (patch)
tree8b7f3f92459c8277c1e521de7702fc34cebe1a10 /Build
parent91e8bc6ee3290fc6f8fa1d0c35f900726899b39e (diff)
avoid scanf with 'unsigned short', for older Solaris
git-svn-id: svn://tug.org/texlive/trunk@18860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfmx/ChangeLog.TL6
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfobj.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfmx/ChangeLog.TL b/Build/source/texk/dvipdfmx/ChangeLog.TL
index d71d2e2000b..1c7c34e4dad 100644
--- a/Build/source/texk/dvipdfmx/ChangeLog.TL
+++ b/Build/source/texk/dvipdfmx/ChangeLog.TL
@@ -1,6 +1,12 @@
ChangeLog.TL: TeX Live (TL) changes for dvipdfmx
================================================
+2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid using "%hu" with fscanf/sscanf, for older Solaris.
+ * src/pdfobj.c (pdf_open, check_for_pdf_version): Declare minor
+ as unsigned int for use with "%u".
+
2010-06-08 Peter Breitenlohner <peb@mppmu.mpg.de>
Solaris9 doesn't support "%hhu".
diff --git a/Build/source/texk/dvipdfmx/src/pdfobj.c b/Build/source/texk/dvipdfmx/src/pdfobj.c
index 22f02e06e26..691cdafe692 100644
--- a/Build/source/texk/dvipdfmx/src/pdfobj.c
+++ b/Build/source/texk/dvipdfmx/src/pdfobj.c
@@ -2960,10 +2960,10 @@ pdf_open (const char *ident, FILE *file)
new_version = pdf_deref_obj(pdf_lookup_dict(pf->catalog, "Version"));
if (new_version) {
- unsigned short minor;
+ unsigned int minor;
if (!PDF_OBJ_NAMETYPE(new_version) ||
- sscanf(pdf_name_value(new_version), "1.%hu", &minor) != 1) {
+ sscanf(pdf_name_value(new_version), "1.%u", &minor) != 1) {
pdf_release_obj(new_version);
WARN("Illegal Version entry in document catalog. Broken PDF file?");
goto error;
@@ -3003,12 +3003,12 @@ pdf_files_close (void)
static int
check_for_pdf_version (FILE *file)
{
- unsigned short minor;
+ unsigned int minor;
rewind(file);
return (ungetc(fgetc(file), file) == '%' &&
- fscanf(file, "%%PDF-1.%hu", &minor) == 1) ? minor : -1;
+ fscanf(file, "%%PDF-1.%u", &minor) == 1) ? minor : -1;
}
int