From 1594f13a8e2316dea6b8901140d1bb14d92006c9 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 1 Jan 2009 15:24:15 +0000 Subject: mkfontscale 1.0.6 --- app/mkfontscale/COPYING | 28 +++++ app/mkfontscale/ChangeLog | 36 +++++++ app/mkfontscale/Makefile.am | 18 +++- app/mkfontscale/Makefile.in | 88 ++++------------ app/mkfontscale/README | 21 ++++ app/mkfontscale/configure | 59 ++++++++++- app/mkfontscale/configure.ac | 4 + app/mkfontscale/ident.c | 223 +++++++++++++++++++++++++++++++--------- app/mkfontscale/ident.h | 2 +- app/mkfontscale/mkfontscale.c | 4 + app/mkfontscale/mkfontscale.man | 12 +-- 11 files changed, 370 insertions(+), 125 deletions(-) (limited to 'app') diff --git a/app/mkfontscale/COPYING b/app/mkfontscale/COPYING index b706b38c8..c75e5f2e7 100644 --- a/app/mkfontscale/COPYING +++ b/app/mkfontscale/COPYING @@ -17,3 +17,31 @@ AUTHORS OR COPYRIGHT HOLDERS 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. + +Copyright 2008 Sun Microsystems, Inc. All rights reserved. + +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, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +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 +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + diff --git a/app/mkfontscale/ChangeLog b/app/mkfontscale/ChangeLog index a0001ad4e..138924270 100644 --- a/app/mkfontscale/ChangeLog +++ b/app/mkfontscale/ChangeLog @@ -1,3 +1,39 @@ +commit a34031ea9074a453aee217b5845d07333019f26c +Author: Alan Coopersmith +Date: Thu Dec 18 16:56:12 2008 -0800 + + Version 1.0.6 + +commit 95c7da3a2717a0352cdd08830fdd1dd1a4024dda +Author: Alan Coopersmith +Date: Thu Dec 18 16:55:56 2008 -0800 + + man page typo fix + +commit 0d1a2b7970c0eadb834fc2a6c3a68a09691b84ea +Author: Alan Coopersmith +Date: Wed Dec 17 19:29:54 2008 -0800 + + Add hooks for checking sources with lint/sparse/etc. + +commit 3ae585a3f08cb660c6ce6838557c94f88821b7a5 +Author: Alan Coopersmith +Date: Wed Dec 17 19:22:27 2008 -0800 + + Add basic README with URL's of git, bugzilla & mailing list + +commit 03f6a08c503ff12e2457a9ccc13bfbb801e2161d +Author: Alan Coopersmith +Date: Wed Dec 17 19:19:03 2008 -0800 + + Use XORG_CWARNFLAGS & XORG_CHANGELOG from xorg-macros 1.2 + +commit 0ca983a6bac03489fb0d2ad158114a811eb276a2 +Author: Alan Coopersmith +Date: Wed Nov 5 10:07:33 2008 -0800 + + Add support for bzip2 compressed fonts if configured --with-bzip2 + commit 8126d2b694f48cc8137be05705a125f7d02e7e12 Author: Julien Cristau Date: Sun May 11 00:03:44 2008 +0200 diff --git a/app/mkfontscale/Makefile.am b/app/mkfontscale/Makefile.am index 1337a075c..9a09d882f 100644 --- a/app/mkfontscale/Makefile.am +++ b/app/mkfontscale/Makefile.am @@ -21,7 +21,8 @@ bin_PROGRAMS = mkfontscale -mkfontscale_CFLAGS = @MKFONTSCALE_CFLAGS@ @X11_CFLAGS@ -D_BSD_SOURCE +AM_CPPFLAGS = @MKFONTSCALE_CFLAGS@ @X11_CFLAGS@ -D_BSD_SOURCE +AM_CFLAGS = $(CWARNFLAGS) mkfontscale_LDADD = @MKFONTSCALE_LIBS@ mkfontscale_SOURCES = \ @@ -66,3 +67,18 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): sed $(MAN_SUBSTS) < $< > $@ + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog + +if LINT +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) + +lint: + $(LINT) $(ALL_LINT_FLAGS) $(mkfontscale_SOURCES) +endif LINT diff --git a/app/mkfontscale/Makefile.in b/app/mkfontscale/Makefile.in index 55388c07e..cb28b6b20 100644 --- a/app/mkfontscale/Makefile.in +++ b/app/mkfontscale/Makefile.in @@ -76,9 +76,8 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_mkfontscale_OBJECTS = mkfontscale-hash.$(OBJEXT) \ - mkfontscale-ident.$(OBJEXT) mkfontscale-list.$(OBJEXT) \ - mkfontscale-mkfontscale.$(OBJEXT) +am_mkfontscale_OBJECTS = hash.$(OBJEXT) ident.$(OBJEXT) list.$(OBJEXT) \ + mkfontscale.$(OBJEXT) mkfontscale_OBJECTS = $(am_mkfontscale_OBJECTS) mkfontscale_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. @@ -147,6 +146,10 @@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINT = @LINT@ +LINT_FALSE = @LINT_FALSE@ +LINT_FLAGS = @LINT_FLAGS@ +LINT_TRUE = @LINT_TRUE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ @@ -209,7 +212,8 @@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -mkfontscale_CFLAGS = @MKFONTSCALE_CFLAGS@ @X11_CFLAGS@ -D_BSD_SOURCE +AM_CPPFLAGS = @MKFONTSCALE_CFLAGS@ @X11_CFLAGS@ -D_BSD_SOURCE +AM_CFLAGS = $(CWARNFLAGS) mkfontscale_LDADD = @MKFONTSCALE_LIBS@ mkfontscale_SOURCES = \ data.h \ @@ -224,7 +228,7 @@ mkfontscale_SOURCES = \ appman_PRE = mkfontscale.man appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) -EXTRA_DIST = $(appman_PRE) ChangeLog +EXTRA_DIST = $(appman_PRE) CLEANFILES = $(appman_DATA) SED = sed @@ -245,7 +249,9 @@ MAN_SUBSTS = \ -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' SUFFIXES = .$(APP_MAN_SUFFIX) .man -MAINTAINERCLEANFILES = ChangeLog +@LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +@LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) + all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am @@ -334,10 +340,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfontscale-hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfontscale-ident.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfontscale-list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfontscale-mkfontscale.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ident.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkfontscale.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @@ -352,62 +358,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -mkfontscale-hash.o: hash.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-hash.o -MD -MP -MF "$(DEPDIR)/mkfontscale-hash.Tpo" -c -o mkfontscale-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-hash.Tpo" "$(DEPDIR)/mkfontscale-hash.Po"; else rm -f "$(DEPDIR)/mkfontscale-hash.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hash.c' object='mkfontscale-hash.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-hash.o `test -f 'hash.c' || echo '$(srcdir)/'`hash.c - -mkfontscale-hash.obj: hash.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-hash.obj -MD -MP -MF "$(DEPDIR)/mkfontscale-hash.Tpo" -c -o mkfontscale-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-hash.Tpo" "$(DEPDIR)/mkfontscale-hash.Po"; else rm -f "$(DEPDIR)/mkfontscale-hash.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hash.c' object='mkfontscale-hash.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-hash.obj `if test -f 'hash.c'; then $(CYGPATH_W) 'hash.c'; else $(CYGPATH_W) '$(srcdir)/hash.c'; fi` - -mkfontscale-ident.o: ident.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-ident.o -MD -MP -MF "$(DEPDIR)/mkfontscale-ident.Tpo" -c -o mkfontscale-ident.o `test -f 'ident.c' || echo '$(srcdir)/'`ident.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-ident.Tpo" "$(DEPDIR)/mkfontscale-ident.Po"; else rm -f "$(DEPDIR)/mkfontscale-ident.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ident.c' object='mkfontscale-ident.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-ident.o `test -f 'ident.c' || echo '$(srcdir)/'`ident.c - -mkfontscale-ident.obj: ident.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-ident.obj -MD -MP -MF "$(DEPDIR)/mkfontscale-ident.Tpo" -c -o mkfontscale-ident.obj `if test -f 'ident.c'; then $(CYGPATH_W) 'ident.c'; else $(CYGPATH_W) '$(srcdir)/ident.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-ident.Tpo" "$(DEPDIR)/mkfontscale-ident.Po"; else rm -f "$(DEPDIR)/mkfontscale-ident.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ident.c' object='mkfontscale-ident.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-ident.obj `if test -f 'ident.c'; then $(CYGPATH_W) 'ident.c'; else $(CYGPATH_W) '$(srcdir)/ident.c'; fi` - -mkfontscale-list.o: list.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-list.o -MD -MP -MF "$(DEPDIR)/mkfontscale-list.Tpo" -c -o mkfontscale-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-list.Tpo" "$(DEPDIR)/mkfontscale-list.Po"; else rm -f "$(DEPDIR)/mkfontscale-list.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='mkfontscale-list.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c - -mkfontscale-list.obj: list.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-list.obj -MD -MP -MF "$(DEPDIR)/mkfontscale-list.Tpo" -c -o mkfontscale-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-list.Tpo" "$(DEPDIR)/mkfontscale-list.Po"; else rm -f "$(DEPDIR)/mkfontscale-list.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='list.c' object='mkfontscale-list.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` - -mkfontscale-mkfontscale.o: mkfontscale.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-mkfontscale.o -MD -MP -MF "$(DEPDIR)/mkfontscale-mkfontscale.Tpo" -c -o mkfontscale-mkfontscale.o `test -f 'mkfontscale.c' || echo '$(srcdir)/'`mkfontscale.c; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-mkfontscale.Tpo" "$(DEPDIR)/mkfontscale-mkfontscale.Po"; else rm -f "$(DEPDIR)/mkfontscale-mkfontscale.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mkfontscale.c' object='mkfontscale-mkfontscale.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-mkfontscale.o `test -f 'mkfontscale.c' || echo '$(srcdir)/'`mkfontscale.c - -mkfontscale-mkfontscale.obj: mkfontscale.c -@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -MT mkfontscale-mkfontscale.obj -MD -MP -MF "$(DEPDIR)/mkfontscale-mkfontscale.Tpo" -c -o mkfontscale-mkfontscale.obj `if test -f 'mkfontscale.c'; then $(CYGPATH_W) 'mkfontscale.c'; else $(CYGPATH_W) '$(srcdir)/mkfontscale.c'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/mkfontscale-mkfontscale.Tpo" "$(DEPDIR)/mkfontscale-mkfontscale.Po"; else rm -f "$(DEPDIR)/mkfontscale-mkfontscale.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mkfontscale.c' object='mkfontscale-mkfontscale.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mkfontscale_CFLAGS) $(CFLAGS) -c -o mkfontscale-mkfontscale.obj `if test -f 'mkfontscale.c'; then $(CYGPATH_W) 'mkfontscale.c'; else $(CYGPATH_W) '$(srcdir)/mkfontscale.c'; fi` uninstall-info-am: install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @@ -636,7 +586,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am @@ -712,9 +661,12 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog + +@LINT_TRUE@lint: +@LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(mkfontscale_SOURCES) # 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: diff --git a/app/mkfontscale/README b/app/mkfontscale/README index e69de29bb..70dc9826b 100644 --- a/app/mkfontscale/README +++ b/app/mkfontscale/README @@ -0,0 +1,21 @@ +mkfontscale creates the fonts.scale and fonts.dir index files used by the +legacy X11 font system. + +Please submit bugs & patches to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/app/mkfontscale + + http://cgit.freedesktop.org/xorg/app/mkfontscale + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage diff --git a/app/mkfontscale/configure b/app/mkfontscale/configure index 58d5f850b..47fdec880 100644 --- a/app/mkfontscale/configure +++ b/app/mkfontscale/configure @@ -273,7 +273,7 @@ PACKAGE_VERSION='1.0.5' PACKAGE_STRING='mkfontscale 1.0.5' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG MKFONTSCALE_CFLAGS MKFONTSCALE_LIBS X11_CFLAGS X11_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG MKFONTSCALE_CFLAGS MKFONTSCALE_LIBS X11_CFLAGS X11_LIBS LINT LINT_FLAGS LINT_TRUE LINT_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -839,6 +839,8 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-lint Use a lint-style source code checker (default: + disabled) --with-release-version=STRING Use release version string in package name @@ -3325,6 +3327,49 @@ echo "${ECHO_T}yes" >&6 fi + + +# Allow checking code with lint, sparse, etc. + +# Check whether --with-lint or --without-lint was given. +if test "${with_lint+set}" = set; then + withval="$with_lint" + use_lint=$withval +else + use_lint=no +fi; +if test "x$use_lint" = "xyes" ; then + LINT="lint" +else + LINT="$use_lint" +fi +if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then + case $LINT in + lint|*/lint) + case $host_os in + solaris*) + LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" + ;; + esac + ;; + esac +fi + + + + + +if test x$LINT != xno; then + LINT_TRUE= + LINT_FALSE='#' +else + LINT_TRUE='#' + LINT_FALSE= +fi + + + + # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 @@ -3489,6 +3534,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF +XORG_CHANGELOG if test $host_cpu = sh; then case $host_os in @@ -3611,6 +3657,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${LINT_TRUE}" && test -z "${LINT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"LINT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -4190,6 +4243,10 @@ s,@MKFONTSCALE_CFLAGS@,$MKFONTSCALE_CFLAGS,;t t s,@MKFONTSCALE_LIBS@,$MKFONTSCALE_LIBS,;t t s,@X11_CFLAGS@,$X11_CFLAGS,;t t s,@X11_LIBS@,$X11_LIBS,;t t +s,@LINT@,$LINT,;t t +s,@LINT_FLAGS@,$LINT_FLAGS,;t t +s,@LINT_TRUE@,$LINT_TRUE,;t t +s,@LINT_FALSE@,$LINT_FALSE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/app/mkfontscale/configure.ac b/app/mkfontscale/configure.ac index 73e8b7cec..16497a0fa 100644 --- a/app/mkfontscale/configure.ac +++ b/app/mkfontscale/configure.ac @@ -43,8 +43,12 @@ AC_SUBST(MKFONTSCALE_LIBS) PKG_CHECK_MODULES(X11, xproto) AC_SUBST(X11_CFLAGS) +dnl Allow checking code with lint, sparse, etc. +XORG_WITH_LINT + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG if test $host_cpu = sh; then case $host_os in diff --git a/app/mkfontscale/ident.c b/app/mkfontscale/ident.c index 80452e6d9..544583398 100644 --- a/app/mkfontscale/ident.c +++ b/app/mkfontscale/ident.c @@ -19,6 +19,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * + * 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, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ /* $XFree86: xc/programs/mkfontscale/ident.c,v 1.3tsi Exp $ */ /* The function identifyBitmap returns -1 if filename is definitively not @@ -26,11 +53,17 @@ and 0 if it should be processed normally. identifyBitmap is much faster than parsing the whole font. */ +#include "config.h" + #include #include #include "zlib.h" #include "ident.h" +#ifdef X_BZIP2_FONT_COMPRESSION +# include +#endif + #define PCF_VERSION (('p'<<24)|('c'<<16)|('f'<<8)|1) #define PCF_PROPERTIES (1 << 0) @@ -40,40 +73,150 @@ typedef struct _Prop { unsigned value; } PropRec, *PropPtr; -static int pcfIdentify(gzFile f, char **name); -static int bdfIdentify(gzFile f, char **name); +#ifdef X_BZIP2_FONT_COMPRESSION +typedef struct { + enum { gzFontFile, bz2FontFile } type; + union { + gzFile gz; + BZFILE *bz2; + } f; + unsigned pos; +} fontFile; + +static inline void * +fontFileOpen(fontFile *ff, const char *filename) { + int n = strlen(filename); + + if (strcmp(filename + n - 4, ".bz2") == 0) { + ff->type = bz2FontFile; + ff->f.bz2 = BZ2_bzopen(filename, "rb"); + ff->pos = 0; + return ff->f.bz2; + } else { + ff->type = gzFontFile; + ff->f.gz = gzopen(filename, "rb"); + return ff->f.gz; + } +} + +static inline int +fontFileRead(fontFile *ff, void *buf, unsigned len) +{ + if (ff->type == gzFontFile) { + return gzread(ff->f.gz, buf, len); + } else { + int r = BZ2_bzread(ff->f.bz2, buf, len); + ff->pos += r; + return r; + } +} + +static inline int +fontFileGetc(fontFile *ff) +{ + if (ff->type == gzFontFile) { + return gzgetc(ff->f.gz); + } else { + char buf; + if (BZ2_bzread(ff->f.bz2, &buf, 1) != 1) { + return -1; + } else { + ff->pos += 1; + return (int) buf; + } + } +} + +static int +fontFileSeek(fontFile *ff, z_off_t offset, int whence) +{ + if (ff->type == gzFontFile) { + return gzseek(ff->f.gz, offset, whence); + } else { + /* bzlib has no easy equivalent so we have to fake it, + * fortunately, we only have to handle a couple of cases + */ + int n; + char buf[BUFSIZ]; + + switch (whence) { + case SEEK_SET: + n = offset - ff->pos; + break; + case SEEK_CUR: + n = offset; + break; + default: + return -1; + } + + while (n > BUFSIZ) { + if (BZ2_bzread(ff->f.bz2, buf, BUFSIZ) != BUFSIZ) + return -1; + n -= BUFSIZ; + } + if (BZ2_bzread(ff->f.bz2, buf, n) != n) + return -1; + ff->pos = offset; + return offset; + } +} + + +static inline int +fontFileClose(fontFile *ff) +{ + if (ff->type == gzFontFile) { + return gzclose(ff->f.gz); + } else { + BZ2_bzclose(ff->f.bz2); + return 0; + } +} + +#else /* no bzip2, only gzip */ +typedef gzFile fontFile; +# define fontFileOpen(ff, filename) (*(ff) = gzopen(filename, "rb")) +# define fontFileRead(ff, buf, len) gzread(*(ff), buf, len) +# define fontFileGetc(ff) gzgetc(*(ff)) +# define fontFileSeek(ff, off, whence) gzseek(*(ff), off, whence) +# define fontFileClose(ff) gzclose(*(ff)) +#endif + +static int pcfIdentify(fontFile *f, char **name); +static int bdfIdentify(fontFile *f, char **name); static int -getLSB32(gzFile f) +getLSB32(fontFile *f) { int rc; unsigned char c[4]; - rc = gzread(f, c, 4); + rc = fontFileRead(f, c, 4); if(rc != 4) return -1; return (c[0]) | (c[1] << 8) | (c[2] << 16) | (c[3] << 24); } static int -getInt8(gzFile f, int format) +getInt8(fontFile *f, int format) { unsigned char c; int rc; - rc = gzread(f, &c, 1); + rc = fontFileRead(f, &c, 1); if(rc != 1) return -1; return c; } static int -getInt32(gzFile f, int format) +getInt32(fontFile *f, int format) { int rc; unsigned char c[4]; - rc = gzread(f, c, 4); + rc = fontFileRead(f, c, 4); if(rc != 4) return -1; @@ -84,43 +227,27 @@ getInt32(gzFile f, int format) } } -static int -pcfskip(gzFile f, int n) -{ - char buf[32]; - int i, rc; - while(n > 0) { - i = (n > 32 ? 32 : n); - rc = gzread(f, buf, i); - if(rc != i) - return -1; - n -= rc; - } - return 1; -} - int -bitmapIdentify(char *filename, char **name) +bitmapIdentify(const char *filename, char **name) { - gzFile f; + fontFile ff; int magic; - f = gzopen(filename, "rb"); - if(f == NULL) - return -1; + if (fontFileOpen(&ff, filename) == NULL) + return -1; - magic = getLSB32(f); + magic = getLSB32(&ff); if(magic == PCF_VERSION) - return pcfIdentify(f, name); + return pcfIdentify(&ff, name); else if(magic == ('S' | ('T' << 8) | ('A' << 16) | ('R') << 24)) - return bdfIdentify(f, name); + return bdfIdentify(&ff, name); - gzclose(f); + fontFileClose(&ff); return 0; } static int -pcfIdentify(gzFile f, char **name) +pcfIdentify(fontFile *f, char **name) { int prop_position; PropPtr props = NULL; @@ -146,7 +273,7 @@ pcfIdentify(gzFile f, char **name) if(prop_position < 0) goto fail; - rc = gzseek(f, prop_position, SEEK_SET); + rc = fontFileSeek(f, prop_position, SEEK_SET); if(rc < 0) goto fail; @@ -166,7 +293,7 @@ pcfIdentify(gzFile f, char **name) props[i].value = getInt32(f, format); } if(nprops & 3) { - rc = pcfskip(f, 4 - (nprops & 3)); + rc = fontFileSeek(f, 4 - (nprops & 3), SEEK_CUR); if(rc < 0) goto fail; } @@ -178,7 +305,7 @@ pcfIdentify(gzFile f, char **name) if(!strings) goto fail; - rc = gzread(f, strings, string_size); + rc = fontFileRead(f, strings, string_size); if(rc != string_size) goto fail; @@ -201,26 +328,26 @@ pcfIdentify(gzFile f, char **name) *name = s; free(strings); free(props); - gzclose(f); + fontFileClose(f); return 1; fail: if(strings) free(strings); if(props) free(props); - gzclose(f); + fontFileClose(f); return 0; } #define NKEY 20 static char* -getKeyword(gzFile *f, int *eol) +getKeyword(fontFile *f, int *eol) { static char keyword[NKEY + 1]; int c, i; i = 0; while(i < NKEY) { - c = gzgetc(f); + c = fontFileGetc(f); if(c == ' ' || c == '\n') { if(i <= 0) return NULL; @@ -237,11 +364,11 @@ getKeyword(gzFile *f, int *eol) } static int -bdfskip(gzFile *f) +bdfskip(fontFile *f) { int c; do { - c = gzgetc(f); + c = fontFileGetc(f); } while(c >= 0 && c != '\n'); if(c < 0) return -1; @@ -249,7 +376,7 @@ bdfskip(gzFile *f) } static char * -bdfend(gzFile *f) +bdfend(fontFile *f) { int c; char *buf = NULL; @@ -257,7 +384,7 @@ bdfend(gzFile *f) int i = 0; do { - c = gzgetc(f); + c = fontFileGetc(f); } while (c == ' '); while(i < 1000) { @@ -282,7 +409,7 @@ bdfend(gzFile *f) return buf; } buf[i++] = c; - c = gzgetc(f); + c = fontFileGetc(f); } fail: @@ -292,7 +419,7 @@ bdfend(gzFile *f) } static int -bdfIdentify(gzFile f, char **name) +bdfIdentify(fontFile *f, char **name) { char *k; int rc; @@ -320,12 +447,12 @@ bdfIdentify(gzFile f, char **name) if(k == NULL) goto fail; *name = k; - gzclose(f); + fontFileClose(f); return 1; } else if(strcmp(k, "CHARS") == 0) goto fail; } fail: - gzclose(f); + fontFileClose(f); return 0; } diff --git a/app/mkfontscale/ident.h b/app/mkfontscale/ident.h index 03933a39b..c2063e580 100644 --- a/app/mkfontscale/ident.h +++ b/app/mkfontscale/ident.h @@ -25,6 +25,6 @@ #ifndef _MKS_IDENT_H_ #define _MKS_IDENT_H_ 1 -int bitmapIdentify(char *filename, char **xlfd); +int bitmapIdentify(const char *filename, char **xlfd); #endif /* _MKS_IDENT_H_ */ diff --git a/app/mkfontscale/mkfontscale.c b/app/mkfontscale/mkfontscale.c index e6aacd7e2..3497d957e 100644 --- a/app/mkfontscale/mkfontscale.c +++ b/app/mkfontscale/mkfontscale.c @@ -740,6 +740,10 @@ filePrio(char *filename) return 4; if(strcmp(filename + n - 3, ".gz") == 0) return 3; +#ifdef X_BZIP2_FONT_COMPRESSION + if(strcmp(filename + n - 4, ".bz2") == 0) + return 2; +#endif if(strcmp(filename + n - 2, ".Z") == 0) return 2; if(strcmp(filename + n - 4, ".bdf") == 0) diff --git a/app/mkfontscale/mkfontscale.man b/app/mkfontscale/mkfontscale.man index 3a2ca9523..b04285c72 100644 --- a/app/mkfontscale/mkfontscale.man +++ b/app/mkfontscale/mkfontscale.man @@ -1,6 +1,6 @@ .\" $XFree86: xc/programs/mkfontscale/mkfontscale.man,v 1.4 2003/06/20 15:49:52 eich Exp $ .\" -.TH MKFONTSCALE 1 __vendorversion__ +.TH MKFONTSCALE __appmansuffix__ __vendorversion__ .SH NAME mkfontscale \- create an index of scalable font files for X .SH SYNOPSIS @@ -53,7 +53,7 @@ The resulting .B fonts.scale file should be checked and possibly manually edited before being used as input for the -.BR mkfontdir (1) +.BR mkfontdir (__appmansuffix__) program. .SH OPTIONS .TP @@ -110,7 +110,7 @@ written to an "encodings.dir" file in every font directory. .B -p Specifies a prefix that is prepended to the encoding file path names when they are written to the "encodings.dir" file. The prefix is -prepended litterally: if a `/' is required between the prefix and the path +prepended literally: if a `/' is required between the prefix and the path names, it must be supplied explicitly as part of the prefix. .TP .B \-r @@ -129,14 +129,14 @@ is useful when generating encoding directories only. .B \-\- end of options. .SH SEE ALSO -X(__miscmansuffix__), Xserver(1), mkfontdir(1), ttmkfdir(1), xfs(1), xset(1) +X(__miscmansuffix__), Xserver(__appmansuffix__), mkfontdir(__appmansuffix__), ttmkfdir(__appmansuffix__), xfs(__appmansuffix__), xset(__appmansuffix__) .SH NOTES The format of the .BR fonts.scale , .B fonts.dir and .B encodings.dir -files is documented in the mkfontdir(1) manual page. +files is documented in the mkfontdir(__appmansuffix__) manual page. .B Mkfontscale will overwrite any @@ -149,7 +149,7 @@ is equivalent to .SH AUTHOR The version of .B mkfontscale -included in this X.Org Foundataion release was originally written by +included in this X.Org Foundation release was originally written by Juliusz Chroboczek for the XFree86 project. The functionality of this program was inspired by the .B ttmkfdir -- cgit v1.2.3