Importing from X.Org 7.2RC2

This commit is contained in:
matthieu
2006-11-25 20:07:29 +00:00
parent 8c9bfd57b8
commit 616b6f15ab
1886 changed files with 1041525 additions and 0 deletions

0
app/xfd/AUTHORS Normal file
View File

12
app/xfd/COPYING Normal file
View File

@@ -0,0 +1,12 @@
This is a stub file. This package has not yet had its complete licensing
information compiled. Please see the individual source files for details on
your rights to use and modify this software.
Please submit updated COPYING files to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
All licensing questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg

31
app/xfd/ChangeLog Normal file
View File

@@ -0,0 +1,31 @@
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
Update package version for X11R7 release.
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
Update package version number for final X11R7 release candidate.
2005-12-07 Kevin E. Martin <kem-at-freedesktop-dot-org>
* Makefile.am:
* configure.ac:
Change to use the app-defaults default dir configured in libXt.
2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
* Makefile.am:
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
Update package version number for X11R7 RC3 release.
2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
* configure.ac:
Update package version number for RC1 release.

0
app/xfd/INSTALL Normal file
View File

84
app/xfd/Makefile.am Normal file
View File

@@ -0,0 +1,84 @@
#
# Copyright 2005 Red Hat, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of Red Hat not be used in
# advertising or publicity pertaining to distribution of the software without
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
bin_PROGRAMS = xfd
xfd_CFLAGS = $(XFD_CFLAGS) -DXRENDER -D_BSD_SOURCE
xfd_LDADD = $(XFD_LIBS)
xfd_SOURCES = \
grid.c \
grid.h \
gridP.h \
xfd.c
appman_PRE = \
xfd.man
# App default files (*.ad)
appdefaultdir = @appdefaultdir@
APPDEFAULTFILES = \
Xfd
SUFFIXES = .ad
.ad:
cp $< $@
appdefault_DATA = $(APPDEFAULTFILES)
EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad)
CLEANFILES = $(APPDEFAULTFILES)
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST += $(appman_PRE)
CLEANFILES += $(appman_DATA)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES += .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@

699
app/xfd/Makefile.in Normal file
View File

@@ -0,0 +1,699 @@
# Makefile.in generated by automake 1.7.9 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright 2005 Red Hat, Inc.
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of Red Hat not be used in
# advertising or publicity pertaining to distribution of the software without
# specific, written prior permission. Red Hat makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
#
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_triplet = @host@
ACLOCAL = @ACLOCAL@
ADDITIONAL_CFLAGS = @ADDITIONAL_CFLAGS@
ADDITIONAL_LIBS = @ADDITIONAL_LIBS@
ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
APPDEFS_CFLAGS = @APPDEFS_CFLAGS@
APPDEFS_LIBS = @APPDEFS_LIBS@
APP_MAN_DIR = @APP_MAN_DIR@
APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TMP_XAW_CFLAGS = @TMP_XAW_CFLAGS@
TMP_XAW_LIBS = @TMP_XAW_LIBS@
VERSION = @VERSION@
XAW_USE_XPRINT_FALSE = @XAW_USE_XPRINT_FALSE@
XAW_USE_XPRINT_TRUE = @XAW_USE_XPRINT_TRUE@
XFD_CFLAGS = @XFD_CFLAGS@
XFD_LIBS = @XFD_LIBS@
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_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
# App default files (*.ad)
appdefaultdir = @appdefaultdir@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
bin_PROGRAMS = xfd
xfd_CFLAGS = $(XFD_CFLAGS) -DXRENDER -D_BSD_SOURCE
xfd_LDADD = $(XFD_LIBS)
xfd_SOURCES = \
grid.c \
grid.h \
gridP.h \
xfd.c
appman_PRE = \
xfd.man
APPDEFAULTFILES = \
Xfd
SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man
appdefault_DATA = $(APPDEFAULTFILES)
EXTRA_DIST = $(APPDEFAULTFILES:%=%.ad) $(appman_PRE)
CLEANFILES = $(APPDEFAULTFILES) $(appman_DATA)
appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
SED = sed
# Strings to replace in man pages
XORGRELSTRING = @PACKAGE_STRING@
XORGMANNAME = X Version 11
MAN_SUBSTS = \
-e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|$(prefix)|g' \
-e 's|__apploaddir__|$(appdefaultdir)|' \
-e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
-e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
-e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
bin_PROGRAMS = xfd$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
am_xfd_OBJECTS = xfd-grid.$(OBJEXT) xfd-xfd.$(OBJEXT)
xfd_OBJECTS = $(am_xfd_OBJECTS)
xfd_DEPENDENCIES =
xfd_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/xfd-grid.Po ./$(DEPDIR)/xfd-xfd.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(xfd_SOURCES)
DATA = $(appdefault_DATA) $(appman_DATA)
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 compile \
config.guess config.h.in config.sub configure configure.ac \
depcomp install-sh missing mkinstalldirs
SOURCES = $(xfd_SOURCES)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .ad .$(APP_MAN_SUFFIX) .man .c .o .obj
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/config.h.in
distclean-hdr:
-rm -f config.h stamp-h1
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
; then \
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \
done
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
xfd$(EXEEXT): $(xfd_OBJECTS) $(xfd_DEPENDENCIES)
@rm -f xfd$(EXEEXT)
$(LINK) $(xfd_LDFLAGS) $(xfd_OBJECTS) $(xfd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfd-grid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfd-xfd.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
xfd-grid.o: grid.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -MT xfd-grid.o -MD -MP -MF "$(DEPDIR)/xfd-grid.Tpo" \
@am__fastdepCC_TRUE@ -c -o xfd-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xfd-grid.Tpo" "$(DEPDIR)/xfd-grid.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xfd-grid.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grid.c' object='xfd-grid.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xfd-grid.Po' tmpdepfile='$(DEPDIR)/xfd-grid.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -c -o xfd-grid.o `test -f 'grid.c' || echo '$(srcdir)/'`grid.c
xfd-grid.obj: grid.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -MT xfd-grid.obj -MD -MP -MF "$(DEPDIR)/xfd-grid.Tpo" \
@am__fastdepCC_TRUE@ -c -o xfd-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xfd-grid.Tpo" "$(DEPDIR)/xfd-grid.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xfd-grid.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='grid.c' object='xfd-grid.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xfd-grid.Po' tmpdepfile='$(DEPDIR)/xfd-grid.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -c -o xfd-grid.obj `if test -f 'grid.c'; then $(CYGPATH_W) 'grid.c'; else $(CYGPATH_W) '$(srcdir)/grid.c'; fi`
xfd-xfd.o: xfd.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -MT xfd-xfd.o -MD -MP -MF "$(DEPDIR)/xfd-xfd.Tpo" \
@am__fastdepCC_TRUE@ -c -o xfd-xfd.o `test -f 'xfd.c' || echo '$(srcdir)/'`xfd.c; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xfd-xfd.Tpo" "$(DEPDIR)/xfd-xfd.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xfd-xfd.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xfd.c' object='xfd-xfd.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xfd-xfd.Po' tmpdepfile='$(DEPDIR)/xfd-xfd.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -c -o xfd-xfd.o `test -f 'xfd.c' || echo '$(srcdir)/'`xfd.c
xfd-xfd.obj: xfd.c
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -MT xfd-xfd.obj -MD -MP -MF "$(DEPDIR)/xfd-xfd.Tpo" \
@am__fastdepCC_TRUE@ -c -o xfd-xfd.obj `if test -f 'xfd.c'; then $(CYGPATH_W) 'xfd.c'; else $(CYGPATH_W) '$(srcdir)/xfd.c'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/xfd-xfd.Tpo" "$(DEPDIR)/xfd-xfd.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/xfd-xfd.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xfd.c' object='xfd-xfd.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/xfd-xfd.Po' tmpdepfile='$(DEPDIR)/xfd-xfd.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xfd_CFLAGS) $(CFLAGS) -c -o xfd-xfd.obj `if test -f 'xfd.c'; then $(CYGPATH_W) 'xfd.c'; else $(CYGPATH_W) '$(srcdir)/xfd.c'; fi`
uninstall-info-am:
appdefaultDATA_INSTALL = $(INSTALL_DATA)
install-appdefaultDATA: $(appdefault_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(appdefaultdir)
@list='$(appdefault_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(appdefaultDATA_INSTALL) $$d$$p $(DESTDIR)$(appdefaultdir)/$$f"; \
$(appdefaultDATA_INSTALL) $$d$$p $(DESTDIR)$(appdefaultdir)/$$f; \
done
uninstall-appdefaultDATA:
@$(NORMAL_UNINSTALL)
@list='$(appdefault_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(appdefaultdir)/$$f"; \
rm -f $(DESTDIR)$(appdefaultdir)/$$f; \
done
appmanDATA_INSTALL = $(INSTALL_DATA)
install-appmanDATA: $(appman_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(appmandir)
@list='$(appman_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(appmanDATA_INSTALL) $$d$$p $(DESTDIR)$(appmandir)/$$f"; \
$(appmanDATA_INSTALL) $$d$$p $(DESTDIR)$(appmandir)/$$f; \
done
uninstall-appmanDATA:
@$(NORMAL_UNINSTALL)
@list='$(appman_DATA)'; for p in $$list; do \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(appmandir)/$$f"; \
rm -f $(DESTDIR)$(appmandir)/$$f; \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(DATA) config.h
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(appdefaultdir) $(DESTDIR)$(appmandir)
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
distclean-tags
dvi: dvi-am
dvi-am:
info: info-am
info-am:
install-data-am: install-appdefaultDATA install-appmanDATA
install-exec-am: install-binPROGRAMS
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \
uninstall-binPROGRAMS uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags dist dist-all dist-bzip2 dist-gzip \
distcheck distclean distclean-compile distclean-generic \
distclean-hdr distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am info info-am install install-am \
install-appdefaultDATA install-appmanDATA install-binPROGRAMS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-appdefaultDATA uninstall-appmanDATA \
uninstall-binPROGRAMS uninstall-info-am
.ad:
cp $< $@
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
# 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.
.NOEXPORT:

0
app/xfd/NEWS Normal file
View File

0
app/xfd/README Normal file
View File

40
app/xfd/Xfd.ad Normal file
View File

@@ -0,0 +1,40 @@
! $Xorg: Xfd.ad,v 1.3 2000/08/17 19:54:18 cpqbld Exp $
! $XFree86$
*internalBorderWidth: 0
*showGrip: false
*grid.borderWidth: 0
*quit.Label: Quit
*prev.Label: Prev
*next.Label: Next
*prev16.Label: -16
*next16.Label: +16
*select.Label: Select a character
*metrics.Label:
*select.Justify: center
*metrics.Justify: center
*range.Justify: left
*start.Justify: left
*quit.Translations: #override \
<Btn1Down>,<Btn1Up>: Quit() unset()
*next16.Translations: #override \
<Btn1Down>,<Btn1Up>: Next16() unset()
*next.Translations: #override \
<Btn1Down>,<Btn1Up>: Next() unset()
*prev.Translations: #override \
<Btn1Down>,<Btn1Up>: Prev() unset()
*prev16.Translations: #override \
<Btn1Down>,<Btn1Up>: Prev16() unset()
*Translations: #override \n\
<Key>q: Quit()\n\
Ctrl <Key>n: Next()\n\
Ctrl <Key>p: Prev()

1440
app/xfd/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

99
app/xfd/compile Normal file
View File

@@ -0,0 +1,99 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
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 "$prog" $args
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.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status

1411
app/xfd/config.guess vendored Normal file

File diff suppressed because it is too large Load Diff

22
app/xfd/config.h.in Normal file
View File

@@ -0,0 +1,22 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Version number of package */
#undef VERSION

1500
app/xfd/config.sub vendored Normal file

File diff suppressed because it is too large Load Diff

5071
app/xfd/configure vendored Normal file

File diff suppressed because it is too large Load Diff

53
app/xfd/configure.ac Normal file
View File

@@ -0,0 +1,53 @@
dnl Copyright 2005 Red Hat, Inc.
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
dnl copyright notice and this permission notice appear in supporting
dnl documentation, and that the name of Red Hat not be used in
dnl advertising or publicity pertaining to distribution of the software without
dnl specific, written prior permission. Red Hat makes no
dnl representations about the suitability of this software for any purpose. It
dnl is provided "as is" without express or implied warranty.
dnl
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(xfd,[1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xfd)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_PROG_INSTALL
# Checks for pkg-config packages
XAW_CHECK_XPRINT_SUPPORT(XAW)
PKG_CHECK_MODULES(ADDITIONAL, freetype2 fontconfig xft)
XFD_CFLAGS="$XAW_CFLAGS $ADDITIONAL_CFLAGS"
XFD_LIBS="$XAW_LIBS $ADDITIONAL_LIBS"
AC_SUBST(XFD_CFLAGS)
AC_SUBST(XFD_LIBS)
PKG_CHECK_MODULES(APPDEFS, xt)
appdefaultdir=$(pkg-config --variable=appdefaultdir xt)
AC_SUBST(appdefaultdir)
XORG_MANPAGE_SECTIONS
XORG_RELEASE_VERSION
AC_OUTPUT([Makefile])

479
app/xfd/depcomp Normal file
View File

@@ -0,0 +1,479 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
# 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, 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.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

1004
app/xfd/grid.c Normal file

File diff suppressed because it is too large Load Diff

105
app/xfd/grid.h Normal file
View File

@@ -0,0 +1,105 @@
/* $Xorg: grid.h,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
/*
Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/programs/xfd/grid.h,v 1.4 2002/07/23 01:45:41 tsi Exp $ */
#ifndef _FontGrid_h_
#define _FontGrid_h_
#ifdef XRENDER
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xrender.h>
#endif
typedef struct _FontGridRec *FontGridWidget;
extern WidgetClass fontgridWidgetClass;
#define XtNcellRows "cellRows"
#define XtCCellRows "CellRows"
#define XtNcellColumns "cellColumns"
#define XtCCellColumns "CellColumns"
#define XtNcellWidth "cellWidth"
#define XtCCellWidth "CellWidth"
#define XtNcellHeight "cellHeight"
#define XtCCellHeight "CellHeight"
#define XtNcenterChars "centerChars"
#define XtCCenterChars "CenterChars"
#define XtNboxChars "boxChars"
#define XtCBoxChars "BoxChars"
#define XtNboxColor "boxColor"
#define XtCBoxColor "BoxColor"
#define XtNstartChar "startChar"
#define XtCStartChar "StartChar"
#define XtNinternalPad "internalPad"
#define XtCInternalPad "InternalPad"
#define XtNgridWidth "gridWidth"
#define XtCGridWidth "GridWidth"
#define XtRXftColor "XftColor"
#define XtNface "face"
#define XtCFace "Face"
#define XtRXftFont "XftFont"
typedef struct _FontGridCharRec {
#ifdef XRENDER
XftFont * theface;
#endif
XFontStruct * thefont;
long thechar;
} FontGridCharRec;
extern void GetFontGridCellDimensions(
Widget,
long *,
int *,
int *
);
extern void GetPrevNextStates(
Widget,
Bool *,
Bool *,
Bool *,
Bool *
);
long
GridFirstChar (Widget w);
long
GridLastChar (Widget w);
#endif /* _FontGrid_h_ */

116
app/xfd/gridP.h Normal file
View File

@@ -0,0 +1,116 @@
/* $Xorg: gridP.h,v 1.4 2001/02/09 02:05:41 xorgcvs Exp $ */
/*
Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86$ */
#ifndef _FontGridP_h_
#define _FontGridP_h_
#include "grid.h"
typedef struct _FontGridClassPart { int dummy; } FontGridClassPart;
typedef struct _FontGridClassRec {
CoreClassPart core_class;
SimpleClassPart simple_class;
FontGridClassPart grid_class;
} FontGridClassRec;
extern FontGridClassRec fontgridClassRec;
typedef struct _FontGridPart {
XFontStruct * text_font; /* font to display */
int cell_cols, cell_rows; /* number of cells */
int cell_width, cell_height; /* size of cell */
#ifndef XRENDER
Pixel foreground_pixel; /* color of text */
#endif
Pixel box_pixel; /* for box_chars */
Boolean center_chars; /* center characters in grid */
Boolean box_chars; /* put box around logical width */
XtCallbackList callbacks; /* for notifying caller */
int internal_pad; /* extra padding inside grid */
long start_char; /* first character of grid */
int grid_width; /* width of grid lines */
/* private data */
GC text_gc; /* printing text */
GC box_gc; /* for box_chars */
int xoff, yoff; /* extra offsets within grid */
#ifdef XRENDER
XftDraw *draw;
XftColor fg_color;
XftFont *text_face;
#endif
} FontGridPart;
typedef struct _FontGridRec {
CorePart core;
SimplePart simple;
FontGridPart fontgrid;
} FontGridRec;
#ifdef XRENDER
#define GridFontHeight(g) ((g)->fontgrid.text_face ? \
(g)->fontgrid.text_face->height : \
(g)->fontgrid.text_font ? \
(g)->fontgrid.text_font->ascent + \
(g)->fontgrid.text_font->descent : 1)
#define GridFontAscent(g) ((g)->fontgrid.text_face ? \
(g)->fontgrid.text_face->ascent : \
(g)->fontgrid.text_font ? \
(g)->fontgrid.text_font->ascent: 1)
#define GridFontWidth(g) ((g)->fontgrid.text_face ? \
(g)->fontgrid.text_face->max_advance_width : \
(g)->fontgrid.text_font ? \
(g)->fontgrid.text_font->max_bounds.width : 1)
#define GridForeground(g) ((g)->fontgrid.fg_color.pixel)
#else /* XRENDER */
#define GridFontHeight(g) ((g)->fontgrid.text_font->ascent + \
(g)->fontgrid.text_font->descent)
#define GridFontAscent(g) ((g)->fontgrid.text_font ? \
(g)->fontgrid.text_font->ascent: 1)
#define GridFontWidth(g) ((g)->fontgrid.text_font->max_bounds.width)
#define GridForeground(g) ((g)->fontgrid.foreground_pixel)
#endif /* else XRENDER */
#define DefaultCellWidth(fgw) (GridFontWidth(fgw) \
+ ((fgw)->fontgrid.internal_pad * 2))
#define DefaultCellHeight(fgw) (GridFontHeight(fgw) + \
((fgw)->fontgrid.internal_pad * 2))
#define CellWidth(fgw) (((int)(fgw)->core.width - (fgw)->fontgrid.grid_width) \
/ (fgw)->fontgrid.cell_cols \
- (fgw)->fontgrid.grid_width)
#define CellHeight(fgw) (((int)(fgw)->core.height - (fgw)->fontgrid.grid_width)\
/ (fgw)->fontgrid.cell_rows \
- (fgw)->fontgrid.grid_width)
#endif /* !_FontGridP_h_ */

294
app/xfd/install-sh Normal file
View File

@@ -0,0 +1,294 @@
#!/bin/sh
#
# install - install a program, script, or datafile
#
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

336
app/xfd/missing Normal file
View File

@@ -0,0 +1,336 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, 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.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

111
app/xfd/mkinstalldirs Normal file
View File

@@ -0,0 +1,111 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

508
app/xfd/xfd.c Normal file
View File

@@ -0,0 +1,508 @@
/*
* $Xorg: xfd.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $
*
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* *
* Author: Jim Fulton, MIT X Consortium
*/
/* $XFree86: xc/programs/xfd/xfd.c,v 1.8 2003/02/20 02:56:40 dawes Exp $ */
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
#include <X11/Shell.h>
#include <X11/Xaw/Cardinals.h>
#include <X11/Xaw/Paned.h>
#include <X11/Xaw/Box.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Command.h>
#include <stdio.h>
#include <stdlib.h>
#include "grid.h"
#ifdef XRENDER
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xrender.h>
#endif
char *ProgramName;
static XrmOptionDescRec xfd_options[] = {
{"-fn", "*grid.font", XrmoptionSepArg, (caddr_t) NULL },
#ifdef XRENDER
{"-fa", "*grid.face", XrmoptionSepArg, (caddr_t) NULL },
#endif
{"-start", "*startChar", XrmoptionSepArg, (caddr_t) NULL },
{"-box", "*grid.boxChars", XrmoptionNoArg, (caddr_t) "on" },
{"-bc", "*grid.boxColor", XrmoptionSepArg, (caddr_t) NULL },
{"-center", "*grid.centerChars", XrmoptionNoArg, (caddr_t) "on" },
{"-rows", "*grid.cellRows", XrmoptionSepArg, (caddr_t) NULL },
{"-columns", "*grid.cellColumns", XrmoptionSepArg, (caddr_t) NULL },
};
static void usage(void);
static void SelectChar(Widget w, XtPointer closure, XtPointer data);
static void do_quit(Widget w, XEvent *event, String *params,
Cardinal *num_params);
static void change_page(int page);
static void set_button_state(void);
static void do_prev(Widget w, XEvent *event, String *params,
Cardinal *num_params);
static void do_next(Widget w, XEvent *event, String *params,
Cardinal *num_params);
static void do_prev16(Widget w, XEvent *event, String *params,
Cardinal *num_params);
static void do_next16(Widget w, XEvent *event, String *params,
Cardinal *num_params);
static char *get_font_name(Display *dpy, XFontStruct *fs);
static void CatchFontConversionWarning(String name, String type, String class,
String defaultp, String *params,
Cardinal *np);
static XtActionsRec xfd_actions[] = {
{ "Quit", do_quit },
{ "Prev16", do_prev16 },
{ "Prev", do_prev },
{ "Next", do_next },
{ "Next16", do_next16 },
};
static Atom wm_delete_window;
Widget quitButton, prev16Button, prevButton, nextButton, next16Button;
#define DEF_SELECT_FORMAT "character 0x%04x%02x (%u,%u) (%#o,%#o)"
#define DEF_METRICS_FORMAT "width %d; left %d, right %d; ascent %d, descent %d (font %d, %d)"
#define DEF_RANGE_FORMAT "range: 0x%04x%02x (%u,%u) thru 0x%04x%02x (%u,%u)"
#define DEF_START_FORMAT "upper left: 0x%06x (%d,%d)"
#define DEF_NOCHAR_FORMAT "no such character 0x%04x%02x (%u,%u) (%#o,%#o)"
static struct _xfd_resources {
char *select_format;
char *metrics_format;
char *range_format;
char *start_format;
char *nochar_format;
} xfd_resources;
#define Offset(field) XtOffsetOf(struct _xfd_resources, field)
static XtResource Resources[] = {
{ "selectFormat", "SelectFormat", XtRString, sizeof(char *),
Offset(select_format), XtRString, DEF_SELECT_FORMAT },
{ "metricsFormat", "MetricsFormat", XtRString, sizeof(char *),
Offset(metrics_format), XtRString, DEF_METRICS_FORMAT },
{ "rangeFormat", "RangeFormat", XtRString, sizeof(char *),
Offset(range_format), XtRString, DEF_RANGE_FORMAT },
{ "startFormat", "StartFormat", XtRString, sizeof(char *),
Offset(start_format), XtRString, DEF_START_FORMAT },
{ "nocharFormat", "NocharFormat", XtRString, sizeof(char *),
Offset(nochar_format), XtRString, DEF_NOCHAR_FORMAT },
};
#undef Offset
static void
usage(void)
{
fprintf (stderr, "usage: %s [-options ...] -fn font\n", ProgramName);
#ifdef XRENDER
fprintf (stderr, " %s [-options ...] -fa font\n", ProgramName);
#endif
fprintf (stderr, "where options include:\n");
fprintf (stderr,
" -display dpy X server to contact\n");
fprintf (stderr,
" -geometry geom size and location of window\n");
fprintf (stderr,
" -start num first character to show\n");
fprintf (stderr,
" -box show a box around each character\n");
fprintf (stderr,
" -center center each character inside its grid\n");
fprintf (stderr,
" -rows number number of rows in grid\n");
fprintf (stderr,
" -columns number number of columns in grid\n");
fprintf (stderr, "\n");
exit (1);
}
static Widget selectLabel, metricsLabel, rangeLabel, startLabel, fontGrid;
static Boolean fontConversionFailed = False;
static XtErrorMsgHandler oldWarningHandler;
int
main(int argc, char *argv[])
{
XtAppContext xtcontext;
Widget toplevel, pane, toplabel, box, form;
char buf[256];
Arg av[10];
Cardinal i;
static XtCallbackRec cb[2] = { { SelectChar, NULL }, { NULL, NULL } };
XFontStruct *fs;
#ifdef XRENDER
XftFont *xft;
#endif
char *fontname;
long minn, maxn;
ProgramName = argv[0];
toplevel = XtAppInitialize (&xtcontext, "Xfd",
xfd_options, XtNumber(xfd_options),
&argc, argv, NULL, NULL, 0);
if (argc != 1) usage ();
XtAppAddActions (xtcontext, xfd_actions, XtNumber (xfd_actions));
XtOverrideTranslations
(toplevel, XtParseTranslationTable ("<Message>WM_PROTOCOLS: Quit()"));
XtGetApplicationResources (toplevel, (XtPointer) &xfd_resources, Resources,
XtNumber (Resources), NULL, ZERO);
/* pane wrapping everything */
pane = XtCreateManagedWidget ("pane", panedWidgetClass, toplevel,
NULL, ZERO);
/* font name */
toplabel = XtCreateManagedWidget ("fontname", labelWidgetClass, pane,
NULL, ZERO);
/* button box */
box = XtCreateManagedWidget ("box", boxWidgetClass, pane, NULL, ZERO);
quitButton = XtCreateManagedWidget ("quit", commandWidgetClass, box,
NULL, ZERO);
prev16Button = XtCreateManagedWidget ("prev16", commandWidgetClass, box,
NULL, ZERO);
prevButton = XtCreateManagedWidget ("prev", commandWidgetClass, box,
NULL, ZERO);
nextButton = XtCreateManagedWidget ("next", commandWidgetClass, box,
NULL, ZERO);
next16Button = XtCreateManagedWidget ("next16", commandWidgetClass, box,
NULL, ZERO);
/* and labels in which to put information */
selectLabel = XtCreateManagedWidget ("select", labelWidgetClass,
pane, NULL, ZERO);
metricsLabel = XtCreateManagedWidget ("metrics", labelWidgetClass,
pane, NULL, ZERO);
rangeLabel = XtCreateManagedWidget ("range", labelWidgetClass, pane,
NULL, ZERO);
startLabel = XtCreateManagedWidget ("start", labelWidgetClass, pane,
NULL, ZERO);
/* form in which to draw */
form = XtCreateManagedWidget ("form", formWidgetClass, pane, NULL, ZERO);
i = 0;
XtSetArg (av[i], XtNtop, XtChainTop); i++;
XtSetArg (av[i], XtNbottom, XtChainBottom); i++;
XtSetArg (av[i], XtNleft, XtChainLeft); i++;
XtSetArg (av[i], XtNright, XtChainRight); i++;
XtSetArg (av[i], XtNcallback, cb); i++;
oldWarningHandler = XtAppSetWarningMsgHandler(xtcontext,
CatchFontConversionWarning);
fontGrid = XtCreateManagedWidget ("grid", fontgridWidgetClass, form,
av, i);
XtAppSetWarningMsgHandler(xtcontext, oldWarningHandler);
/* set the label at the top to tell us which font this is */
#ifdef XRENDER
i = 0;
XtSetArg (av[i], XtNface, &xft); i++;
XtGetValues (fontGrid, av, i);
if (xft)
{
FcChar8 *family;
FcChar8 *style;
FcPattern *p;
double size;
family = (FcChar8 *) "";
FcPatternGetString (xft->pattern, FC_FAMILY, 0, &family);
style = (FcChar8 *) "";
FcPatternGetString (xft->pattern, FC_STYLE, 0, &style);
size = 0;
FcPatternGetDouble (xft->pattern, FC_SIZE, 0, &size);
p = FcPatternBuild (0,
FC_FAMILY, FcTypeString, family,
FC_STYLE, FcTypeString, style,
FC_SIZE, FcTypeDouble, size,
NULL);
fontname = (char *) FcNameUnparse (p);
FcPatternDestroy (p);
}
else
#endif
{
i = 0;
XtSetArg (av[i], XtNfont, &fs); i++;
XtGetValues (fontGrid, av, i);
if (!fs || fontConversionFailed) {
fprintf (stderr, "%s: no font to display\n", ProgramName);
exit (1);
}
fontname = get_font_name (XtDisplay(toplevel), fs);
}
i = 0;
XtSetArg (av[i], XtNlabel, fontname); i++;
XtSetValues (toplabel, av, i);
minn = GridFirstChar (fontGrid);
maxn = GridLastChar (fontGrid);
sprintf (buf, xfd_resources.range_format,
minn >> 8, minn & 0xff,
minn >> 8, minn & 0xff,
maxn >> 8, maxn & 0xff,
maxn >> 8, maxn & 0xff);
i = 0;
XtSetArg (av[i], XtNlabel, buf); i++;
XtSetValues (rangeLabel, av, i);
XtRealizeWidget (toplevel);
wm_delete_window = XInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW",
False);
(void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel),
&wm_delete_window, 1);
change_page (0);
XtAppMainLoop (xtcontext);
exit(0);
}
/*ARGSUSED*/
static void
SelectChar(Widget w, XtPointer closure, XtPointer data)
{
FontGridCharRec *p = (FontGridCharRec *) data;
XFontStruct *fs = p->thefont;
long n = p->thechar;
int direction, fontascent, fontdescent;
XCharStruct metrics;
char buf[256];
Arg arg;
Boolean has_char = 1;
XtSetArg (arg, XtNlabel, buf);
buf[0] = '\0';
#ifdef XRENDER
if (p->theface)
{
XftFont *xft = p->theface;
FcChar32 c = (FcChar32) n;
has_char = (Boolean) FcCharSetHasChar (xft->charset, n);
if (has_char)
{
XGlyphInfo extents;
XftTextExtents32 (XtDisplay (w), xft, &c, 1, &extents);
sprintf (buf, xfd_resources.metrics_format,
extents.xOff, - extents.x,
extents.xOff - extents.width + extents.x,
extents.y, extents.height - extents.y,
xft->ascent, xft->descent);
}
}
else
#endif
{
if ((!fs->min_byte1 && !fs->max_byte1) ?
(n < fs->min_char_or_byte2 || n > fs->max_char_or_byte2) :
(n >> 8 < fs->min_byte1 || n >> 8 > fs->max_byte1 ||
(n & 0xff) < fs->min_char_or_byte2 ||
(n & 0xff) > fs->max_char_or_byte2))
{
has_char = 0;
}
else
{
XChar2b char2b;
char2b.byte1 = p->thechar >> 8;
char2b.byte2 = p->thechar & 0xff;
XTextExtents16 (fs, &char2b, 1, &direction, &fontascent, &fontdescent,
&metrics);
sprintf (buf, xfd_resources.metrics_format,
metrics.width, metrics.lbearing, metrics.rbearing,
metrics.ascent, metrics.descent, fontascent, fontdescent);
}
}
XtSetValues (metricsLabel, &arg, ONE);
if (has_char)
{
sprintf (buf, xfd_resources.select_format,
n >> 8, n & 0xff,
n >> 8, n & 0xff,
n >> 8, n & 0xff);
}
else
{
sprintf (buf, xfd_resources.nochar_format,
n >> 8, n & 0xff,
n >> 8, n & 0xff,
n >> 8, n & 0xff);
}
XtSetValues (selectLabel, &arg, ONE);
return;
}
/*ARGSUSED*/
static void
do_quit (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
exit (0);
}
static void
change_page(int page)
{
long oldstart, newstart;
int ncols, nrows;
char buf[256];
Arg arg;
arg.name = XtNstartChar;
GetFontGridCellDimensions (fontGrid, &oldstart, &ncols, &nrows);
if (page) {
long start = (oldstart +
((long) ncols) * ((long) nrows) * ((long) page));
arg.value = (XtArgVal) start;
XtSetValues (fontGrid, &arg, ONE);
}
/* find out what it got set to */
arg.value = (XtArgVal) &newstart;
XtGetValues (fontGrid, &arg, ONE);
/* if not paging, then initialize it, else only do it actually changed */
if (!page || newstart != oldstart) {
unsigned int row = (unsigned int) ((newstart >> 8));
unsigned int col = (unsigned int) (newstart & 0xff);
XtSetArg (arg, XtNlabel, buf);
sprintf (buf, xfd_resources.start_format, newstart, row, col);
XtSetValues (startLabel, &arg, ONE);
}
set_button_state ();
return;
}
static void
set_button_state(void)
{
Bool prevvalid, nextvalid, prev16valid, next16valid;
Arg arg;
GetPrevNextStates (fontGrid, &prevvalid, &nextvalid, &prev16valid, &next16valid);
arg.name = XtNsensitive;
arg.value = (XtArgVal) (prevvalid ? TRUE : FALSE);
XtSetValues (prevButton, &arg, ONE);
arg.value = (XtArgVal) (nextvalid ? TRUE : FALSE);
XtSetValues (nextButton, &arg, ONE);
arg.name = XtNsensitive;
arg.value = (XtArgVal) (prev16valid ? TRUE : FALSE);
XtSetValues (prev16Button, &arg, ONE);
arg.value = (XtArgVal) (next16valid ? TRUE : FALSE);
XtSetValues (next16Button, &arg, ONE);
}
/* ARGSUSED */
static void
do_prev16(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
change_page (-16);
}
static void
do_prev(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
change_page (-1);
}
/* ARGSUSED */
static void
do_next(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
change_page (1);
}
/* ARGSUSED */
static void
do_next16(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
change_page (16);
}
static char *
get_font_name(Display *dpy, XFontStruct *fs)
{
register XFontProp *fp;
register int i;
Atom fontatom = XInternAtom (dpy, "FONT", False);
for (i = 0, fp = fs->properties; i < fs->n_properties; i++, fp++) {
if (fp->name == fontatom) {
return (XGetAtomName (dpy, fp->card32));
}
}
return NULL;
}
static void
CatchFontConversionWarning(String name, String type, String class,
String defaultp, String *params, Cardinal *np)
{
if (np && *np > 1 &&
strcmp(name, "conversionError") == 0 &&
strcmp(type, "string") == 0 &&
strcmp(class, "XtToolkitError") == 0 &&
strcmp(params[1], "FontStruct") == 0) fontConversionFailed = True;
(*oldWarningHandler)(name, type, class, defaultp, params, np);
}

198
app/xfd/xfd.man Normal file
View File

@@ -0,0 +1,198 @@
.\" $Xorg: xfd.man,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $
.\" Copyright 1989, 1994, 1998 The Open Group
.\"
.\" Permission to use, copy, modify, distribute, and sell this software and its
.\" documentation for any purpose is hereby granted without fee, provided that
.\" the above copyright notice appear in all copies and that both that
.\" copyright notice and this permission notice appear in supporting
.\" documentation.
.\"
.\" The above copyright notice and this permission notice shall be included
.\" in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
.\" OTHER DEALINGS IN THE SOFTWARE.
.\"
.\" Except as contained in this notice, the name of The Open Group shall
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.\"
.\" $XFree86: xc/programs/xfd/xfd.man,v 1.9 2003/04/19 23:49:27 herrb Exp $
.\"
.TH XFD 1 __xorgversion__
.SH NAME
xfd \- display all the characters in an X font
.SH SYNOPSIS
.B xfd
[\-options ...] \fB\-fn\fP \fIfontname\fP
.PP
.B xfd
[\-options ...] \fB\-fa\fP \fIfontname\fP
.SH DESCRIPTION
The \fIxfd\fP utility creates a window containing the name of the font being
displayed, a row of command buttons, several lines of text for displaying
character metrics, and a grid containing one glyph per cell. The
characters are shown in increasing order from left to right, top to
bottom. The first character displayed at the top left will be character
number 0 unless the \fB\-start\fP option has been supplied in which case the
character with the number given in the \fB\-start\fP option will be used.
.PP
The characters are displayed in a grid of boxes, each large enough to hold
any single character in the font. Each character glyph is drawn using
the PolyText16 request (used by the \fIXlib\fP routine \fBXDrawString16\fP).
If the \fB\-box\fP option is given, a rectangle will be drawn around each
character, showing where an ImageText16 request (used by the \fIXlib\fP
routine \fBXDrawImageString16\fP) would cause background color to be displayed.
.PP
The origin of each glyph is normally set so that the character is drawn in
the upper left hand corner of the grid cell. However, if a glyph has a
negative left bearing or an unusually large ascent, descent, or right bearing
(as is the case with \fIcursor\fP font), some character may not appear in their
own grid cells. The \fB\-center\fP option may be used to force all glyphs to
be centered in their respective cells.
.PP
All the characters in the font may not fit in the window at once.
To see the next page of glyphs, press the \fINext\fP button at the top
of the window. To see the previous page, press \fIPrev\fP. To exit \fIxfd\fP,
press \fIQuit\fP.
.PP
Individual character metrics (index, width, bearings, ascent and descent) can
be displayed at the top of the window by clicking on the desired character.
.PP
The font name displayed at the top of the window is the full name of the
font, as determined by the server. See \fIxlsfonts\fP for ways to generate
lists of fonts, as well as more detailed summaries of their metrics and
properties.
.SH "OPTIONS"
.PP
.I xfd
accepts all of the standard toolkit command line options along with
the additional options listed below:
.TP 8
.B \-fn \fIfont\fP
This option specifies the core X server side font to be displayed.
This can also be set with
the FontGrid \fBfont\fP resource. A font must be specified.
.TP 8
.B \-fa \fIfont\fP
This option specifies a Xft font to be displayed. This can also be set with
the FontGrid \fBface\fP resource. A font pattern must be specified.
.TP 8
.B \-box
This option indicates that a box should be displayed outlining the area
that would be filled with background color by an ImageText request.
This can also be set with
the FontGrid \fBboxChars\fP resource. The default is False.
.TP 8
.B \-center
This option indicates that each glyph should be centered in its grid.
This can also be set with
the FontGrid \fBcenterChars\fP resource. The default is False.
.TP 8
.B \-start \fInumber\fP
This option specifies the glyph index of the upper left hand corner of the
grid. This is used to view characters at arbitrary locations in the font.
This can also be set with
the FontGrid \fBstartChar\fP resource. The default is 0.
.TP 8
.B \-bc \fIcolor\fP
This option specifies the color to be used if ImageText boxes are drawn.
This can also be set with
the FontGrid \fBboxColor\fP resource.
.TP 8
.B \-rows \fInumrows\fP
This option specifies the number of rows in the grid.
This can also be set with
the FontGrid \fBcellRows\fP resource.
.TP 8
.B \-columns \fInumcols\fP
This option specifies the number of columns in the grid.
This can also be set with
the FontGrid \fBcellColumns\fP resource.
.SH WIDGETS
In order to specify resources, it is useful to know the
widgets which compose \fIxfd\fR. In the notation below, indentation
indicates hierarchical structure. The widget class name is given first,
followed by the widget instance name.
The application class name is Xfd.
.sp
.nf
.ta .5i 1.0i 1.5i 2.0i 2.5i 3.0i 3.5i 4.0i 4.5i 5.0i 5.5i 6.0i 6.5i 7.0i
Xfd xfd
Paned pane
Label fontname
Box box
Command quit
Command prev
Command next
Label select
Label metrics
Label range
Label start
Form form
FontGrid grid
.fi
.SH FONTGRID RESOURCES
The FontGrid widget is an application-specific widget, and a subclass
of the Simple widget in the Athena widget set. The effects and
instance names of this widget's resources are given in the
\fBOPTIONS\fP section. Capitalize the first letter of the resource
instance name to get the corresponding class name.
.SH APPLICATION SPECIFIC RESOURCES
The instance names of the application specific resources
are given below. Capitalize the first letter of the resource
instance name to get the corresponding class name.
These resources are unlikely to be interesting unless you are localizing
xfd for a different language.
.TP 8
.B selectFormat
Specifies a printf-style format string used to display information
about the selected character. The default is "character 0x%02x%02x
(%u,%u) (%#o,%#o)". The arguments that will come after the format string are
char.byte1, char.byte2, char.byte1, char.byte2, char.byte1, char.byte2.
char.byte1 is byte 1 of the selected character.
char.byte2 is byte 2 of the selected character.
.TP 8
.B metricsFormat
Specifies a printf-style format string used to display character
metrics. The default is "width %d; left %d, right %d; ascent %d,
descent %d (font %d, %d)". The arguments that will come after the
format string are the character metrics width, lbearing, rbearing,
character ascent, character descent, font ascent, and font descent.
.TP 8
.B rangeFormat
Specifies a printf-style format string used to display the range of
characters currently being displayed. The default is "range:
0x%02x%02x (%u,%u) thru 0x%02x%02x (%u,%u)". The arguments that will
come after the format string are the following fields from the
XFontStruct that is returned from opening the font:
min_byte1, min_char_or_byte2, min_byte1, min_char_or_byte2,
max_byte1, max_char_or_byte2, max_byte1, max_char_or_byte2.
.TP 8
.B startFormat
Specifies a printf-style format string used to display information
about the character at the upper left corner of the font grid. The
default is "upper left: 0x%04x (%d,%d)". The arguments that will come
after the format string are the new character, the high byte of the new
character, and the low byte of the new character.
.TP 8
.B nocharFormat
Specifies a printf-style format string to display when the selected
character does not exist. The default is "no such character
0x%02x%02x (%u,%u) (%#o,%#o)". The arguments that will come after the
format string are the same as for the \fBselectFormat\fP resource.
.SH "SEE ALSO"
X(__miscmansuffix__), xlsfonts(1), xrdb(1), xfontsel(1), fontconfig(3),
.I "X Logical Font Description Conventions"
.SH "BUGS"
The program should skip over pages full of non-existent characters.
.SH AUTHOR
Jim Fulton, MIT X Consortium; previous program of the same name by
Mark Lillibridge, MIT Project Athena.