Commit graph

31 commits

Author SHA1 Message Date
Jon TURNEY
3d69b0a83e Don't try so hard to find a matching font with the given encoding
See http://sourceware.org/bugzilla/show_bug.cgi?id=10948

Currently, if the locale is UTF-8, no CJK fonts are installed, and someone
does XCreateFontSet() with a font name of "*", we end up asking the server
to list the (non-existent) fonts 11 times for each CJK encoding, which can
take a while.

A * wildcard can match multiple components in a XLFD name in XListFonts(),
so there's no need to try adding more than one to get a match.

We do try once with a leading '*-' in case the fontname isn't a full
well-formed XLFD name, maybe even that isn't needed?

(See also http://invisible-island.net/xterm/xterm.faq.html#slow_menus)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-12-13 22:27:08 -08:00
Alan Coopersmith
25a7a329de Remove even more casts of return values from Xmalloc/Xrealloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
5d47a39978 omGeneric.c: convert sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-08-20 12:50:47 -07:00
Alan Coopersmith
208e586c80 omGeneric: remove space between struct name & member name
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-27 01:12:45 -07:00
Alan Coopersmith
9399caf2c1 unifdef MUSTCOPY
MUSTCOPY seems to have only been defined in <X11/Xmd.h> when building for
CRAY, to handle missing some sizes of integer type.

(mostly performed with unifdef, followed by some manual cleanup of
 spacing/indenting in the remaining code)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-03 18:20:10 -08:00
Alan Coopersmith
b850adbdeb Convert malloc(strlen()); strcpy() sets to strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:18 -07:00
Alan Coopersmith
09194042d3 Replace Xmalloc+bzero pairs with Xcalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:13 -07:00
Ander Conselvan de Oliveira
ac1e2bff71 om: Fix memory leaks on get_font_name error paths.
While at it, remove unneeded check for NULL before Xfree.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:06:00 +03:00
Ander Conselvan de Oliveira
d749948f94 om: Fix potential memory leak in init_om.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
d0749d6abd om: Fix memory leak on read_EncodingInfo error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Josh Triplett
15e5eaf628 Remove support for building without XCB
And there was much rejoicing.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>

Consensus on #xorg-devel agrees with removing --without-xcb; in
particular, acks from Adam Jackson, Daniel Stone, Kristian Høgsberg,
Julien Cristau, and Rémi Cardona.
2010-06-03 22:19:14 -07:00
Gaetan Nadon
b5797597f8 config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-19 09:22:56 -05:00
Alan Coopersmith
ddb1786720 Purge CVS/RCS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 17:38:26 -08:00
Osamu Sayama
4d4676c0d6 set_fontset_extents crash after get_rotate_fontname fix in 2bef065b70
- In set_fontset_extents, check font_data is not NULL before running
  loop that may increment it to a non-NULL invalid pointer.
- Make sure get_rotate_fontname counts the final field

Fixes OpenSolaris bug 6913809: X application dumps core in ja_JP.UTF-8 locale
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6913809>

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-01-06 13:17:40 -08:00
Jeremy Huddleston
3bb020587c Split CFLAGS into CPPFLAGS and CFLAGS
On some build systems, CPPFLAGS is set to "-I/some/prefix/include".  If older
X11 headers are in /some/prefix/include, they will be preferred over the
shipped headers.  This corrects that problem.
2009-10-01 22:20:38 -07:00
Christoph Pfister
2bef065b70 X.Org Bug #21117: crash in get_rotate_fontname (omGeneric.c)
http://bugs.freedesktop.org/show_bug.cgi?id=21117

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-27 22:35:29 -07:00
Paulo Cesar Pereira de Andrade
8ba0ca32a6 Janitor: ansification, make distcheck, compiler warnings.
Only convert to use "ansi prototypes" the functions warned from
compilation with "./autogen.sh --prefix=/usr", on a Linux computer.

  Also, only address "trivial" compiler warning fixes in this commit.

  The new .gitignore is the output of a command like:
% find . -name .gitignore -exec cat {} \; | sort | uniq
and only the toplevel .gitignore file was kept.
2009-01-28 20:31:42 -02:00
Adam Jackson
f6af6dd2f7 Bug #14898: Don't abuse the sprintf() implementation.
The thing you're printing into should not itself appear in the list of
things to print from, that's bad juju.  Just use strcat().
2008-06-24 13:16:53 -04:00
Alan Coopersmith
cf49e53701 Strip whitespace from end of lines in source files 2008-06-17 14:41:17 -07:00
Tilman Sauerbeck
1c75a94790 Bug #10475: Fixed lots of char*/const char* mixups.
I didn't fix all of them, as that would require touching
public headers.
2007-04-06 11:59:31 +02:00
Jamey Sharp
f25b4b00e1 Move .cvsignore to .gitignore. 2006-02-19 12:28:41 -08:00
Jamey Sharp
881467b303 Merge the X11 and BIGREQS package sets: they were used in exactly the same places. 2006-02-19 02:14:11 +00:00
Kevin E Martin
9e96dbc343 Add check and cflags for malloc(0) returning NULL. 2005-12-03 04:41:47 +00:00
Keith Packard
6d84a8b132 Move i18n modules to top-level so they can be built in the right order (before xlib for non-loadable, after xlib for loadable).
Link i18n modules against xlib to resolve Xlib symbols used by them.
2005-07-15 04:08:51 +00:00
Alexander Gottwald
45f40126a7 Add $(top_srcdir)/src to include list 2005-07-14 19:50:00 +00:00
Keith Packard
d14cc5c896 Ammend AM_CFLAGS with all needed includes; cannot figure out an easy way to automate this. 2005-07-11 20:32:55 +00:00
Keith Packard
6e752ea120 Enable loadable i18n modules, making them configurable on the configure command line.
Clean up conditionals for XKB, XCMS, XLOCALEDIR
Create new lib directory for locale modules in ${X11_LIBDIR}/locale/lib. Add this to the default XLOCALEDIR search path.
Create separate X11_LOCALEDATADIR variable pointing at ${datadir}/X11/locale for installing locale data.
Split out xcms, xkb, xlibi18n sources from main xlib bits so they can be conditionally included more easily. Lots of source files have been moved with this step; the result seems like it might be easier to maintain.
Display message at end of configure script with selected options.
Fix manual building with cpp to add -traditional in cpprules.in. This isn't conditionalized at all, so it will break on systems not using GNU cpp.
2005-07-11 08:29:18 +00:00
Søren Sandmann Pedersen
7eee605e3a - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in <X11/...>
- For Xcomposite and Xdamage, don't link the build system out of the xc tree
- Link the public X11 headers into their own directory
- Add links to XKeysymDB and XErrorDB
- Add links to all the Xlib man pages
- Add links to the lcUniConv subdirectory
- Conditionally include config.h in Xlib source
2005-05-13 22:53:36 +00:00
Søren Sandmann Pedersen
6e884b1291 Tue Jul 20 19:38:06 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Set font_data->xlfd_data to NULL after XFree(). (#837, patch from Bastien Nocera).
Tue Jul 20 18:23:32 2004 Soeren Sandmann <sandmann@daimi.au.dk>
Use /dev/urandom on Linux.(#761).
2004-07-20 17:48:09 +00:00
Egbert Eich
c6349f4319 Merging XORG-CURRENT into trunk 2004-04-23 18:42:09 +00:00
Kaleb Keithley
deae12c6b6 R6.6 is the Xorg base-line 2003-11-14 15:54:30 +00:00