Commit 46380d36 authored by Albert Astals Cid's avatar Albert Astals Cid

i didn't want to commit this

parent 1844e092
......@@ -109,35 +109,6 @@ fi
dnl ##### Checks for library functions.
AC_CHECK_FUNCS(popen mkstemp mkstemps)
dnl Test for libopenjpeg
AC_ARG_ENABLE(libopenjpeg,
AC_HELP_STRING([--disable-libopenjpeg],
[Don't build against libopenjpeg.]),
enable_libopenjpeg=$enableval,
enable_libopenjpeg="try")
if test x$enable_libopenjpeg = xyes; then
AC_CHECK_LIB([openjpeg], [opj_cio_open],,
AC_MSG_ERROR("*** libopenjpeg library not found ***"))
AC_CHECK_HEADERS([openjpeg.h],,
AC_MSG_ERROR("*** libopenjpeg headers not found ***"))
elif test x$enable_libopenjpeg = xtry; then
AC_CHECK_LIB([openjpeg], [opj_cio_open],
[enable_libopenjpeg="yes"],
[enable_libopenjpeg="no"])
AC_CHECK_HEADERS([openjpeg.h],,
[enable_libopenjpeg="no"])
fi
if test x$enable_libopenjpeg = xyes; then
LIBOPENJPEG_LIBS="-lopenjpeg"
AC_SUBST(LIBOPENJPEG_LIBS)
AC_DEFINE(ENABLE_LIBOPENJPEG)
fi
AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes)
AH_TEMPLATE([ENABLE_LIBOPENJPEG],
[Use libopenjpeg instead of builtin jpeg2000 decoder.])
dnl ##### Back to C for the library tests.
AC_LANG_C
......@@ -179,6 +150,37 @@ AH_TEMPLATE([ENABLE_ZLIB],
[Use zlib instead of builtin zlib decoder.])
dnl Test for libopenjpeg
AC_ARG_ENABLE(libopenjpeg,
AC_HELP_STRING([--disable-libopenjpeg],
[Don't build against libopenjpeg.]),
enable_libopenjpeg=$enableval,
enable_libopenjpeg="try")
if test x$enable_libopenjpeg = xyes; then
AC_CHECK_LIB([openjpeg], [opj_cio_open],,
AC_MSG_ERROR("*** libopenjpeg library not found ***"))
AC_CHECK_HEADERS([openjpeg.h],,
AC_MSG_ERROR("*** libopenjpeg headers not found ***"))
elif test x$enable_libopenjpeg = xtry; then
AC_CHECK_LIB([openjpeg], [opj_cio_open],
[enable_libopenjpeg="yes"],
[enable_libopenjpeg="no"])
AC_CHECK_HEADERS([openjpeg.h],,
[enable_libopenjpeg="no"])
fi
if test x$enable_libopenjpeg = xyes; then
LIBOPENJPEG_LIBS="-lopenjpeg"
AC_SUBST(LIBOPENJPEG_LIBS)
AC_DEFINE(ENABLE_LIBOPENJPEG)
fi
AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes)
AH_TEMPLATE([ENABLE_LIBOPENJPEG],
[Use libopenjpeg instead of builtin jpeg2000 decoder.])
dnl Test for libjpeg
AC_ARG_ENABLE(libjpeg,
AC_HELP_STRING([--disable-libjpeg],
......
......@@ -26,8 +26,7 @@ static inline int splashFloor(SplashCoord x) {
#if USE_FIXEDPOINT
return FixedPoint::floor(x);
#else
if (x > 0) return (int)x;
else return (int)floor(x);
return (int)floor(x);
#endif
}
......@@ -43,7 +42,7 @@ static inline int splashRound(SplashCoord x) {
#if USE_FIXEDPOINT
return FixedPoint::round(x);
#else
return (int)splashFloor(x + 0.5);
return (int)floor(x + 0.5);
#endif
}
......
......@@ -42,8 +42,6 @@
static int firstPage = 1;
static int lastPage = 0;
static GBool printOnlyOdd = gFalse;
static GBool printOnlyEven = gFalse;
static double resolution = 0.0;
static double x_resolution = 150.0;
static double y_resolution = 150.0;
......@@ -74,10 +72,6 @@ static const ArgDesc argDesc[] = {
"first page to print"},
{"-l", argInt, &lastPage, 0,
"last page to print"},
{"-o", argFlag, &printOnlyOdd, 0,
"print only odd pages"},
{"-e", argFlag, &printOnlyEven, 0,
"print only even pages"},
{"-r", argFP, &resolution, 0,
"resolution, in DPI (default is 150)"},
......@@ -290,8 +284,6 @@ int main(int argc, char *argv[]) {
if (sz != 0) w = h = sz;
pg_num_len = (int)ceil(log((double)doc->getNumPages()) / log((double)10));
for (pg = firstPage; pg <= lastPage; ++pg) {
if (printOnlyEven && pg % 2 == 0) continue;
if (printOnlyOdd && pg % 2 == 1) continue;
if (useCropBox) {
pg_w = doc->getPageCropWidth(pg);
pg_h = doc->getPageCropHeight(pg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment