summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'fitz')
-rw-r--r--fitz/base_cpudep.c4
-rw-r--r--fitz/base_matrix.c34
-rw-r--r--fitz/base_unicode.c77
-rw-r--r--fitz/crypt_arc4.c10
-rw-r--r--fitz/crypt_md5.c8
-rw-r--r--fitz/filt_faxdtab.c9
-rw-r--r--fitz/filt_jbig2d.c16
-rw-r--r--fitz/filt_predict.c6
-rw-r--r--fitz/res_font.c8
-rw-r--r--fitz/res_shade.c14
-rw-r--r--fitz/util_gettimeofday.c10
11 files changed, 98 insertions, 98 deletions
diff --git a/fitz/base_cpudep.c b/fitz/base_cpudep.c
index f17d6a25..586a478a 100644
--- a/fitz/base_cpudep.c
+++ b/fitz/base_cpudep.c
@@ -53,7 +53,7 @@ static void mmx(void)
static void m3dnow(void)
{ __asm__ ("pavgusb %mm0, %mm0\n\t"); }
-static void mmxext(void) /* aka Extended 3DNow! */
+static void mmxext(void) /* aka Extended 3DNow! */
{ __asm__ ("pmaxsw %mm0, %mm0\n\t"); }
static void sse(void)
@@ -73,7 +73,7 @@ static void mmx(void)
static void m3dnow(void)
{ __asm pavgusb mm0, mm0; }
-static void mmxext(void) /* aka Extended 3DNow! */
+static void mmxext(void) /* aka Extended 3DNow! */
{ __asm pmaxsw mm0, mm0; }
static void sse(void)
diff --git a/fitz/base_matrix.c b/fitz/base_matrix.c
index 7124ad0d..7fd6009b 100644
--- a/fitz/base_matrix.c
+++ b/fitz/base_matrix.c
@@ -22,17 +22,17 @@ void fz_invert3x3(float *dst, float *m)
det = 1;
det = 1 / det;
- M3(dst,0,0) = M3(m,1,1) * M3(m,2,2) - M3(m,1,2) * M3(m,2,1);
+ M3(dst,0,0) = M3(m,1,1) * M3(m,2,2) - M3(m,1,2) * M3(m,2,1);
M3(dst,0,1) = -M3(m,0,1) * M3(m,2,2) + M3(m,0,2) * M3(m,2,1);
- M3(dst,0,2) = M3(m,0,1) * M3(m,1,2) - M3(m,0,2) * M3(m,1,1);
+ M3(dst,0,2) = M3(m,0,1) * M3(m,1,2) - M3(m,0,2) * M3(m,1,1);
M3(dst,1,0) = -M3(m,1,0) * M3(m,2,2) + M3(m,1,2) * M3(m,2,0);
- M3(dst,1,1) = M3(m,0,0) * M3(m,2,2) - M3(m,0,2) * M3(m,2,0);
+ M3(dst,1,1) = M3(m,0,0) * M3(m,2,2) - M3(m,0,2) * M3(m,2,0);
M3(dst,1,2) = -M3(m,0,0) * M3(m,1,2) + M3(m,0,2) * M3(m,1,0);
- M3(dst,2,0) = M3(m,1,0) * M3(m,2,1) - M3(m,1,1) * M3(m,2,0);
+ M3(dst,2,0) = M3(m,1,0) * M3(m,2,1) - M3(m,1,1) * M3(m,2,0);
M3(dst,2,1) = -M3(m,0,0) * M3(m,2,1) + M3(m,0,1) * M3(m,2,0);
- M3(dst,2,2) = M3(m,0,0) * M3(m,1,1) - M3(m,0,1) * M3(m,1,0);
+ M3(dst,2,2) = M3(m,0,0) * M3(m,1,1) - M3(m,0,1) * M3(m,1,0);
for (i = 0; i < 9; i++)
dst[i] *= det;
@@ -55,9 +55,9 @@ fz_matrix
fz_identity(void)
{
fz_matrix m;
- m.a = 1; m.b = 0;
- m.c = 0; m.d = 1;
- m.e = 0; m.f = 0;
+ m.a = 1; m.b = 0;
+ m.c = 0; m.d = 1;
+ m.e = 0; m.f = 0;
return m;
}
@@ -65,9 +65,9 @@ fz_matrix
fz_scale(float sx, float sy)
{
fz_matrix m;
- m.a = sx; m.b = 0;
- m.c = 0; m.d = sy;
- m.e = 0; m.f = 0;
+ m.a = sx; m.b = 0;
+ m.c = 0; m.d = sy;
+ m.e = 0; m.f = 0;
return m;
}
@@ -109,9 +109,9 @@ fz_rotate(float theta)
c = cosf(theta * (float)M_PI / 180);
}
- m.a = c; m.b = s;
- m.c = -s; m.d = c;
- m.e = 0; m.f = 0;
+ m.a = c; m.b = s;
+ m.c = -s; m.d = c;
+ m.e = 0; m.f = 0;
return m;
}
@@ -119,9 +119,9 @@ fz_matrix
fz_translate(float tx, float ty)
{
fz_matrix m;
- m.a = 1; m.b = 0;
- m.c = 0; m.d = 1;
- m.e = tx; m.f = ty;
+ m.a = 1; m.b = 0;
+ m.c = 0; m.d = 1;
+ m.e = tx; m.f = ty;
return m;
}
diff --git a/fitz/base_unicode.c b/fitz/base_unicode.c
index a38dfb84..c7f8219a 100644
--- a/fitz/base_unicode.c
+++ b/fitz/base_unicode.c
@@ -2,39 +2,38 @@
enum
{
- UTFmax = 4, /* maximum bytes per rune */
- Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */
- Runeself = 0x80, /* rune and UTF sequences are the same (<) */
- Runeerror = 0xFFFD, /* decoding error in UTF */
- Runemax = 0x10FFFF, /* maximum rune value */
+ UTFmax = 4, /* maximum bytes per rune */
+ Runesync = 0x80, /* cannot represent part of a UTF sequence (<) */
+ Runeself = 0x80, /* rune and UTF sequences are the same (<) */
+ Runeerror = 0xFFFD, /* decoding error in UTF */
+ Runemax = 0x10FFFF, /* maximum rune value */
};
enum
{
- Bit1 = 7,
- Bitx = 6,
- Bit2 = 5,
- Bit3 = 4,
- Bit4 = 3,
- Bit5 = 2,
-
- T1 = ((1<<(Bit1+1))-1) ^ 0xFF, /* 0000 0000 */
- Tx = ((1<<(Bitx+1))-1) ^ 0xFF, /* 1000 0000 */
- T2 = ((1<<(Bit2+1))-1) ^ 0xFF, /* 1100 0000 */
- T3 = ((1<<(Bit3+1))-1) ^ 0xFF, /* 1110 0000 */
- T4 = ((1<<(Bit4+1))-1) ^ 0xFF, /* 1111 0000 */
- T5 = ((1<<(Bit5+1))-1) ^ 0xFF, /* 1111 1000 */
-
- Rune1 = (1<<(Bit1+0*Bitx))-1, /* 0000 0000 0111 1111 */
- Rune2 = (1<<(Bit2+1*Bitx))-1, /* 0000 0111 1111 1111 */
- Rune3 = (1<<(Bit3+2*Bitx))-1, /* 1111 1111 1111 1111 */
- Rune4 = (1<<(Bit4+3*Bitx))-1,
- /* 0001 1111 1111 1111 1111 1111 */
-
- Maskx = (1<<Bitx)-1, /* 0011 1111 */
- Testx = Maskx ^ 0xFF, /* 1100 0000 */
-
- Bad = Runeerror,
+ Bit1 = 7,
+ Bitx = 6,
+ Bit2 = 5,
+ Bit3 = 4,
+ Bit4 = 3,
+ Bit5 = 2,
+
+ T1 = ((1<<(Bit1+1))-1) ^ 0xFF, /* 0000 0000 */
+ Tx = ((1<<(Bitx+1))-1) ^ 0xFF, /* 1000 0000 */
+ T2 = ((1<<(Bit2+1))-1) ^ 0xFF, /* 1100 0000 */
+ T3 = ((1<<(Bit3+1))-1) ^ 0xFF, /* 1110 0000 */
+ T4 = ((1<<(Bit4+1))-1) ^ 0xFF, /* 1111 0000 */
+ T5 = ((1<<(Bit5+1))-1) ^ 0xFF, /* 1111 1000 */
+
+ Rune1 = (1<<(Bit1+0*Bitx))-1, /* 0000 0000 0111 1111 */
+ Rune2 = (1<<(Bit2+1*Bitx))-1, /* 0000 0111 1111 1111 */
+ Rune3 = (1<<(Bit3+2*Bitx))-1, /* 1111 1111 1111 1111 */
+ Rune4 = (1<<(Bit4+3*Bitx))-1, /* 0001 1111 1111 1111 1111 1111 */
+
+ Maskx = (1<<Bitx)-1, /* 0011 1111 */
+ Testx = Maskx ^ 0xFF, /* 1100 0000 */
+
+ Bad = Runeerror,
};
int
@@ -45,7 +44,7 @@ chartorune(int *rune, char *str)
/*
* one character sequence
- * 00000-0007F => T1
+ * 00000-0007F => T1
*/
c = *(unsigned char*)str;
if(c < Tx) {
@@ -55,7 +54,7 @@ chartorune(int *rune, char *str)
/*
* two character sequence
- * 0080-07FF => T2 Tx
+ * 0080-07FF => T2 Tx
*/
c1 = *(unsigned char*)(str+1) ^ Tx;
if(c1 & Testx)
@@ -72,7 +71,7 @@ chartorune(int *rune, char *str)
/*
* three character sequence
- * 0800-FFFF => T3 Tx Tx
+ * 0800-FFFF => T3 Tx Tx
*/
c2 = *(unsigned char*)(str+2) ^ Tx;
if(c2 & Testx)
@@ -87,7 +86,7 @@ chartorune(int *rune, char *str)
/*
* four character sequence (21-bit value)
- * 10000-1FFFFF => T4 Tx Tx Tx
+ * 10000-1FFFFF => T4 Tx Tx Tx
*/
c3 = *(unsigned char*)(str+3) ^ Tx;
if (c3 & Testx)
@@ -121,7 +120,7 @@ runetochar(char *str, int *rune)
/*
* one character sequence
- * 00000-0007F => 00-7F
+ * 00000-0007F => 00-7F
*/
c = *rune;
if(c <= Rune1) {
@@ -131,7 +130,7 @@ runetochar(char *str, int *rune)
/*
* two character sequence
- * 0080-07FF => T2 Tx
+ * 0080-07FF => T2 Tx
*/
if(c <= Rune2) {
str[0] = T2 | (c >> 1*Bitx);
@@ -150,18 +149,18 @@ runetochar(char *str, int *rune)
/*
* three character sequence
- * 0800-FFFF => T3 Tx Tx
+ * 0800-FFFF => T3 Tx Tx
*/
if (c <= Rune3) {
- str[0] = T3 | (c >> 2*Bitx);
+ str[0] = T3 | (c >> 2*Bitx);
str[1] = Tx | ((c >> 1*Bitx) & Maskx);
- str[2] = Tx | (c & Maskx);
+ str[2] = Tx | (c & Maskx);
return 3;
}
/*
* four character sequence (21-bit value)
- * 10000-1FFFFF => T4 Tx Tx Tx
+ * 10000-1FFFFF => T4 Tx Tx Tx
*/
str[0] = T4 | (c >> 3*Bitx);
str[1] = Tx | ((c >> 2*Bitx) & Maskx);
diff --git a/fitz/crypt_arc4.c b/fitz/crypt_arc4.c
index f53505cf..475c5f89 100644
--- a/fitz/crypt_arc4.c
+++ b/fitz/crypt_arc4.c
@@ -1,7 +1,7 @@
-/* This code illustrates a sample implementation
- * of the Arcfour algorithm
- * Copyright (c) April 29, 1997 Kalle Kaukonen.
- * All Rights Reserved.
+/* This code illustrates a sample implementation
+ * of the Arcfour algorithm
+ * Copyright (c) April 29, 1997 Kalle Kaukonen.
+ * All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that this copyright
@@ -10,7 +10,7 @@
* THIS SOFTWARE IS PROVIDED BY KALLE KAUKONEN AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KALLE
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KALLE
* KAUKONEN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
diff --git a/fitz/crypt_md5.c b/fitz/crypt_md5.c
index 37f0822a..0a2dc798 100644
--- a/fitz/crypt_md5.c
+++ b/fitz/crypt_md5.c
@@ -29,7 +29,7 @@ documentation and/or software.
enum
{
S11 = 7, S12 = 12, S13 = 17, S14 = 22,
- S21 = 5, S22 = 9, S23 = 14, S24 = 20,
+ S21 = 5, S22 = 9, S23 = 14, S24 = 20,
S31 = 4, S32 = 11, S33 = 16, S34 = 23,
S41 = 6, S42 = 10, S43 = 15, S44 = 21
};
@@ -138,7 +138,7 @@ static void transform(unsigned int state[4], const unsigned char block[64])
GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
+ GG (d, a, b, c, x[10], S22, 0x02441453); /* 22 */
GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
@@ -162,7 +162,7 @@ static void transform(unsigned int state[4], const unsigned char block[64])
HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
+ HH (b, c, d, a, x[ 6], S34, 0x04881d05); /* 44 */
HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
@@ -225,7 +225,7 @@ void fz_md5update(fz_md5 *context, const unsigned char *input, const unsigned in
partlen = 64 - index;
- /* Transform as many times as possible. */
+ /* Transform as many times as possible. */
if (inlen >= partlen)
{
memcpy(context->buffer + index, input, partlen);
diff --git a/fitz/filt_faxdtab.c b/fitz/filt_faxdtab.c
index 6efcf053..b1ad0b25 100644
--- a/fitz/filt_faxdtab.c
+++ b/fitz/filt_faxdtab.c
@@ -1,8 +1,9 @@
/* Tables for CCITTFaxDecode filter. */
-
-/* This file was generated automatically. It is governed by the same terms */
-/* as the files scfetab.c and scfdgen.c from which it was derived. */
-/* Consult those files for the licensing terms and conditions. */
+/*
+This file was generated automatically. It is governed by the same terms
+as the files scfetab.c and scfdgen.c from which it was derived.
+Consult those files for the licensing terms and conditions.
+*/
#include "filt_faxd.h"
diff --git a/fitz/filt_jbig2d.c b/fitz/filt_jbig2d.c
index 39015279..100eba05 100644
--- a/fitz/filt_jbig2d.c
+++ b/fitz/filt_jbig2d.c
@@ -14,14 +14,14 @@
#ifdef _WIN32 /* Microsoft Visual C++ */
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef __int64 int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
+typedef signed char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef __int64 int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
#else
#include <inttypes.h>
diff --git a/fitz/filt_predict.c b/fitz/filt_predict.c
index 07470647..32a9c8d9 100644
--- a/fitz/filt_predict.c
+++ b/fitz/filt_predict.c
@@ -176,7 +176,7 @@ fz_predictpng(fz_predict *p, unsigned char *in, unsigned char *out, int predicto
}
for (i = p->stride - bpp; i > 0; i--)
{
- *out++ = *in++ + *ref++;
+ *out++ = *in++ + *ref++;
}
break;
case 3:
@@ -186,8 +186,8 @@ fz_predictpng(fz_predict *p, unsigned char *in, unsigned char *out, int predicto
}
for (i = p->stride - bpp; i > 0; i--)
{
- *out = *in++ + (out[-bpp] + *ref++)/2;
- out++;
+ *out = *in++ + (out[-bpp] + *ref++)/2;
+ out++;
}
break;
case 4:
diff --git a/fitz/res_font.c b/fitz/res_font.c
index 933b732e..448484c9 100644
--- a/fitz/res_font.c
+++ b/fitz/res_font.c
@@ -392,19 +392,19 @@ fz_debugfont(fz_font *font)
if (font->ftface)
{
- printf(" freetype face %p\n", font->ftface);
+ printf("\tfreetype face %p\n", font->ftface);
if (font->ftsubstitute)
- printf(" substitute font\n");
+ printf("\tsubstitute font\n");
}
if (font->t3procs)
{
- printf(" type3 matrix [%g %g %g %g]\n",
+ printf("\ttype3 matrix [%g %g %g %g]\n",
font->t3matrix.a, font->t3matrix.b,
font->t3matrix.c, font->t3matrix.d);
}
- printf(" bbox [%g %g %g %g]\n",
+ printf("\tbbox [%g %g %g %g]\n",
font->bbox.x0, font->bbox.y0,
font->bbox.x1, font->bbox.y1);
diff --git a/fitz/res_shade.c b/fitz/res_shade.c
index 4e646997..61b2f3a4 100644
--- a/fitz/res_shade.c
+++ b/fitz/res_shade.c
@@ -35,19 +35,19 @@ fz_debugshade(fz_shade *shade)
printf("shading {\n");
- printf(" bbox [%g %g %g %g]\n",
+ printf("\tbbox [%g %g %g %g]\n",
shade->bbox.x0, shade->bbox.y0,
shade->bbox.x1, shade->bbox.y1);
- printf(" colorspace %s\n", shade->cs->name);
+ printf("\tcolorspace %s\n", shade->cs->name);
- printf(" matrix [%g %g %g %g %g %g]\n",
+ printf("\tmatrix [%g %g %g %g %g %g]\n",
shade->matrix.a, shade->matrix.b, shade->matrix.c,
shade->matrix.d, shade->matrix.e, shade->matrix.f);
if (shade->usebackground)
{
- printf(" background [");
+ printf("\tbackground [");
for (i = 0; i < shade->cs->n; i++)
printf("%s%g", i == 0 ? "" : " ", shade->background[i]);
printf("]\n");
@@ -55,20 +55,20 @@ fz_debugshade(fz_shade *shade)
if (shade->usefunction)
{
- printf(" function\n");
+ printf("\tfunction\n");
n = 3;
}
else
n = 2 + shade->cs->n;
- printf(" triangles: %d\n", shade->meshlen);
+ printf("\ttriangles: %d\n", shade->meshlen);
vertex = shade->mesh;
triangle = 0;
i = 0;
while (i < shade->meshlen * 3)
{
- printf(" %d:(%g, %g): ", triangle, vertex[0], vertex[1]);
+ printf("\t%d:(%g, %g): ", triangle, vertex[0], vertex[1]);
for (j = 2; j < n; j++)
printf("%s%g", j == 2 ? "" : " ", vertex[j]);
diff --git a/fitz/util_gettimeofday.c b/fitz/util_gettimeofday.c
index 21f62f26..c016902e 100644
--- a/fitz/util_gettimeofday.c
+++ b/fitz/util_gettimeofday.c
@@ -5,15 +5,15 @@
#include <windows.h>
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
-#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
#else
-#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
#endif
struct timezone
{
- int tz_minuteswest; /* minutes W of Greenwich */
- int tz_dsttime; /* type of dst correction */
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
};
int gettimeofday(struct timeval *tv, struct timezone *tz)
@@ -30,7 +30,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz)
tmpres <<= 32;
tmpres |= ft.dwLowDateTime;
- tmpres /= 10; /*convert into microseconds*/
+ tmpres /= 10; /*convert into microseconds*/
/*converting file time to unix epoch*/
tmpres -= DELTA_EPOCH_IN_MICROSECS;
tv->tv_sec = (long)(tmpres / 1000000UL);