summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-07-06Remove extraneous duplicate checks for -r & -n optionsAlan Coopersmith
Flagged by cppcheck 1.65: [mkfontscale.c:247]: (style) Expression is always false because 'else if' condition matches previous condition at line 224. [mkfontscale.c:245]: (style) Expression is always false because 'else if' condition matches previous condition at line 227. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-06-02autogen.sh: Honor NOCONFIGURE=1Alan Coopersmith
See http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-02configure: Drop AM_MAINTAINER_MODEAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-03-19Only include config.h if it exists.Thomas Klausner
Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2014-01-02Fix possible malloc allocation error found by clang static analysisJeremy Huddleston Sequoia
list.c:238:23: warning: Call to 'malloc' has an allocation size of 0 bytes ListPtr *sorted = malloc(l * sizeof(ListPtr)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-02Plug a memory leak found by clang static analysisJeremy Huddleston Sequoia
mkfontscale.c:635:25: warning: Potential leak of memory pointed to by 'notice' foundry = notice_foundry(notice); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ mkfontscale.c:640:8: warning: Potential leak of memory pointed to by 'notice' if(strcmp(slant, "i") == 0) { ^~~~~~ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2013-11-22Print which option was in error along with usage messageAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-22Make usage() always exit(1)Alan Coopersmith
Avoid duplicating exit(1) calls after every single call to usage() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-22Add -v flag to print program versionAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-11-22Add missing newline to usage outputAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2013-07-16mkfontscale 1.1.1mkfontscale-1.1.1Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-06Protect config.h inclusion like usual.Thomas Klausner
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-22Document -u/-U options in man pagePeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-19Replace malloc(strlen);strcpy() calls with strdupAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-19Since hash() returns unsigned int, store results in unsigned intsAlan Coopersmith
Clears clang warnings: hash.c:82:13: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] int i = hash(key); ~ ^~~~~~~~~ hash.c:94:13: warning: implicit conversion changes signedness: 'unsigned int' to 'int' [-Wsign-conversion] int i = hash(key); ~ ^~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-11Fix compilation for MinGWEgbert Eich
Fix compilation for MinGW since 9cbe3256bc932b82f2435b23cda0931f4f5f5ba2 Unfortunately, MinGW doesn't define S_ISLNK, so check for that as well. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
2013-01-10Prefer original file over symlink (v2)Egbert Eich
If a symlink to a fontfile in the same directory exists the file that got picked depends on the order in which readdir() picked entries. This patch gives the file a higher preference than the symlink to it so it will be preferred if the xlfd entries match. v2: Followed a suggestion by Julien Cristau <jcristau@debian.org> to check for DT_LNK being defined instead of _BSD_SOURCE and fall back to lstat() if d_type is DT_UNKNOWN. Signed-off-by: Egbert Eich <eich@freedesktop.org>
2012-02-10mkfontscale 1.1.0mkfontscale-1.1.0Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-20mkfontscale: fix Culmus entries to precede URWMaxim Iorsh
Culmus must precede URW and Bitstream in notice list, since its fonts are based on URW/Bitstream sometimes. Signed-off-by: Maxim Iorsh <iorsh@users.sourceforge.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-18Add Culmus foundry to the vendor list for TrueType & Type1 fontsMaxim Iorsh
Maps fonts produced by the Culmus project <http://culmus.sourceforge.net> to the XLFD foundry name "culmus" For TrueType fonts, maps the vendor code "CLM" from the TrueType vendor id field. For Type1 fonts, which use heuristics to guess mappings to XLFD foundries from words in the copyright notice, add the names of the main contributors to the Culmus product to recognize the fonts under their copyright. Signed-off-by: Maxim Iorsh <iorsh@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-04Strip trailing whitespaceAlan Coopersmith
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-04Add const attributes to fix gcc -Wwrite-strings warningsAlan Coopersmith
Does not fix all of them since some lists contain constant strings and some contain dynamically allocated strings that need to be freed later. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-04Mark format string argument to dsprintf as const char *Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-04mkfontscale: Support FontForge weight designations.Maxim Iorsh
Fontforge uses 'ExtraLight' and 'Heavy' weights in Type 1 fonts, which should be understood by mkfontscale. Other FontForge designations are already addressed. Signed-off-by: Maxim Iorsh <iorsh@users.sourceforge.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-29mkfontscale 1.0.9mkfontscale-1.0.9Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-25Add _X_ATTRIBUTE_PRINTF to functions taking printf format argumentsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-08Dead code removalJeremy Huddleston
have_face is initialized to 0 at the beginning of the loop, so no need to set it to 0 just before it goes out of scope at the end of the loop. mkfontscale.c:945:13: warning: Value stored to 'have_face' is never read have_face = 0; ^ ~ Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-03-01makeList: free partially allocated list on failureAlan Coopersmith
Error: Memory leak (CWE 401) Memory leak of pointer 'first' allocated with malloc(8) at line 192 of list.c in function 'makeList'. 'first' allocated at line 181 with malloc(8). first leaks when next == 0 at line 191. [ This bug was found by the Parfait 0.3.6 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-03-01Leave room for null terminator in file & font name arraysAlan Coopersmith
fscanf %s arguments don't include the trailing \0 byte in their counts. Error: Buffer overrun Buffer overflow (CWE 120): Use of fscanf(%1024[), with buffer 'font' Array size is 1024 bytes at line 707 of mkfontscale.c in function 'readFontScale'. Buffer overflow (CWE 120): Use of fscanf(%1024s), with buffer 'file' Array size is 1024 bytes at line 707 of mkfontscale.c in function 'readFontScale'. [ This bug was found by the Parfait 0.3.6 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-02-14Sort contents of encodings.dirAlan Coopersmith
Allows easier comparison between builds to detect changes. Helps reduce deltas in packaging systems that compare old & new versions. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-19config: move man pages into their own directoryGaetan Nadon
Use services provided by XORG_MANPAGE_SECTIONS. Use standard Makefile for man pages. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-13Remove unused NEED_SNPRINTF code to #include non-existent snprintf.cAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-13Make fscanf format string constant so it can be checked at compile timeAlan Coopersmith
Clears gcc warning of: mkfontscale.c:714: warning: format not a string literal, argument types not checked Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-13config: Add missing AC_CONFIG_SRCDIRAlan Coopersmith
Regroup AC statements under the Autoconf initialization section. Regroup AM statements under the Automake initialization section. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-13man: remove trailing spaces and tabsGaetan Nadon
Using s/[ \t]*$// Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-12config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSGaetan Nadon
This silences an Autoconf warning
2010-10-29mkfontscale 1.0.8mkfontscale-1.0.8Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29Remove unnecessary calls from configure.acAlan Coopersmith
XORG_DEFAULT_OPTIONS calls AC_PROG_CC and AC_PROG_INSTALL PKG_CHECK_MODULES calls AC_SUBST on LIBS & CFLAGS variables Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29config: upgrade to util-macros 1.8 for additional man page supportAlan Coopersmith
Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS Enables use of platform appropriate version of sed. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29config: update AC_PREREQ statement to 2.60Gaetan Nadon
Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-10-29Sun's copyrights now belong to OracleAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
2010-01-14Update Sun license notices to current X.Org standard formAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-11-26Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILESGaetan Nadon
Now that the INSTALL file is generated. Allows running make maintainer-clean.
2009-10-28INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206Gaetan Nadon
Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet.
2009-10-22.gitignore: use common defaults with custom section # 24239Gaetan Nadon
Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults.
2009-10-10mkfontscale 1.0.7mkfontscale-1.0.7Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-10Add link to SubmittingPatches wiki page to READMEAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-10-10Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONSAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-01-16Silence sparse warnings and update .gitignore.Paulo Cesar Pereira de Andrade