| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
Introduces mallocarray as a macro calling reallocarray with a NULL
pointer for the old allocation.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
| |
Replace strcpy, strcat, sprintf with strlcpy, strlcat, snprintf
everywhere, even where there were already bounds checks in place,
to reduce time spent checking static analysis results.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
| |
gcc6 chirps an indentation warning here, but really this is bad code.
Effectively this would ignore en_US or en_UK names for the font, despite
that those are the English names the font is most likely to have.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Found by clang static analysis:
Result of 'calloc' is converted to a pointer of type 'int', which is
incompatible with sizeof operand type 'int *'
This is likely benign because the old size was larger on any platform where
sizeof(int) <= sizeof(void *), which is everywhere.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the weak symbol adventures and makes all of the calls
back to the X server or Font server go through a table of functions
instead, clarifying the required API.
As this is a rather major change to the API for the library, it now
installs itself as libXfont2 instead of libXfont, and the package
config file is now xfont2.pc.
All of the installed headers remain the same as the original library;
there's now a new include file, libxfont2.h, which defines the X
server and Font server interfaces.
This moves util/atom.c to stubs/atom.c and reformats that file, hence
the diff being larger than it would otherwise be.
v2: Rename to libXfont2 instead of libXfont_2 as suggested by Emil Velikov
Fix whitespace in stubs/atom.c, which was moved from util/
v3: Remove select masks from API. Expose single 'font_init' function
for all library initialization.
v4: Change name of distributed tarballs to libXfont2 as well
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Mostly signed vs unsigned comparisons
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
The argument must be an unsigned char or -1; in these cases
we know it's not -1 so cast it to unsigned char.
Fixes
warning: array subscript is of type 'char' [-Wchar-subscripts]
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
|
|
|
|
|
|
|
|
| |
"FreeType" is only eight bytes long. The atom "FreeType\x00\x??" is
probably not what the author intended.
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many const char issues.
One extra 'i' declared in ScaleFont; we can just use the same 'i' as
exists at the top level scope.
Also ignore bad-function-cast in ftfuncs.c and bitscale.c because
we're casting the return value from floor or ceil from double to
int. As floor and ceil are kinda designed to generate integer results,
it's pretty clear that we're doing what we want and that the compiler
is generating noise. I'm not sure why bad-function-cast is ever a good
warning to turn on, but I'll leave that for another day.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
|
|
|
|
|
|
|
| |
Found by cppcheck 1.63:
[FreeType/xttcap.c:621] -> [FreeType/xttcap.c:624]: (performance)
Variable 'len' is reassigned a value before the old one has been used.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ftfuncs.c, since the buffer being reallocated is a function local
buffer, used to accumulate data for a single run of the function and
then freed at the end of the function, we just free the old buffer if
realloc fails.
In atom.c however, the ReverseMap is a static buffer, so we operate in
temporary variables until we know we're successful, then update the
static variables. If we fail, we leave the old static variables in place,
since they contain data about previous atoms we should maintain, not lose.
Reported by cppcheck:
[lib/libXfont/src/FreeType/ftfuncs.c:2122]: (error) Common realloc mistake:
'ranges' nulled but not freed upon failure
[lib/libXfont/src/util/atom.c:126]: (error) Common realloc mistake:
'reverseMap' nulled but not freed upon failure
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
| |
Missed in xalloc -> malloc etal conversion in 0cdc9b8f850342
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html
- Support for the long-deprecated INCLUDES variable will be removed
altogether in Automake 1.14. The AM_CPPFLAGS variable should be
used instead.
This variable was deprecated in Automake releases prior to 1.10, which is
the current minimum level required to build X.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
|
|
|
| |
Assume for a moment that the intention here is to do
something useful.
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
| |
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
|
|
|
| |
Distribute ChangeLog but not autogen.sh.
Use a single toplevel .gitignore file, instead of one per subdirectory.
|
| |
|
|
|
|
| |
Simplify the freetype renderer list to match.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically the code is now compiled as if FONTMODULE was never defined,
but also removed some "magic" defining _XOPEN_SOURCE before including
math.h.
Also removed some #if 0'ed code instead of fixing prototypes inside
the "dead code".
Changes to spdo_prv.h were due to defines like:
<hash>define foo() sp_foo()
that would not compile with the ansification in the format:
type foo(void)
due to the macro receiving "void" as an argument.
|
|
|
|
| |
This lets the user set CFLAGS when running make.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I configure libXfont-1.3.2 with --disable-bdfformat and link it against
FreeType that is built without BDF support, I get the following link error:
libXfont.so: undefined reference to ‘FT_Get_BDF_Charset_ID’
I fixed it by checking XFONT_BDFFORMAT and if BDF support is disabled, the call
to FT_Get_BDF_Charset_ID() is omitted and the result code is set as if the call
had failed.
Signed-off-by: James Cloos <cloos@jhcloos.com>
|
|
|
|
|
|
| |
Fixes compiler warning:
../../../src/FreeType/ftfuncs.c: In function 'restrict_code_range_by_str':
../../../src/FreeType/ftfuncs.c:2081: warning: implicit declaration of function 'isspace'
|
| |
|
| |
|
| |
|
|
|
|
| |
Seriously, if you don't already have this, you've already lost.
|
| |
|
| |
|
|
|
|
| |
Freetype no longer installs them.
|
| |
|
| |
|
| |
|
|
|
|
| |
<X11/fonts/*.h>
|
|
|
|
|
|
|
|
| |
combined options, and so that the default matches the monolithic
defaults
Extent fontconf.h to cover all formats
Typo in src/Makefile.am failed to link in Type1 library
Missing xttcap.c from FreeType shim library.
|
|
|
|
| |
found when building in the modular tree
|
| |
|
|
|
|
|
|
|
| |
<https://bugs.freedesktop.org/attachment.cgi?id=2332> This patch avoids
79 gcc-3.4.3 warnings 'xxx' declared `static' but never defined mostly
due to including "ftfuncs.h" with the declaration of static functions
defined in "ftfuncs.c". (Peter Breitenlohner)
|
|
|
|
|
|
|
|
| |
Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings.
Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all
source files in the xserver/xorg tree, predicated on defines of
HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to
<X11/fonts/foo.h>.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
xc/programs/bdftopcf/ due missing `FT_STREAM_SEEK'/`FT_STREAM_POS'
symbols.
|