summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/src
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfm-x/src')
-rw-r--r--Build/source/texk/dvipdfm-x/src/bmpimage.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/cff.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/cff_dict.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/cidtype0.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/cidtype2.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/dpxfile.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/dpxutil.c639
-rw-r--r--Build/source/texk/dvipdfm-x/src/dpxutil.h113
-rw-r--r--Build/source/texk/dvipdfm-x/src/dvi.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/dvipdfmx.c6
-rw-r--r--Build/source/texk/dvipdfm-x/src/epdf.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/error.c92
-rw-r--r--Build/source/texk/dvipdfm-x/src/error.h46
-rw-r--r--Build/source/texk/dvipdfm-x/src/fontmap.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/jpegimage.c5
-rw-r--r--Build/source/texk/dvipdfm-x/src/mpost.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfcolor.c2
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfdev.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfdoc.c5
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfdraw.c2
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfencrypt.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfnames.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfobj.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfparse.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pdfximage.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pngimage.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/pngimage.h4
-rw-r--r--Build/source/texk/dvipdfm-x/src/sfnt.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_color.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_dvips.c6
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_html.c2
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_pdfm.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_tpic.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/spc_util.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/specials.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/tfm.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/truetype.c5
-rw-r--r--Build/source/texk/dvipdfm-x/src/tt_aux.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/tt_cmap.c2
-rw-r--r--Build/source/texk/dvipdfm-x/src/tt_glyf.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/tt_post.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/tt_table.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/type0.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/type1.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/type1c.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/vf.c4
-rw-r--r--Build/source/texk/dvipdfm-x/src/xbb.c6
47 files changed, 95 insertions, 968 deletions
diff --git a/Build/source/texk/dvipdfm-x/src/bmpimage.c b/Build/source/texk/dvipdfm-x/src/bmpimage.c
index ef23e70a3a4..03fe341a34d 100644
--- a/Build/source/texk/dvipdfm-x/src/bmpimage.c
+++ b/Build/source/texk/dvipdfm-x/src/bmpimage.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
/*
diff --git a/Build/source/texk/dvipdfm-x/src/cff.c b/Build/source/texk/dvipdfm-x/src/cff.c
index 7e280732123..0e0fe7131d3 100644
--- a/Build/source/texk/dvipdfm-x/src/cff.c
+++ b/Build/source/texk/dvipdfm-x/src/cff.c
@@ -20,6 +20,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/cff_dict.c b/Build/source/texk/dvipdfm-x/src/cff_dict.c
index c2e20250299..bdd7280cdd8 100644
--- a/Build/source/texk/dvipdfm-x/src/cff_dict.c
+++ b/Build/source/texk/dvipdfm-x/src/cff_dict.c
@@ -26,6 +26,10 @@
* Adobe Technical Note #5176 "The Compact Font Format Specification"
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <math.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/Build/source/texk/dvipdfm-x/src/cidtype0.c b/Build/source/texk/dvipdfm-x/src/cidtype0.c
index f2a2afaed00..ee8193dcd8e 100644
--- a/Build/source/texk/dvipdfm-x/src/cidtype0.c
+++ b/Build/source/texk/dvipdfm-x/src/cidtype0.c
@@ -27,8 +27,8 @@
*
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/cidtype2.c b/Build/source/texk/dvipdfm-x/src/cidtype2.c
index dcf74c6abec..472be1c1607 100644
--- a/Build/source/texk/dvipdfm-x/src/cidtype2.c
+++ b/Build/source/texk/dvipdfm-x/src/cidtype2.c
@@ -25,8 +25,8 @@
* GhostScript can't handle CIDToGIDMap correctly.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/dpxfile.c b/Build/source/texk/dvipdfm-x/src/dpxfile.c
index d6390641ed0..75fa6da0801 100644
--- a/Build/source/texk/dvipdfm-x/src/dpxfile.c
+++ b/Build/source/texk/dvipdfm-x/src/dpxfile.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#ifdef _MSC_VER
diff --git a/Build/source/texk/dvipdfm-x/src/dpxutil.c b/Build/source/texk/dvipdfm-x/src/dpxutil.c
deleted file mode 100644
index 05e1b1b1485..00000000000
--- a/Build/source/texk/dvipdfm-x/src/dpxutil.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*
-
- This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-
- Copyright (C) 2002-2012 by Jin-Hwan Cho and Shunsaku Hirata,
- the dvipdfmx project team.
-
- Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "system.h"
-#include "mem.h"
-#include "error.h"
-
-#include "dpxutil.h"
-
-int
-xtoi (char c)
-{
- if (c >= '0' && c <= '9')
- return (c - '0');
- else if (c >= 'a' && c <= 'f')
- return (c - 'W');
- else if (c >= 'A' && c <= 'F')
- return (c - '7');
- else
- return -1;
-}
-
-int
-sputx (unsigned char c, char **s, char *end)
-{
- char hi = (c >> 4), lo = c & 0x0f;
-
- if (*s + 2 > end)
- ERROR("Buffer overflow.");
- **s = (hi < 10) ? hi + '0' : hi + '7';
- *(*s+1) = (lo < 10) ? lo + '0' : lo + '7';
- *s += 2;
-
- return 2;
-}
-
-int
-getxpair (unsigned char **s)
-{
- int hi, lo;
- hi = xtoi(**s);
- if (hi < 0)
- return hi;
- (*s)++;
- lo = xtoi(**s);
- if (lo < 0)
- return lo;
- (*s)++;
- return ((hi << 4)| lo);
-}
-
-int
-putxpair (unsigned char c, char **s)
-{
- char hi = (c >> 4), lo = c & 0x0f;
-
- **s = (hi < 10) ? hi + '0' : hi + '7';
- *(*s+1) = (lo < 10) ? lo + '0' : lo + '7';
- *s += 2;
-
- return 2;
-}
-
-/* Overflowed value is set to invalid char. */
-unsigned char
-ostrtouc (unsigned char **inbuf, unsigned char *inbufend, unsigned char *valid)
-{
- unsigned char *cur = *inbuf;
- unsigned int val = 0;
-
- while (cur < inbufend && cur < *inbuf + 3 &&
- (*cur >= '0' && *cur <= '7')) {
- val = (val << 3) | (*cur - '0');
- cur++;
- }
- if (val > 255 || cur == *inbuf)
- *valid = 0;
- else
- *valid = 1;
-
- *inbuf = cur;
- return (unsigned char) val;
-}
-
-unsigned char
-esctouc (unsigned char **inbuf, unsigned char *inbufend, unsigned char *valid)
-{
- unsigned char unescaped, escaped;
-
- escaped = **inbuf;
- *valid = 1;
- switch (escaped) {
- /* Backslash, unbalanced paranthes */
- case '\\': case ')': case '(':
- unescaped = escaped;
- (*inbuf)++;
- break;
- /* Other escaped char */
- case 'n': unescaped = '\n'; (*inbuf)++; break;
- case 'r': unescaped = '\r'; (*inbuf)++; break;
- case 't': unescaped = '\t'; (*inbuf)++; break;
- case 'b': unescaped = '\b'; (*inbuf)++; break;
- case 'f': unescaped = '\f'; (*inbuf)++; break;
- /*
- * An end-of-line marker preceeded by backslash is not part of a
- * literal string
- */
- case '\r':
- unescaped = 0;
- *valid = 0;
- *inbuf += (*inbuf < inbufend - 1 && *(*inbuf+1) == '\n') ? 2 : 1;
- break;
- case '\n':
- unescaped = 0;
- *valid = 0;
- (*inbuf)++;
- break;
- /* Possibly octal notion */
- default:
- unescaped = ostrtouc(inbuf, inbufend, valid);
- }
-
- return unescaped;
-}
-
-void
-skip_white_spaces (unsigned char **s, unsigned char *endptr)
-{
- while (*s < endptr)
- if (!is_space(**s))
- break;
- else
- (*s)++;
-}
-
-void
-ht_init_table (struct ht_table *ht, hval_free_func hval_free_fn)
-{
- int i;
-
- ASSERT(ht);
-
- for (i = 0; i < HASH_TABLE_SIZE; i++) {
- ht->table[i] = NULL;
- }
- ht->count = 0;
- ht->hval_free_fn = hval_free_fn;
-}
-
-void
-ht_clear_table (struct ht_table *ht)
-{
- int i;
-
- ASSERT(ht);
-
- for (i = 0; i < HASH_TABLE_SIZE; i++) {
- struct ht_entry *hent, *next;
-
- hent = ht->table[i];
- while (hent) {
- if (hent->value && ht->hval_free_fn) {
- ht->hval_free_fn(hent->value);
- }
- hent->value = NULL;
- if (hent->key) {
- RELEASE(hent->key);
- }
- hent->key = NULL;
- next = hent->next;
- RELEASE(hent);
- hent = next;
- }
- ht->table[i] = NULL;
- }
- ht->count = 0;
- ht->hval_free_fn = NULL;
-}
-
-long ht_table_size (struct ht_table *ht)
-{
- ASSERT(ht);
-
- return ht->count;
-}
-
-static unsigned int
-get_hash (const void *key, int keylen)
-{
- unsigned int hkey = 0;
- int i;
-
- for (i = 0; i < keylen; i++) {
- hkey = (hkey << 5) + hkey + ((const char *)key)[i];
- }
-
- return (hkey % HASH_TABLE_SIZE);
-}
-
-void *
-ht_lookup_table (struct ht_table *ht, const void *key, int keylen)
-{
- struct ht_entry *hent;
- unsigned int hkey;
-
- ASSERT(ht && key);
-
- hkey = get_hash(key, keylen);
- hent = ht->table[hkey];
- while (hent) {
- if (hent->keylen == keylen &&
- !memcmp(hent->key, key, keylen)) {
- return hent->value;
- }
- hent = hent->next;
- }
-
- return NULL;
-}
-
-int
-ht_remove_table (struct ht_table *ht,
- const void *key, int keylen)
-/* returns 1 if the element was found and removed and 0 otherwise */
-{
- struct ht_entry *hent, *prev;
- unsigned int hkey;
-
- ASSERT(ht && key);
-
- hkey = get_hash(key, keylen);
- hent = ht->table[hkey];
- prev = NULL;
- while (hent) {
- if (hent->keylen == keylen &&
- !memcmp(hent->key, key, keylen)) {
- break;
- }
- prev = hent;
- hent = hent->next;
- }
- if (hent) {
- if (hent->key)
- RELEASE(hent->key);
- hent->key = NULL;
- hent->keylen = 0;
- if (hent->value && ht->hval_free_fn) {
- ht->hval_free_fn(hent->value);
- }
- hent->value = NULL;
- if (prev) {
- prev->next = hent->next;
- } else {
- ht->table[hkey] = hent->next;
- }
- RELEASE(hent);
- ht->count--;
- return 1;
- } else
- return 0;
-}
-
-void
-ht_modify_table (struct ht_table *ht,
- const void *key, int keylen, void *value, int mode)
-{
- struct ht_entry *hent, *prev;
- unsigned int hkey;
-
- ASSERT(ht && key);
-
- hkey = get_hash(key, keylen);
- hent = ht->table[hkey];
- prev = NULL;
- while (hent) {
- if (hent->keylen == keylen &&
- !memcmp(hent->key, key, keylen)) {
- break;
- }
- prev = hent;
- hent = hent->next;
- }
- if (hent) {
- switch (mode) {
- case HT_NEW:
- ASSERT(0); /* duplicates not allowed in this mode */
- break;
- case HT_REPLACE: {
- if (hent->value && ht->hval_free_fn)
- ht->hval_free_fn(hent->value);
- hent->value = value;
- break;
- }
- case HT_KEEP:
- ht->hval_free_fn(value);
- break;
- }
- } else {
- hent = NEW(1, struct ht_entry);
- hent->key = NEW(keylen, char);
- memcpy(hent->key, key, keylen);
- hent->keylen = keylen;
- hent->value = value;
- hent->next = NULL;
- if (prev) {
- prev->next = hent;
- } else {
- ht->table[hkey] = hent;
- }
- ht->count++;
- }
-}
-
-int
-ht_set_iter (struct ht_table *ht, struct ht_iter *iter)
-{
- int i;
-
- ASSERT(ht && ht->table && iter);
-
- for (i = 0; i < HASH_TABLE_SIZE; i++) {
- if (ht->table[i]) {
- iter->index = i;
- iter->curr = ht->table[i];
- iter->hash = ht;
- return 0;
- }
- }
-
- return -1;
-}
-
-void
-ht_clear_iter (struct ht_iter *iter)
-{
- if (iter) {
- iter->index = HASH_TABLE_SIZE;
- iter->curr = NULL;
- iter->hash = NULL;
- }
-}
-
-char *
-ht_iter_getkey (struct ht_iter *iter, int *keylen)
-{
- struct ht_entry *hent;
-
- hent = (struct ht_entry *) iter->curr;
- if (iter && hent) {
- *keylen = hent->keylen;
- return hent->key;
- } else {
- *keylen = 0;
- return NULL;
- }
-}
-
-void *
-ht_iter_getval (struct ht_iter *iter)
-{
- struct ht_entry *hent;
-
- hent = (struct ht_entry *) iter->curr;
- if (iter && hent) {
- return hent->value;
- } else {
- return NULL;
- }
-}
-
-int
-ht_iter_next (struct ht_iter *iter)
-{
- struct ht_entry *hent;
- struct ht_table *ht;
-
- ASSERT(iter);
-
- ht = iter->hash;
- hent = (struct ht_entry *) iter->curr;
- hent = hent->next;
- while (!hent &&
- ++iter->index < HASH_TABLE_SIZE) {
- hent = ht->table[iter->index];
- }
- iter->curr = hent;
-
- return (hent ? 0 : -1);
-}
-
-
-static int
-read_c_escchar (char *r, const char **pp, const char *endptr)
-{
- int c = 0, l = 1;
- const char *p = *pp;
-
- switch (p[0]) {
- case 'a' : c = '\a'; p++; break;
- case 'b' : c = '\b'; p++; break;
- case 'f' : c = '\f'; p++; break;
- case 'n' : c = '\n'; p++; break;
- case 'r' : c = '\r'; p++; break;
- case 't' : c = '\t'; p++; break;
- case 'v' : c = '\v'; p++; break;
- case '\\': case '?': case '\'': case '\"':
- c = p[0]; p++;
- break;
- case '\n': l = 0; p++; break;
- case '\r':
- {
- p++;
- if (p < endptr && p[0] == '\n')
- p++;
- l = 0;
- }
- break;
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- {
- int i;
- for (c = 0, i = 0;
- i < 3 && p < endptr &&
- p[0] >= '0' && p[0] <= '7'; i++, p++)
- c = (c << 3) + (p[0] - '0');
- }
- break;
- case 'x':
- {
- int i;
- for (c = 0, i = 0, p++;
- i < 2 && p < endptr && isxdigit(p[0]);
- i++, p++)
- c = (c << 4) +
- (isdigit(p[0]) ?
- p[0] - '0' :
- (islower(p[0]) ? p[0] - 'a' + 10: p[0] - 'A' + 10));
- }
- break;
- default:
- WARN("Unknown escape char sequence: \\%c", p[0]);
- l = 0; p++;
- break;
- }
-
- if (r)
- *r = (char) c;
- *pp = p;
- return l;
-}
-
-#define C_QUOTE '"'
-#define C_ESCAPE '\\'
-static int
-read_c_litstrc (char *q, int len, const char **pp, const char *endptr)
-{
- const char *p;
- int l = 0;
-#define Q_TERM 0
-#define Q_CONT -1
-#define Q_ERROR_UNTERM -1
-#define Q_ERROR_INVAL -2
-#define Q_ERROR_BUFF -3
- int s = Q_CONT;
-
- for (l = 0, p = *pp;
- s == Q_CONT && p < endptr; ) {
- switch (p[0]) {
- case C_QUOTE:
- s = Q_TERM; p++;
- break;
- case C_ESCAPE:
- if (q && l == len)
- s = Q_ERROR_BUFF;
- else {
- p++;
- l += read_c_escchar(q ? &q[l] : NULL, &p, endptr);
- }
- break;
- case '\n': case '\r':
- s = Q_ERROR_INVAL;
- break;
- default:
- if (q && l == len)
- s = Q_ERROR_BUFF;
- else {
- if (!q)
- l++;
- else
- q[l++] = p[0];
- p++;
- }
- break;
- }
- }
- if (s == Q_TERM) {
- if (q && l == len)
- s = Q_ERROR_BUFF;
- else if (q)
- q[l++] = '\0';
- }
-
- *pp = p;
- return ((s == Q_TERM) ? l : s);
-}
-
-char *
-parse_c_string (const char **pp, const char *endptr)
-{
- char *q = NULL;
- const char *p = *pp;
- int l = 0;
-
- if (p >= endptr || p[0] != C_QUOTE)
- return NULL;
-
- p++;
- l = read_c_litstrc(NULL, 0, &p, endptr);
- if (l >= 0) {
- q = NEW(l + 1, char);
- p = *pp + 1;
- l = read_c_litstrc(q, l + 1, &p, endptr);
- }
-
- *pp = p;
- return q;
-}
-
-#define ISCNONDIGITS(c) ( \
- (c) == '_' || \
- ((c) >= 'a' && (c) <= 'z') || \
- ((c) >= 'A' && (c) <= 'Z') \
-)
-#define ISCIDENTCHAR(c) ( \
- ISCNONDIGITS((c)) || \
- ((c) >= '0' && (c) <= '9') \
-)
-
-char *
-parse_c_ident (const char **pp, const char *endptr)
-{
- char *q = NULL;
- const char *p = *pp;
- int n;
-
- if (p >= endptr || !ISCNONDIGITS(*p))
- return NULL;
-
- for (n = 0; p < endptr && ISCIDENTCHAR(*p); p++, n++);
- q = NEW(n + 1, char);
- memcpy(q, *pp, n); q[n] = '\0';
-
- *pp = p;
- return q;
-}
-
-char *
-parse_float_decimal (const char **pp, const char *endptr)
-{
- char *q = NULL;
- const char *p = *pp;
- int s = 0, n = 0;
-
- if (p >= endptr)
- return NULL;
-
- if (p[0] == '+' || p[0] == '-')
- p++;
-
- /* 1. .01 001 001E-001 */
- for (s = 0, n = 0; p < endptr && s >= 0; ) {
- switch (p[0]) {
- case '+': case '-':
- if (s != 2)
- s = -1;
- else {
- s = 3; p++;
- }
- break;
- case '.':
- if (s > 0)
- s = -1;
- else {
- s = 1; p++;
- }
- break;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- n++; p++;
- break;
- case 'E': case 'e':
- if (n == 0 || s == 2)
- s = -1;
- else {
- s = 2; p++;
- }
- break;
- default:
- s = -1;
- break;
- }
- }
-
- if (n != 0) {
- n = (int) (p - *pp);
- q = NEW(n + 1, char);
- memcpy(q, *pp, n); q[n] = '\0';
- }
-
- *pp = p;
- return q;
-}
diff --git a/Build/source/texk/dvipdfm-x/src/dpxutil.h b/Build/source/texk/dvipdfm-x/src/dpxutil.h
deleted file mode 100644
index 46273759836..00000000000
--- a/Build/source/texk/dvipdfm-x/src/dpxutil.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-
- This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-
- Copyright (C) 2002-2012 by Jin-Hwan Cho and Shunsaku Hirata,
- the dvipdfmx project team.
-
- Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-#ifndef _DPXUTIL_H_
-#define _DPXUTIL_H_
-
-#undef MIN
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#undef MAX
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#undef ABS
-#define ABS(a) (((a) < 0) ? -(a) : (a))
-
-#ifndef is_space
-#define is_space(c) ((c) == ' ' || (c) == '\t' || (c) == '\f' || \
- (c) == '\r' || (c) == '\n' || (c) == '\0')
-#endif
-#ifndef is_delim
-#define is_delim(c) ((c) == '(' || (c) == '/' || \
- (c) == '<' || (c) == '>' || \
- (c) == '[' || (c) == ']' || \
- (c) == '{' || (c) == '}' || \
- (c) == '%')
-#endif
-
-extern void skip_white_spaces (unsigned char **s, unsigned char *endptr);
-extern int xtoi (char c);
-extern int getxpair (unsigned char **str);
-extern int putxpair (unsigned char c, char **str);
-extern int sputx (unsigned char c, char **buf, char *endptr);
-
-extern unsigned char ostrtouc (unsigned char **inbuf,
- unsigned char *inbufend, unsigned char *valid);
-extern unsigned char esctouc (unsigned char **inbuf,
- unsigned char *inbufend, unsigned char *valid);
-
-#define HASH_TABLE_SIZE 503
-
-struct ht_entry {
- char *key;
- int keylen;
-
- void *value;
-
- struct ht_entry *next;
-};
-
-typedef void (*hval_free_func) (void *);
-
-struct ht_table {
- long count;
- hval_free_func hval_free_fn;
- struct ht_entry *table[HASH_TABLE_SIZE];
-};
-
-#define HT_NEW 0
-#define HT_REPLACE 1
-#define HT_KEEP 2
-
-extern void ht_init_table (struct ht_table *ht,
- hval_free_func hval_free_fn);
-extern void ht_clear_table (struct ht_table *ht);
-extern long ht_table_size (struct ht_table *ht);
-extern void *ht_lookup_table (struct ht_table *ht,
- const void *key, int keylen);
-extern void ht_modify_table (struct ht_table *ht,
- const void *key, int keylen,
- void *value, int mode);
-#define ht_append_table(ht, key, keylen, value) \
- ht_modify_table(ht, key, keylen, value, HT_NEW)
-#define ht_insert_table(ht, key, keylen, value) \
- ht_modify_table(ht, key, keylen, value, HT_REPLACE)
-extern int ht_remove_table (struct ht_table *ht,
- const void *key, int keylen);
-
-struct ht_iter {
- int index;
- void *curr;
- struct ht_table *hash;
-};
-
-extern int ht_set_iter (struct ht_table *ht, struct ht_iter *iter);
-extern void ht_clear_iter (struct ht_iter *iter);
-extern char *ht_iter_getkey (struct ht_iter *iter, int *keylen);
-extern void *ht_iter_getval (struct ht_iter *iter);
-extern int ht_iter_next (struct ht_iter *iter);
-
-extern char *parse_float_decimal (const char **pp, const char *endptr);
-extern char *parse_c_string (const char **pp, const char *endptr);
-extern char *parse_c_ident (const char **pp, const char *endptr);
-
-#endif /* _DPXUTIL_H_ */
diff --git a/Build/source/texk/dvipdfm-x/src/dvi.c b/Build/source/texk/dvipdfm-x/src/dvi.c
index 62a315f4831..acb8e5ee611 100644
--- a/Build/source/texk/dvipdfm-x/src/dvi.c
+++ b/Build/source/texk/dvipdfm-x/src/dvi.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <sys/types.h>
diff --git a/Build/source/texk/dvipdfm-x/src/dvipdfmx.c b/Build/source/texk/dvipdfm-x/src/dvipdfmx.c
index cde17f051a6..eb4fb13cbad 100644
--- a/Build/source/texk/dvipdfm-x/src/dvipdfmx.c
+++ b/Build/source/texk/dvipdfm-x/src/dvipdfmx.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <stdio.h>
@@ -900,7 +900,7 @@ main (int argc, char *argv[])
set_verbose(argc, argv);
/* quiet mode cannot be set in config file */
if (really_quiet)
- shut_up();
+ shut_up(really_quiet);
pdf_init_fontmaps(); /* This must come before parsing options... */
diff --git a/Build/source/texk/dvipdfm-x/src/epdf.c b/Build/source/texk/dvipdfm-x/src/epdf.c
index 17fdcf3ee26..05960f8fb9c 100644
--- a/Build/source/texk/dvipdfm-x/src/epdf.c
+++ b/Build/source/texk/dvipdfm-x/src/epdf.c
@@ -31,8 +31,8 @@
* TrimBox, BleedBox, ArtBox, Rotate ...
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/error.c b/Build/source/texk/dvipdfm-x/src/error.c
deleted file mode 100644
index c4d2d3d7cac..00000000000
--- a/Build/source/texk/dvipdfm-x/src/error.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-
- This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-
- Copyright (C) 2002-2012 by Jin-Hwan Cho and Shunsaku Hirata,
- the dvipdfmx project team.
-
- Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "error.h"
-
-#define DPX_MESG 0
-#define DPX_MESG_WARN 1
-#define DPX_MESG_ERROR 2
-
-static int _mesg_type = DPX_MESG;
-#define WANT_NEWLINE() (_mesg_type != DPX_MESG_WARN && _mesg_type != DPX_MESG_ERROR)
-
-static int really_quiet = 0;
-
-void
-shut_up (void)
-{
- really_quiet = 1;
-}
-
-void
-MESG (const char *fmt, ...)
-{
- va_list argp;
-
- if (!really_quiet) {
- va_start(argp, fmt);
- vfprintf(stderr, fmt, argp);
- va_end(argp);
- _mesg_type = DPX_MESG;
- }
-}
-
-void
-WARN (const char *fmt, ...)
-{
- va_list argp;
-
- if (!really_quiet) {
- if (WANT_NEWLINE())
- fprintf(stderr, "\n");
- fprintf(stderr, "** WARNING ** ");
- va_start(argp, fmt);
- vfprintf(stderr, fmt, argp);
- va_end(argp);
- fprintf(stderr, "\n");
-
- _mesg_type = DPX_MESG_WARN;
- }
-}
-
-void
-ERROR (const char *fmt, ...)
-{
- va_list argp;
-
- if (!really_quiet) {
- if (WANT_NEWLINE())
- fprintf(stderr, "\n");
- fprintf(stderr, "** ERROR ** ");
- va_start(argp, fmt);
- vfprintf(stderr, fmt, argp);
- va_end(argp);
- fprintf(stderr, "\n");
- }
- error_cleanup();
- exit( 1 );
-}
diff --git a/Build/source/texk/dvipdfm-x/src/error.h b/Build/source/texk/dvipdfm-x/src/error.h
deleted file mode 100644
index 25103e0d4e0..00000000000
--- a/Build/source/texk/dvipdfm-x/src/error.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
- This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
-
- Copyright (C) 2002-2012 by Jin-Hwan Cho and Shunsaku Hirata,
- the dvipdfmx project team.
-
- Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-*/
-
-#ifndef _ERROR_H_
-#define _ERROR_H_
-
-#include "system.h"
-
-extern void error_cleanup (void);
-
-#define FATAL_ERROR -1
-#define NO_ERROR 0
-
-#include <assert.h>
-#include <stdio.h>
-
-extern void shut_up (void);
-
-extern void ERROR (const char *fmt, ...);
-extern void MESG (const char *fmt, ...);
-extern void WARN (const char *fmt, ...);
-
-#define ASSERT(e) assert(e)
-
-#endif /* _ERROR_H_ */
diff --git a/Build/source/texk/dvipdfm-x/src/fontmap.c b/Build/source/texk/dvipdfm-x/src/fontmap.c
index c2151278f12..1dc567fcf01 100644
--- a/Build/source/texk/dvipdfm-x/src/fontmap.c
+++ b/Build/source/texk/dvipdfm-x/src/fontmap.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/jpegimage.c b/Build/source/texk/dvipdfm-x/src/jpegimage.c
index b21d6c34e94..903a810cebe 100644
--- a/Build/source/texk/dvipdfm-x/src/jpegimage.c
+++ b/Build/source/texk/dvipdfm-x/src/jpegimage.c
@@ -22,9 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
/*
diff --git a/Build/source/texk/dvipdfm-x/src/mpost.c b/Build/source/texk/dvipdfm-x/src/mpost.c
index 2d610d1f158..703d0b45a36 100644
--- a/Build/source/texk/dvipdfm-x/src/mpost.c
+++ b/Build/source/texk/dvipdfm-x/src/mpost.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <ctype.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfcolor.c b/Build/source/texk/dvipdfm-x/src/pdfcolor.c
index 4aff0dd589b..7749ce6638a 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfcolor.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfcolor.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/pdfdev.c b/Build/source/texk/dvipdfm-x/src/pdfdev.c
index 79351aec34c..9d560bd4c20 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfdev.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfdev.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfdoc.c b/Build/source/texk/dvipdfm-x/src/pdfdoc.c
index 862789ec714..57b5b37c82d 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfdoc.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfdoc.c
@@ -26,8 +26,9 @@
* TODO: Many things...
* {begin,end}_{bead,article}, box stack, name tree (not limited to dests)...
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <time.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfdraw.c b/Build/source/texk/dvipdfm-x/src/pdfdraw.c
index de5b4dc7f11..6dc30e863d2 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfdraw.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfdraw.c
@@ -23,7 +23,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include <math.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfencrypt.c b/Build/source/texk/dvipdfm-x/src/pdfencrypt.c
index bd610d7a69b..3eb3c9ff020 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfencrypt.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfencrypt.c
@@ -20,8 +20,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <stdio.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfnames.c b/Build/source/texk/dvipdfm-x/src/pdfnames.c
index 28082c8b9a9..864910b3411 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfnames.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfnames.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <ctype.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfobj.c b/Build/source/texk/dvipdfm-x/src/pdfobj.c
index ba431d9be9a..82a10a0b504 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfobj.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfobj.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <ctype.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfparse.c b/Build/source/texk/dvipdfm-x/src/pdfparse.c
index 78c3fdd3455..f1218cb7bb8 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfparse.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfparse.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <ctype.h>
diff --git a/Build/source/texk/dvipdfm-x/src/pdfximage.c b/Build/source/texk/dvipdfm-x/src/pdfximage.c
index ff81ac697fb..5dad655a97a 100644
--- a/Build/source/texk/dvipdfm-x/src/pdfximage.c
+++ b/Build/source/texk/dvipdfm-x/src/pdfximage.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/pngimage.c b/Build/source/texk/dvipdfm-x/src/pngimage.c
index 2a835ae49f9..a7ecde3de53 100644
--- a/Build/source/texk/dvipdfm-x/src/pngimage.c
+++ b/Build/source/texk/dvipdfm-x/src/pngimage.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
/*
diff --git a/Build/source/texk/dvipdfm-x/src/pngimage.h b/Build/source/texk/dvipdfm-x/src/pngimage.h
index 04b4e478a71..dd5ffe572ae 100644
--- a/Build/source/texk/dvipdfm-x/src/pngimage.h
+++ b/Build/source/texk/dvipdfm-x/src/pngimage.h
@@ -26,10 +26,6 @@
#ifndef _PNGIMAGE_H_
#define _PNGIMAGE_H_
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#ifdef HAVE_LIBPNG
#include "mfileio.h"
diff --git a/Build/source/texk/dvipdfm-x/src/sfnt.c b/Build/source/texk/dvipdfm-x/src/sfnt.c
index 7f40f9e49d5..47627b9f501 100644
--- a/Build/source/texk/dvipdfm-x/src/sfnt.c
+++ b/Build/source/texk/dvipdfm-x/src/sfnt.c
@@ -23,8 +23,8 @@
/* Based on dvipdfmx-0.13.2c */
#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
+#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/spc_color.c b/Build/source/texk/dvipdfm-x/src/spc_color.c
index 6031948e1ab..94d3a0bd206 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_color.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_color.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/spc_dvips.c b/Build/source/texk/dvipdfm-x/src/spc_dvips.c
index 07ea009172e..8fd666d98fd 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_dvips.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_dvips.c
@@ -22,12 +22,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include <string.h>
-
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
+#include <string.h>
+
#include "system.h"
#include "mem.h"
#include "error.h"
diff --git a/Build/source/texk/dvipdfm-x/src/spc_html.c b/Build/source/texk/dvipdfm-x/src/spc_html.c
index c7a4d535b8e..6a533b5d41f 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_html.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_html.c
@@ -23,7 +23,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/spc_pdfm.c b/Build/source/texk/dvipdfm-x/src/spc_pdfm.c
index 6ae6a94fded..74a43d59f06 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_pdfm.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_pdfm.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <ctype.h>
diff --git a/Build/source/texk/dvipdfm-x/src/spc_tpic.c b/Build/source/texk/dvipdfm-x/src/spc_tpic.c
index d0a6e91c0f4..3da276d9f0e 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_tpic.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_tpic.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/spc_util.c b/Build/source/texk/dvipdfm-x/src/spc_util.c
index 83fc0651377..5bd3834e988 100644
--- a/Build/source/texk/dvipdfm-x/src/spc_util.c
+++ b/Build/source/texk/dvipdfm-x/src/spc_util.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/specials.c b/Build/source/texk/dvipdfm-x/src/specials.c
index dc5bf600028..e1cc2bb7a9f 100644
--- a/Build/source/texk/dvipdfm-x/src/specials.c
+++ b/Build/source/texk/dvipdfm-x/src/specials.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <stdarg.h>
diff --git a/Build/source/texk/dvipdfm-x/src/tfm.c b/Build/source/texk/dvipdfm-x/src/tfm.c
index a296b8848de..bd511450518 100644
--- a/Build/source/texk/dvipdfm-x/src/tfm.c
+++ b/Build/source/texk/dvipdfm-x/src/tfm.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/truetype.c b/Build/source/texk/dvipdfm-x/src/truetype.c
index 41d06e65b78..225c0b793d4 100644
--- a/Build/source/texk/dvipdfm-x/src/truetype.c
+++ b/Build/source/texk/dvipdfm-x/src/truetype.c
@@ -20,9 +20,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/tt_aux.c b/Build/source/texk/dvipdfm-x/src/tt_aux.c
index fc19300f431..09e92efefe3 100644
--- a/Build/source/texk/dvipdfm-x/src/tt_aux.c
+++ b/Build/source/texk/dvipdfm-x/src/tt_aux.c
@@ -21,8 +21,8 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
+#endif
#include "system.h"
#include "mem.h"
diff --git a/Build/source/texk/dvipdfm-x/src/tt_cmap.c b/Build/source/texk/dvipdfm-x/src/tt_cmap.c
index 6fad1352ded..1d7f34a6ccd 100644
--- a/Build/source/texk/dvipdfm-x/src/tt_cmap.c
+++ b/Build/source/texk/dvipdfm-x/src/tt_cmap.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/tt_glyf.c b/Build/source/texk/dvipdfm-x/src/tt_glyf.c
index 661ed8693ee..c01b7309a68 100644
--- a/Build/source/texk/dvipdfm-x/src/tt_glyf.c
+++ b/Build/source/texk/dvipdfm-x/src/tt_glyf.c
@@ -25,7 +25,9 @@
*
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "system.h"
#include "mem.h"
diff --git a/Build/source/texk/dvipdfm-x/src/tt_post.c b/Build/source/texk/dvipdfm-x/src/tt_post.c
index 46adba1afcf..d95bb577f38 100644
--- a/Build/source/texk/dvipdfm-x/src/tt_post.c
+++ b/Build/source/texk/dvipdfm-x/src/tt_post.c
@@ -20,6 +20,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "system.h"
#include "error.h"
#include "mem.h"
diff --git a/Build/source/texk/dvipdfm-x/src/tt_table.c b/Build/source/texk/dvipdfm-x/src/tt_table.c
index c14573d62b2..6ec43a0a1df 100644
--- a/Build/source/texk/dvipdfm-x/src/tt_table.c
+++ b/Build/source/texk/dvipdfm-x/src/tt_table.c
@@ -20,6 +20,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/type0.c b/Build/source/texk/dvipdfm-x/src/type0.c
index 0882175708d..b2b95898649 100644
--- a/Build/source/texk/dvipdfm-x/src/type0.c
+++ b/Build/source/texk/dvipdfm-x/src/type0.c
@@ -28,8 +28,8 @@
* Composite font (multiple descendants) - not supported in PDF
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/type1.c b/Build/source/texk/dvipdfm-x/src/type1.c
index fff0e44cab5..110bf7ffc6c 100644
--- a/Build/source/texk/dvipdfm-x/src/type1.c
+++ b/Build/source/texk/dvipdfm-x/src/type1.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/type1c.c b/Build/source/texk/dvipdfm-x/src/type1c.c
index 1c61ce24eaa..1bfbbb18730 100644
--- a/Build/source/texk/dvipdfm-x/src/type1c.c
+++ b/Build/source/texk/dvipdfm-x/src/type1c.c
@@ -34,8 +34,8 @@
*
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include <string.h>
diff --git a/Build/source/texk/dvipdfm-x/src/vf.c b/Build/source/texk/dvipdfm-x/src/vf.c
index 1d7f9e753f4..fa40ae9954a 100644
--- a/Build/source/texk/dvipdfm-x/src/vf.c
+++ b/Build/source/texk/dvipdfm-x/src/vf.c
@@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#if HAVE_CONFIG_H
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
#endif
#include "system.h"
diff --git a/Build/source/texk/dvipdfm-x/src/xbb.c b/Build/source/texk/dvipdfm-x/src/xbb.c
index c5fd0f22094..121ffab89c6 100644
--- a/Build/source/texk/dvipdfm-x/src/xbb.c
+++ b/Build/source/texk/dvipdfm-x/src/xbb.c
@@ -19,6 +19,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <stdio.h>
#include <time.h>
#include <string.h>
@@ -290,7 +294,7 @@ int extractbb (int argc, char *argv[])
break;
case 'q':
really_quiet = 1;
- shut_up();
+ shut_up(1);
argc -= 1; argv += 1;
break;
case 'b':