Update to xpr 1.0.3

This commit is contained in:
matthieu 2009-10-24 15:05:16 +00:00
parent 430009b415
commit a97776ca7f
12 changed files with 4310 additions and 2574 deletions

View File

@ -1,3 +1,47 @@
commit ae7e1530f9e60e9a8747a1d4c38579510675f023
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Oct 16 19:13:21 2009 -0700
xpr 1.0.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit b4d488d7586892cfb8199b82a27f982a1717be66
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Oct 16 19:12:22 2009 -0700
Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit 304cd93438d75fe8b6964fe5a7bb077f031cac9e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Thu Oct 1 14:54:29 2009 -0700
Add README with pointers to mailing lists, bugzilla, & git
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
commit f53142c6882f08b646ebe6d614bb6f14d5dcdb57
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Thu Jan 22 17:34:02 2009 -0200
Correct make distcheck and most gcc/sparse warnings.
Remaining warnings are due to bit/shift operations mixed with
addition/multiplication/etc. "1<<2-1" should be read as
"1 << (2 - 1)", and not "(1 << 2) - 1". The first 2 warnings
appear to be for a confusing case, as a few lines bellow
it is adding parenthesis to the shift operation, but should be
being parsed correctly (not added parenthesis to avoid the
adding them wrong, and "hiding" the warning...)
commit bee786458655a081487f2caff112f85aa0c3c8de
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Dec 6 15:51:08 2007 -0500
Add missing PHONY line for automatic ChangeLog generation
commit cceb5d7387f8dcc39000f8e27b82230e9a8f5019 commit cceb5d7387f8dcc39000f8e27b82230e9a8f5019
Author: Alan Coopersmith <alan.coopersmith@sun.com> Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Sat Jan 27 23:50:00 2007 -0800 Date: Sat Jan 27 23:50:00 2007 -0800

View File

@ -21,7 +21,7 @@
bin_PROGRAMS = xpr bin_PROGRAMS = xpr
xpr_CFLAGS = $(XPR_CFLAGS) -DNOINLINE AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
xpr_LDADD = $(XPR_LIBS) -lm xpr_LDADD = $(XPR_LIBS) -lm
xpr_SOURCES = \ xpr_SOURCES = \
@ -40,7 +40,7 @@ appman_PRE = \
bin_SCRIPTS = xdpr bin_SCRIPTS = xdpr
xdpr: xdpr.script xdpr: xdpr.script
cp $(top_srcdir)/xdpr.script xdpr $(AM_V_GEN)cp $(top_srcdir)/xdpr.script xdpr
CLEANFILES = xdpr CLEANFILES = xdpr
@ -48,8 +48,10 @@ EXTRA_DIST = xdpr.script ChangeLog autogen.sh
MAINTAINERCLEANFILES=ChangeLog MAINTAINERCLEANFILES=ChangeLog
.PHONY: ChangeLog
ChangeLog: ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) $(CHANGELOG_CMD)
dist-hook: ChangeLog dist-hook: ChangeLog
@ -82,4 +84,4 @@ MAN_SUBSTS = \
SUFFIXES = .$(APP_MAN_SUFFIX) .man SUFFIXES = .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX): .man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@

View File

@ -63,7 +63,7 @@ bin_PROGRAMS = xpr$(EXEEXT)
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
compile config.guess config.sub depcomp install-sh missing config.guess config.sub depcomp install-sh missing
subdir = . subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@ -78,8 +78,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(appmandir)" "$(DESTDIR)$(appmandir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS) PROGRAMS = $(bin_PROGRAMS)
am_xpr_OBJECTS = xpr-x2jet.$(OBJEXT) xpr-x2pmp.$(OBJEXT) \ am_xpr_OBJECTS = x2jet.$(OBJEXT) x2pmp.$(OBJEXT) xpr.$(OBJEXT)
xpr-xpr.$(OBJEXT)
xpr_OBJECTS = $(am_xpr_OBJECTS) xpr_OBJECTS = $(am_xpr_OBJECTS)
am__DEPENDENCIES_1 = am__DEPENDENCIES_1 =
xpr_DEPENDENCIES = $(am__DEPENDENCIES_1) xpr_DEPENDENCIES = $(am__DEPENDENCIES_1)
@ -114,7 +113,6 @@ am__remove_distdir = \
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
@ -130,7 +128,10 @@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
@ -139,9 +140,11 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -174,8 +177,6 @@ VERSION = @VERSION@
XPR_CFLAGS = @XPR_CFLAGS@ XPR_CFLAGS = @XPR_CFLAGS@
XPR_LIBS = @XPR_LIBS@ XPR_LIBS = @XPR_LIBS@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@ am__include = @am__include@
@ -190,28 +191,36 @@ build_cpu = @build_cpu@
build_os = @build_os@ build_os = @build_os@
build_vendor = @build_vendor@ build_vendor = @build_vendor@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host = @host@ host = @host@
host_alias = @host_alias@ host_alias = @host_alias@
host_cpu = @host_cpu@ host_cpu = @host_cpu@
host_os = @host_os@ host_os = @host_os@
host_vendor = @host_vendor@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@ includedir = @includedir@
infodir = @infodir@ infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
mandir = @mandir@ mandir = @mandir@
mkdir_p = @mkdir_p@ mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
program_transform_name = @program_transform_name@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
xpr_CFLAGS = $(XPR_CFLAGS) -DNOINLINE AM_CFLAGS = $(CWARNFLAGS) $(XPR_CFLAGS) -DNOINLINE
xpr_LDADD = $(XPR_LIBS) -lm xpr_LDADD = $(XPR_LIBS) -lm
xpr_SOURCES = \ xpr_SOURCES = \
lncmd.h \ lncmd.h \
@ -357,9 +366,9 @@ mostlyclean-compile:
distclean-compile: distclean-compile:
-rm -f *.tab.c -rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpr-x2jet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x2jet.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpr-x2pmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x2pmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpr-xpr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpr.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@ -374,48 +383,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
xpr-x2jet.o: x2jet.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-x2jet.o -MD -MP -MF "$(DEPDIR)/xpr-x2jet.Tpo" -c -o xpr-x2jet.o `test -f 'x2jet.c' || echo '$(srcdir)/'`x2jet.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-x2jet.Tpo" "$(DEPDIR)/xpr-x2jet.Po"; else rm -f "$(DEPDIR)/xpr-x2jet.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x2jet.c' object='xpr-x2jet.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-x2jet.o `test -f 'x2jet.c' || echo '$(srcdir)/'`x2jet.c
xpr-x2jet.obj: x2jet.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-x2jet.obj -MD -MP -MF "$(DEPDIR)/xpr-x2jet.Tpo" -c -o xpr-x2jet.obj `if test -f 'x2jet.c'; then $(CYGPATH_W) 'x2jet.c'; else $(CYGPATH_W) '$(srcdir)/x2jet.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-x2jet.Tpo" "$(DEPDIR)/xpr-x2jet.Po"; else rm -f "$(DEPDIR)/xpr-x2jet.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x2jet.c' object='xpr-x2jet.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-x2jet.obj `if test -f 'x2jet.c'; then $(CYGPATH_W) 'x2jet.c'; else $(CYGPATH_W) '$(srcdir)/x2jet.c'; fi`
xpr-x2pmp.o: x2pmp.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-x2pmp.o -MD -MP -MF "$(DEPDIR)/xpr-x2pmp.Tpo" -c -o xpr-x2pmp.o `test -f 'x2pmp.c' || echo '$(srcdir)/'`x2pmp.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-x2pmp.Tpo" "$(DEPDIR)/xpr-x2pmp.Po"; else rm -f "$(DEPDIR)/xpr-x2pmp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x2pmp.c' object='xpr-x2pmp.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-x2pmp.o `test -f 'x2pmp.c' || echo '$(srcdir)/'`x2pmp.c
xpr-x2pmp.obj: x2pmp.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-x2pmp.obj -MD -MP -MF "$(DEPDIR)/xpr-x2pmp.Tpo" -c -o xpr-x2pmp.obj `if test -f 'x2pmp.c'; then $(CYGPATH_W) 'x2pmp.c'; else $(CYGPATH_W) '$(srcdir)/x2pmp.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-x2pmp.Tpo" "$(DEPDIR)/xpr-x2pmp.Po"; else rm -f "$(DEPDIR)/xpr-x2pmp.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='x2pmp.c' object='xpr-x2pmp.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-x2pmp.obj `if test -f 'x2pmp.c'; then $(CYGPATH_W) 'x2pmp.c'; else $(CYGPATH_W) '$(srcdir)/x2pmp.c'; fi`
xpr-xpr.o: xpr.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-xpr.o -MD -MP -MF "$(DEPDIR)/xpr-xpr.Tpo" -c -o xpr-xpr.o `test -f 'xpr.c' || echo '$(srcdir)/'`xpr.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-xpr.Tpo" "$(DEPDIR)/xpr-xpr.Po"; else rm -f "$(DEPDIR)/xpr-xpr.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xpr.c' object='xpr-xpr.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-xpr.o `test -f 'xpr.c' || echo '$(srcdir)/'`xpr.c
xpr-xpr.obj: xpr.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -MT xpr-xpr.obj -MD -MP -MF "$(DEPDIR)/xpr-xpr.Tpo" -c -o xpr-xpr.obj `if test -f 'xpr.c'; then $(CYGPATH_W) 'xpr.c'; else $(CYGPATH_W) '$(srcdir)/xpr.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xpr-xpr.Tpo" "$(DEPDIR)/xpr-xpr.Po"; else rm -f "$(DEPDIR)/xpr-xpr.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xpr.c' object='xpr-xpr.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xpr_CFLAGS) $(CFLAGS) -c -o xpr-xpr.obj `if test -f 'xpr.c'; then $(CYGPATH_W) 'xpr.c'; else $(CYGPATH_W) '$(srcdir)/xpr.c'; fi`
uninstall-info-am: uninstall-info-am:
install-appmanDATA: $(appman_DATA) install-appmanDATA: $(appman_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
@ -715,15 +682,17 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
xdpr: xdpr.script xdpr: xdpr.script
cp $(top_srcdir)/xdpr.script xdpr $(AM_V_GEN)cp $(top_srcdir)/xdpr.script xdpr
.PHONY: ChangeLog
ChangeLog: ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) $(CHANGELOG_CMD)
dist-hook: ChangeLog dist-hook: ChangeLog
.man.$(APP_MAN_SUFFIX): .man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View File

@ -0,0 +1,26 @@
xpr takes as input a window dump file produced by xwd
and formats it for output on various types of printers.
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/app/xpr
http://cgit.freedesktop.org/xorg/app/xpr
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

148
app/xpr/aclocal.m4 vendored
View File

@ -995,6 +995,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar]) AC_SUBST([am__untar])
]) # _AM_PROG_TAR ]) # _AM_PROG_TAR
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl dnl
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
dnl dnl
@ -1031,27 +1032,24 @@ dnl of the copyright holder.
# your configure.ac with the minimum required version, such as: # your configure.ac with the minimum required version, such as:
# XORG_MACROS_VERSION(1.1) # XORG_MACROS_VERSION(1.1)
# #
# To force at least a version with this macro defined, also add: # To ensure that this macro is defined, also add:
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # m4_ifndef([XORG_MACROS_VERSION],
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
# #
# #
# See the "minimum version" comment for each macro you use to see what # See the "minimum version" comment for each macro you use to see what
# version you require. # version you require.
AC_DEFUN([XORG_MACROS_VERSION],[ m4_defun([XORG_MACROS_VERSION],[
[XORG_MACROS_needed_version=$1 m4_define([vers_have], [1.3.0])
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) m4_if(m4_cmp(maj_have, maj_needed), 0,,
[XORG_MACROS_version=1.1.5 [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` m4_if(m4_version_compare(vers_have, [$1]), -1,
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then m4_undefine([vers_have])
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) m4_undefine([maj_have])
fi m4_undefine([maj_needed])
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
fi
AC_MSG_RESULT([yes, $XORG_MACROS_version])
]) # XORG_MACROS_VERSION ]) # XORG_MACROS_VERSION
# XORG_PROG_RAWCPP() # XORG_PROG_RAWCPP()
@ -1076,6 +1074,10 @@ else
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS=-undef RAWCPPFLAGS=-undef
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
# under Cygwin unix is still defined even with -undef
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS="-undef -ansi"
AC_MSG_RESULT([yes, with -ansi])
else else
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
fi fi
@ -1188,10 +1190,16 @@ AC_SUBST([ADMIN_MAN_DIR])
# Whether or not the necessary tools and files are found can be checked # Whether or not the necessary tools and files are found can be checked
# with the AM_CONDITIONAL "BUILD_LINUXDOC" # with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT= HAVE_DEFS_ENT=
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
fi
AC_PATH_PROG(LINUXDOC, linuxdoc) AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf) AC_PATH_PROG(PS2PDF, ps2pdf)
@ -1240,7 +1248,9 @@ AC_SUBST(MAKE_HTML)
# indicates whether the necessary tools and files are found and, if set, # indicates whether the necessary tools and files are found and, if set,
# $(MAKE_XXX) blah.sgml will produce blah.xxx. # $(MAKE_XXX) blah.sgml will produce blah.xxx.
AC_DEFUN([XORG_CHECK_DOCBOOK],[ AC_DEFUN([XORG_CHECK_DOCBOOK],[
XORG_SGML_PATH=$prefix/share/sgml if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT= HAVE_DEFS_ENT=
BUILDTXTDOC=no BUILDTXTDOC=no
BUILDPDFDOC=no BUILDPDFDOC=no
@ -1306,7 +1316,7 @@ AC_SUBST(MAKE_HTML)
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
AC_ARG_ENABLE(malloc0returnsnull, AC_ARG_ENABLE(malloc0returnsnull,
AC_HELP_STRING([--enable-malloc0returnsnull], AS_HELP_STRING([--enable-malloc0returnsnull],
[malloc(0) returns NULL (default: auto)]), [malloc(0) returns NULL (default: auto)]),
[MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=$enableval],
[MALLOC_ZERO_RETURNS_NULL=auto]) [MALLOC_ZERO_RETURNS_NULL=auto])
@ -1358,7 +1368,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
AC_DEFUN([XORG_WITH_LINT],[ AC_DEFUN([XORG_WITH_LINT],[
# Allow checking code with lint, sparse, etc. # Allow checking code with lint, sparse, etc.
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
[Use a lint-style source code checker (default: disabled)])], [Use a lint-style source code checker (default: disabled)])],
[use_lint=$withval], [use_lint=no]) [use_lint=$withval], [use_lint=no])
if test "x$use_lint" = "xyes" ; then if test "x$use_lint" = "xyes" ; then
@ -1399,7 +1409,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
AC_DEFUN([XORG_LINT_LIBRARY],[ AC_DEFUN([XORG_LINT_LIBRARY],[
AC_REQUIRE([XORG_WITH_LINT]) AC_REQUIRE([XORG_WITH_LINT])
# Build lint "library" for more indepth checks of programs calling this library # Build lint "library" for more indepth checks of programs calling this library
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
[Create lint library (default: disabled)])], [Create lint library (default: disabled)])],
[make_lint_lib=$enableval], [make_lint_lib=no]) [make_lint_lib=$enableval], [make_lint_lib=no])
if test "x$make_lint_lib" != "xno" ; then if test "x$make_lint_lib" != "xno" ; then
@ -1417,6 +1427,75 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY ]) # XORG_LINT_LIBRARY
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
#
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
-Wbad-function-cast"
case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
;;
esac
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
fi
AC_SUBST(CWARNFLAGS)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
# -----------------------
# Minimum version: 1.3.0
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
if test "x$STRICT_COMPILE" = "xyes"; then
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
if test "x$GCC" = xyes ; then
STRICT_CFLAGS="-pedantic -Werror"
elif test "x$SUNCC" = "xyes"; then
STRICT_CFLAGS="-errwarn"
elif test "x$INTELCC" = "xyes"; then
STRICT_CFLAGS="-Werror"
fi
fi
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
AC_SUBST([CWARNFLAGS])
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
XORG_CHANGELOG
XORG_MANPAGE_SECTIONS
]) # XORG_DEFAULT_OPTIONS
dnl Copyright 2005 Red Hat, Inc dnl Copyright 2005 Red Hat, Inc
dnl dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its dnl Permission to use, copy, modify, distribute, and sell this software and its
@ -1451,7 +1530,7 @@ dnl
AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version, AC_ARG_WITH(release-version,
AC_HELP_STRING([--with-release-version=STRING], AS_HELP_STRING([--with-release-version=STRING],
[Use release version string in package name]), [Use release version string in package name]),
[RELEASE_VERSION="$withval"], [RELEASE_VERSION="$withval"],
[RELEASE_VERSION=""]) [RELEASE_VERSION=""])
@ -1463,14 +1542,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`], [`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package]) [Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then if test "x$PVM" = "x"; then
PVM="0" PVM="0"
fi fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM], [$PVM],
[Minor version of this package]) [Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then if test "x$PVP" = "x"; then
PVP="0" PVP="0"
fi fi
@ -1479,3 +1558,20 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
[Patch version of this package]) [Patch version of this package])
]) ])
# XORG_CHANGELOG()
# ----------------
# Minimum version: 1.2.0
#
# Defines the variable CHANGELOG_CMD as the command to generate
# ChangeLog from git.
#
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
#
AC_DEFUN([XORG_CHANGELOG], [
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
]) # XORG_CHANGELOG

View File

@ -1,142 +0,0 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View File

@ -1,5 +1,32 @@
/* config.h.in. Generated from configure.ac by autoheader. */ /* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE
@ -27,5 +54,8 @@
/* Patch version of this package */ /* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL #undef PACKAGE_VERSION_PATCHLEVEL
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION

6247
app/xpr/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -22,21 +22,25 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57]) AC_PREREQ([2.57])
AC_INIT(xpr,[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xpr) AC_INIT(xpr,[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xpr)
AM_INIT_AUTOMAKE([dist-bzip2]) AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.3)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL
XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages # Checks for pkg-config packages
PKG_CHECK_MODULES(XPR, xmuu x11) PKG_CHECK_MODULES(XPR, xmuu x11)
AC_SUBST(XPR_CFLAGS) AC_SUBST(XPR_CFLAGS)
AC_SUBST(XPR_LIBS) AC_SUBST(XPR_LIBS)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
AC_OUTPUT([Makefile]) AC_OUTPUT([Makefile])

View File

@ -69,6 +69,7 @@ from the X Consortium.
#include <stdio.h> #include <stdio.h>
#include <stdarg.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/XWDFile.h> #include <X11/XWDFile.h>
@ -258,7 +259,11 @@ static void write_image (
int scale, int scale,
enum orientation orient, enum orientation orient,
enum device device); enum device device);
static void fatal_err (const char *s, ...); static void fatal_err (const char *s, ...)
#if defined(__GNUC__) && (__GNUC__ > 2)
__attribute__((noreturn, format(printf, 1, 2)))
#endif
;
/* Computes the centipoint width of one printer dot. */ /* Computes the centipoint width of one printer dot. */
@ -478,7 +483,8 @@ void scale_and_orient_image (
break; break;
case PJET: *density = 90; case PJET: *density = 90;
break; break;
case PJETXL: *density = 180; case PJETXL:
default: *density = 180;
break; break;
} }
} }
@ -491,7 +497,7 @@ void scale_and_orient_image (
set_image_limits(*scale, *density, *orient, usable); set_image_limits(*scale, *density, *orient, usable);
/* Determine header/trailer string length clipping */ /* Determine header/trailer string length clipping */
set_header_trailer_limits(header, trailer, usable.width); set_header_trailer_limits((char *)header, (char *)trailer, usable.width);
/* Calculate locations for page layout */ /* Calculate locations for page layout */
set_print_locations(*scale, *density, top, left, set_print_locations(*scale, *density, top, left,
@ -500,7 +506,7 @@ void scale_and_orient_image (
} }
unsigned short fullintensity; static unsigned short fullintensity;
#define BLACK 1 #define BLACK 1
#define WHITE 0 #define WHITE 0
@ -514,20 +520,20 @@ unsigned short fullintensity;
* numbers into a pjcolor index number. This style of mapping is done when * numbers into a pjcolor index number. This style of mapping is done when
* interpreting non-Direct/TrueColor visual types. * interpreting non-Direct/TrueColor visual types.
*/ */
long *colormap; static long *colormap;
/* Pjcolor array is used to hold the scaled RGB triple values /* Pjcolor array is used to hold the scaled RGB triple values
* programmed into the printer. * programmed into the printer.
*/ */
long pjcolor[MAX_PJ_COLOR]; static long pjcolor[MAX_PJ_COLOR];
static int color_warning_given = FALSE; static int color_warning_given = FALSE;
/* Global visual type indicator, used to select color interpretation method. */ /* Global visual type indicator, used to select color interpretation method. */
char Direct_or_TrueColor; static char Direct_or_TrueColor;
/* Color index element definition, these are linked into a circular list /* Color index element definition, these are linked into a circular list
@ -545,7 +551,7 @@ typedef struct colorindex {
* TrueColor visual types). It also holds color processing switches and a * TrueColor visual types). It also holds color processing switches and a
* pointer to the output file to reduce parameter passing overhead. * pointer to the output file to reduce parameter passing overhead.
*/ */
struct { static struct {
int PaintJet; int PaintJet;
int Invert; int Invert;
unsigned int CutOff; unsigned int CutOff;
@ -1061,7 +1067,8 @@ void validate_visual(void)
break; break;
default: default:
fatal_err((catgets(nlmsg_fd,NL_SETN,26, fatal_err((catgets(nlmsg_fd,NL_SETN,26,
"visual class #%d not supported.\n")), xwd_header.visual_class); "visual class #%d not supported.\n")),
(int)xwd_header.visual_class);
} }
} }
@ -1183,8 +1190,8 @@ void write_image_prefix (
/* Set picture width for PaintJet */ /* Set picture width for PaintJet */
fprintf(out,"\033*r%dS", fprintf(out,"\033*r%dS",
((int) (orient == PORTRAIT) ? limit.width : limit.height) (int) (((orient == PORTRAIT) ? limit.width : limit.height)
* scale); * scale));
} }
/* Enable various options for PaintJet XL */ /* Enable various options for PaintJet XL */
@ -1226,11 +1233,11 @@ void write_image_prefix (
* Set picture width for PaintJet XL * * Set picture width for PaintJet XL *
****************************************/ ****************************************/
fprintf(out,"\033*r%dS", fprintf(out,"\033*r%dS",
((int) (orient == PORTRAIT) ? xwd_header.pixmap_width (int) ((orient == PORTRAIT) ? xwd_header.pixmap_width
: xwd_header.pixmap_height)); : xwd_header.pixmap_height));
fprintf(out,"\033*r%dT", fprintf(out,"\033*r%dT",
((int) (orient == PORTRAIT) ? xwd_header.pixmap_height (int) ((orient == PORTRAIT) ? xwd_header.pixmap_height
: xwd_header.pixmap_width)); : xwd_header.pixmap_width));
dotsize = dot_centipoints(scale, density); dotsize = dot_centipoints(scale, density);
@ -1347,6 +1354,9 @@ unsigned long Z_image_pixel (int x, int y)
(unsigned long)*(image+2) << 16 | (unsigned long)*(image+2) << 16 |
(unsigned long)*(image+3) << 24); (unsigned long)*(image+3) << 24);
break; break;
default:
pixel = 0;
break;
} }
return (pixel & Z_pixel_mask); return (pixel & Z_pixel_mask);
} }
@ -1685,7 +1695,13 @@ void x2jet(
static static
void fatal_err (const char *s, ...) void fatal_err (const char *s, ...)
{ {
fprintf(stderr, "%s: %s\n", progname, s); va_list ap;
exit(EXIT_FAILURE);
fprintf(stderr, "%s: ", progname);
va_start(ap, s);
vfprintf(stderr, s, ap);
va_end(ap);
fputc('\n', stderr);
exit(EXIT_FAILURE);
} }

View File

@ -34,7 +34,7 @@ static void p_bitmap(
unsigned long buflen, unsigned long buflen,
unsigned char *buf); unsigned char *buf);
static plane = 0; static int plane = 0;
#define FONT_HEIGHT 40 #define FONT_HEIGHT 40
#define FONT_HEIGHT_PIXELS (FONT_HEIGHT*75/PPI) #define FONT_HEIGHT_PIXELS (FONT_HEIGHT*75/PPI)
#define FONT_WIDTH 24 #define FONT_WIDTH 24
@ -65,7 +65,7 @@ void x2pmp(FILE *in, FILE *out,
if (header.file_version != XWD_FILE_VERSION) { if (header.file_version != XWD_FILE_VERSION) {
fprintf(stderr,"%s: file format version %d, not %d\n", progname, fprintf(stderr,"%s: file format version %d, not %d\n", progname,
header.file_version, XWD_FILE_VERSION); (int)header.file_version, XWD_FILE_VERSION);
} }
win_name_size = abs_(header.header_size - sizeof(header)); win_name_size = abs_(header.header_size - sizeof(header));
@ -95,6 +95,7 @@ void x2pmp(FILE *in, FILE *out,
if (head) real_height += FONT_HEIGHT_PIXELS << 1; if (head) real_height += FONT_HEIGHT_PIXELS << 1;
if (foot) real_height += FONT_HEIGHT_PIXELS << 1; if (foot) real_height += FONT_HEIGHT_PIXELS << 1;
switch(orient) { switch(orient) {
default:
case PORTRAIT: case PORTRAIT:
case UPSIDE_DOWN: case UPSIDE_DOWN:
scale = min_((p_width - 2*x_pos) / fixed_width, scale = min_((p_width - 2*x_pos) / fixed_width,
@ -165,7 +166,7 @@ void x2pmp(FILE *in, FILE *out,
} }
/* we don't want the last bits up to the byte/word alignment set */ /* we don't want the last bits up to the byte/word alignment set */
if (no_of_bits = fixed_width - width) { if ((no_of_bits = fixed_width - width)) {
int i, j, mask = ~bits_set(no_of_bits % 8); int i, j, mask = ~bits_set(no_of_bits % 8);
for(i = 0; i < height; i++) { for(i = 0; i < height; i++) {
unsigned char *s = buffer + (i+1) * byte_width ; unsigned char *s = buffer + (i+1) * byte_width ;

View File

@ -131,7 +131,7 @@ int debug = 0;
#define DEFAULT_CUTOFF ((unsigned int) (0xFFFF * 0.50)) #define DEFAULT_CUTOFF ((unsigned int) (0xFFFF * 0.50))
char *infilename = NULL; static char *infilename = NULL;
char *progname = NULL; char *progname = NULL;
typedef struct _grayRec { typedef struct _grayRec {
@ -140,29 +140,29 @@ typedef struct _grayRec {
unsigned long *grayscales; /* pointer to the encoded pixels */ unsigned long *grayscales; /* pointer to the encoded pixels */
} GrayRec, *GrayPtr; } GrayRec, *GrayPtr;
unsigned long grayscale2x2[] = static unsigned long grayscale2x2[] =
{0, 1, 9, 11, 15}; {0, 1, 9, 11, 15};
unsigned long grayscale3x3[] = static unsigned long grayscale3x3[] =
{0, 16, 68, 81, 325, 341, 349, 381, 383, 511}; {0, 16, 68, 81, 325, 341, 349, 381, 383, 511};
unsigned long grayscale4x4[] = static unsigned long grayscale4x4[] =
{0, 64, 4160, 4161, 20545, 21057, 23105, {0, 64, 4160, 4161, 20545, 21057, 23105,
23113, 23145, 24169, 24171, 56939, 55275, 55279, 23113, 23145, 24169, 24171, 56939, 55275, 55279,
57327, 65519, 65535}; 57327, 65519, 65535};
GrayRec gray2x2 = {sizeof(grayscale2x2)/sizeof(long), 2, 2, grayscale2x2}; static GrayRec gray2x2 = {sizeof(grayscale2x2)/sizeof(long), 2, 2, grayscale2x2};
GrayRec gray3x3 = {sizeof(grayscale3x3)/sizeof(long), 3, 3, grayscale3x3}; static GrayRec gray3x3 = {sizeof(grayscale3x3)/sizeof(long), 3, 3, grayscale3x3};
GrayRec gray4x4 = {sizeof(grayscale4x4)/sizeof(long), 4, 4, grayscale4x4}; static GrayRec gray4x4 = {sizeof(grayscale4x4)/sizeof(long), 4, 4, grayscale4x4};
/* mapping tables to map a byte in to the hex representation of its /* mapping tables to map a byte in to the hex representation of its
* bit-reversal * bit-reversal
*/ */
const static const
char hex1[]="084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\ char hex1[]="084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\ 084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\ 084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f\
084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f"; 084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f084c2a6e195d3b7f";
const static const
char hex2[]="000000000000000088888888888888884444444444444444cccccccccccccccc\ char hex2[]="000000000000000088888888888888884444444444444444cccccccccccccccc\
2222222222222222aaaaaaaaaaaaaaaa6666666666666666eeeeeeeeeeeeeeee\ 2222222222222222aaaaaaaaaaaaaaaa6666666666666666eeeeeeeeeeeeeeee\
111111111111111199999999999999995555555555555555dddddddddddddddd\ 111111111111111199999999999999995555555555555555dddddddddddddddd\
@ -224,7 +224,6 @@ void build_sixmap(
int hpad, int hpad,
XWDFileHeader *win, XWDFileHeader *win,
const char *data); const char *data);
static void build_output_filename(const char *name, enum device device, char *oname);
static static
void ln03_setup( void ln03_setup(
int iw, int iw,
@ -257,10 +256,6 @@ void ps_setup(
const char *trailer, const char *trailer,
const char *name); const char *name);
static void ps_finish(void); static void ps_finish(void);
static void ln03_alter_background(
unsigned char (*sixmap)[],
int iw,
int ih);
static static
void ln03_output_sixels( void ln03_output_sixels(
unsigned char (*sixmap)[], unsigned char (*sixmap)[],
@ -423,6 +418,7 @@ int main(int argc, char **argv)
if (device == PS) { if (device == PS) {
iw = win.pixmap_width; iw = win.pixmap_width;
ih = win.pixmap_height; ih = win.pixmap_height;
sixmap = NULL;
} else { } else {
/* calculate w and h cell count */ /* calculate w and h cell count */
iw = win.pixmap_width; iw = win.pixmap_width;
@ -459,8 +455,8 @@ int main(int argc, char **argv)
/* print some statistics */ /* print some statistics */
if (flags & F_REPORT) { if (flags & F_REPORT) {
fprintf(stderr, "Name: %s\n", w_name); fprintf(stderr, "Name: %s\n", w_name);
fprintf(stderr, "Width: %d, Height: %d\n", win.pixmap_width, fprintf(stderr, "Width: %d, Height: %d\n", (int)win.pixmap_width,
win.pixmap_height); (int)win.pixmap_height);
fprintf(stderr, "Orientation: %s, Scale: %d\n", fprintf(stderr, "Orientation: %s, Scale: %d\n",
(orientation==PORTRAIT) ? "Portrait" : "Landscape", scale); (orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
} }
@ -1131,16 +1127,6 @@ void build_sixmap(
} }
} }
static
void build_output_filename(const char *name, enum device device, char *oname)
{
while (*name && *name != '.') *oname++ = *name++;
switch (device) {
case LN03: bcopy(".ln03", oname, 6); break;
case LA100: bcopy(".la100", oname, 7); break;
}
}
/* /*
ln03_grind_fonts(sixmap, iw, ih, scale, pixmap) ln03_grind_fonts(sixmap, iw, ih, scale, pixmap)
unsigned char (*sixmap)[]; unsigned char (*sixmap)[];
@ -1288,7 +1274,7 @@ void dump_prolog(int flags)
#else /* XPROLOG */ #else /* XPROLOG */
/* postscript "programs" to unpack and print the bitmaps being sent */ /* postscript "programs" to unpack and print the bitmaps being sent */
const static const
char *ps_prolog_compact[] = { char *ps_prolog_compact[] = {
"%%Pages: 1", "%%Pages: 1",
"%%EndProlog", "%%EndProlog",
@ -1359,10 +1345,10 @@ char *ps_prolog_compact[] = {
" { bitgen }", " { bitgen }",
" image", " image",
" } def", " } def",
0 NULL
}; };
const static const
char *ps_prolog[] = { char *ps_prolog[] = {
"%%Pages: 1", "%%Pages: 1",
"%%EndProlog", "%%EndProlog",
@ -1391,7 +1377,7 @@ char *ps_prolog[] = {
" { currentfile picstr readhexstring pop }", " { currentfile picstr readhexstring pop }",
" image", " image",
"} def", "} def",
0 NULL
}; };
static static
@ -1548,55 +1534,22 @@ void ps_setup(
} }
} }
const static const
char *ps_epilog[] = { char *ps_epilog[] = {
"", "",
"showpage", "showpage",
"%%Trailer", "%%Trailer",
0 NULL
}; };
static static
void ps_finish(void) void ps_finish(void)
{ {
char **p = ps_epilog; char **p = (char **)ps_epilog;
while (*p) printf("%s\n",*p++); while (*p) printf("%s\n",*p++);
} }
static
void ln03_alter_background(
unsigned char (*sixmap)[],
int iw,
int ih)
{
register unsigned char *c, *stopc;
register unsigned char *startc;
register int n;
c = (unsigned char *)sixmap;
stopc = c + (iw * ih);
n = 0;
while (c < stopc) {
switch (*c) {
case 0x08: case 0x11: case 0x04: case 0x22:
case 0x20: case 0x21: case 0x24: case 0x00:
if (n == 0) startc = c;
n++;
break;
default:
if (n >= 2) {
while (n-- > 0) *startc++ = 0x00;
} else {
n = 0;
}
break;
}
c++;
}
}
static static
void ln03_output_sixels( void ln03_output_sixels(
unsigned char (*sixmap)[], unsigned char (*sixmap)[],
@ -1779,7 +1732,7 @@ void ps_output_bits(
* to avoid special cases at the boundaries * to avoid special cases at the boundaries
*/ */
obuf = malloc((unsigned)(owidth*oheight)); obuf = malloc((unsigned)(owidth*oheight));
if (obuf==0) { if (obuf==NULL) {
fprintf(stderr,"xpr: cannot allocate %d bytes\n",owidth*oheight); fprintf(stderr,"xpr: cannot allocate %d bytes\n",owidth*oheight);
exit(1); exit(1);
} }
@ -1817,7 +1770,7 @@ void ps_output_bits(
} }
} }
const static const
unsigned char _reverse_byte[0x100] = { unsigned char _reverse_byte[0x100] = {
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,