summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/numbers.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-20 10:46:22 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-08-20 10:46:22 +0000
commit418eab4ae66c2d3f4d636feda4aa6e61bffad7f2 (patch)
tree68bcb3aaa4a67a9b58d5ec79bc62af9fe85e4fc0 /Build/source/texk/dvipdfm-x/numbers.c
parent53c39c070e16923aa7b27141d330883eee19f7eb (diff)
texk/dvipdfm-x: Simplify handling of DVI commands. Clarify signed vs unsigned four byte numbers
git-svn-id: svn://tug.org/texlive/trunk@34990 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/numbers.c')
-rw-r--r--Build/source/texk/dvipdfm-x/numbers.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/Build/source/texk/dvipdfm-x/numbers.c b/Build/source/texk/dvipdfm-x/numbers.c
index 35f19cd3975..bedc76c6e9e 100644
--- a/Build/source/texk/dvipdfm-x/numbers.c
+++ b/Build/source/texk/dvipdfm-x/numbers.c
@@ -37,13 +37,6 @@ UNSIGNED_BYTE get_unsigned_byte (FILE *file)
return (UNSIGNED_BYTE) ch;
}
-#if 0
-UNSIGNED_BYTE sget_unsigned_byte (char *s)
-{
- return *((unsigned char *) s);
-}
-#endif
-
SIGNED_BYTE get_signed_byte (FILE *file)
{
int byte;
@@ -172,59 +165,3 @@ SIGNED_QUAD sqxfw (SIGNED_QUAD sq, fixword fw)
return (sign > 0) ? result : result * -1L;
}
-#if 0
-SIGNED_QUAD axboverc (SIGNED_QUAD n1, SIGNED_QUAD n2, SIGNED_QUAD divide)
-{
- int sign = 1;
- unsigned long a, b, c, d, ad, bd, bc, ac, e, f, g, h, i, j, o;
- unsigned long high, low;
- SIGNED_QUAD result = 0;
- /* Make positive. */
- if (n1 < 0) {
- sign = -sign;
- n1 = -n1;
- }
- if (n2 < 0) {
- sign = -sign;
- n2 = -n2;
- }
- if (divide < 0) {
- sign = -sign;
- divide = -divide;
- }
- a = ((unsigned long) n1) >> 16u;
- b = ((unsigned long) n1) & 0xffffu;
- c = ((unsigned long) n2) >> 16u;
- d = ((unsigned long) n2) & 0xffffu;
- ad = a*d; bd = b*d; bc = b*c; ac = a*c;
- e = bd >> 16u; f = bd & 0xffffu;
- g = ad >> 16u; h = ad & 0xffffu;
- i = bc >> 16u; j = bc & 0xffffu;
- o = e+h+j;
- high = g+i+(o>>16u)+ac; o &= 0xffffu;
- low = (o << 16) + f;
- if (high >= divide)
- ERROR ("Overflow in axboc");
- {
- int k;
- for (k=0; k<32; k++) {
- high *= 2;
- result *= 2;
- if (low >= 0x80000000) {
- low -= 0x80000000;
- high += 1;
- }
- low *= 2;
- if (high > divide) {
- high -= divide;
- result += 1;
- }
- }
- }
- high *= 2;
- if (high >= divide)
- result += 1;
- return (sign>0)?result:-result;
-}
-#endif
-