Commit Graph

56 Commits

Author SHA1 Message Date
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
David Seifert 435d41d5ff Fix building with `-fno-common`
* GCC 10 will switch the default to `-fno-common`.
  https://gcc.gnu.org/PR85678

Bug: https://bugs.gentoo.org/705880
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-01-27 21:46:31 +00:00
Sven Joachim 47387916fb Fix various spelling errors 2019-10-01 17:05:28 +00:00
Adam Jackson d13cd3862e dmx: Silence a string truncation warning.
../hw/dmx/config/dmxparse.c: In function ‘dmxConfigCreateOption’:
../hw/dmx/config/dmxparse.c:385:13: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
             strncpy(option->string + offset, p->string, len);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../hw/dmx/config/dmxparse.c:383:23: note: length computed here
             int len = strlen(p->string);
                       ^~~~~~~~~~~~~~~~~

The thing it's warning about is intentional, the surrounding code does
its own nul-termination. Make that obvious by using memcpy instead.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-04-05 14:18:44 -04:00
Adam Jackson 2e497bf887 man: s/__/@/g
A cosmetic change for automake (though we have to replicate some of
xorg-macros.m4 in manpages.am now), but meson's configure_file() wants
@-delimited strings.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:13:17 -04:00
Adam Jackson 47f047462d meson: Fix linking the dmx utilities
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-27 15:19:31 -04:00
Eric Anholt 1549e30372 Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far.  The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet.  The unit tests are also not done.

The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools.  meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.

v2: Fix indentation nits, move version declaration to project(), use
    existing meson_options for version-config.h's vendor name/web.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 15:25:27 -07:00
Adam Jackson a55e0bc56f dmx: Silence unused variable warning in dmxcompat
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-12-08 18:20:13 -05:00
Adam Jackson 2730ccb803 dmx: Silence lex/yacc-related config parser warnings
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-12-08 18:20:00 -05:00
Alan Coopersmith 0018784cdd Convert hw/dmx to new *allocarray functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:58:08 -07:00
Alan Coopersmith 11af200b00 dmx: move format strings inline so gcc can check
Gets rid of gcc 4.8 warnings:

dmxprint.c: In function ‘dmxConfigPrintPair’:
dmxprint.c:284:25: warning: format not a string literal,
  argument types not checked [-Wformat-nonliteral]
                         p->ysign < 0 ? '-' : '+', p->y);
                         ^
dmxprint.c:289:9: warning: format not a string literal,
  argument types not checked [-Wformat-nonliteral]
         dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y);
         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10 18:14:44 -08:00
Alan Coopersmith 5e01eac10e dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput()
Gets rid of gcc 4.8 warnings:

dmxparse.c: In function ‘dmxConfigLog’:
dmxparse.c:61:5: warning: function might be possible candidate for
 ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
     vprintf(format, args);      /* RATS: All calls to dmxConfigLog from
     ^

dmxprint.c: In function ‘dmxConfigOutput’:
dmxprint.c:149:9: warning: function might be possible candidate for
 ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
         pos += vfprintf(str, format, args);     /* assumes no newlines! */

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
2015-02-10 18:14:44 -08:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Alan Coopersmith 935ea0d7b5 dmxConfigCanvasUpdate: Delay dereference until after checking for NULL
Flagged by cppcheck 1.64:
[hw/dmx/config/xdmxconfig.c:306] -> [hw/dmx/config/xdmxconfig.c:323]:
 (warning) Possible null pointer dereference: fs - otherwise
           it is redundant to check it against null.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 20:54:22 -07:00
Keith Packard c85e26d599 Bunch of DMX warning fixes
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:49 -08:00
Alan Coopersmith 6bca0184d1 dmxVDLRead: if we opened a file, close it instead of leaking it
Reported with other leaks found by cppcheck in bugzilla #50281
https://bugs.freedesktop.org/show_bug.cgi?id=50281

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-04-24 14:22:36 -07:00
Peter Hutterer 1058fcf57f dmx: don't include dmx-config.h from xdmxconfig (#37502)
dmx-config.h is a server header which includes dix-config.h. That again
defines a bunch of server-specifics, including setting the size of XID to
32 bit.

libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being
16 bytes smaller in xdmxconfig than in the library, causing garbage to be
sent to the server.

X.Org Bug 37502 <http://bugs.freedesktop.org/show_bug.cgi?id=37502>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2013-02-08 13:47:17 +10:00
Yaakov Selkowitz ea1d76d1b6 Fix formatting of address operators
The formatter confused address operators preceded by casts with
bitwise-and expressions, placing spaces on either side of both.
That syntax isn't used by ordinary address operators, however,
so fix them for consistency.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-05 18:09:48 -06:00
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Alan Coopersmith d829a7c5cb Move to autoconf standard function name checks & defines
Replace multiple methods of checking for functions with AC_CHECK_FUNCS
Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS
Replace HAS_* and NEED_* #defines with autogenerated HAVE_*

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-12-05 14:32:45 -08:00
Jeremy Huddleston b2015a2c01 dmx: Build fix for -Werror=implicit-function-declaration on linux
Fixes regression introduced by: 6e6d732bac
Found-by: Tinderbox

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
CC: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-24 21:15:32 -08:00
Alan Coopersmith 6e6d732bac Convert strncpy/strncat to strlcpy/strlcat
As long as we're carrying around a compatibility copy in os/strl*.c,
might as well use them.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:05 -08:00
Alan Coopersmith 7b0f53f0a5 Fix Xdmx build on Linux to work with strlcpy changes
Include strlcpy.c in the  libdmxconfig.a library with the other functions
shared among the xdmx configuration programs.

Also add a #include "os.h" to the scanner.l file that now calls strlcpy
to include the prototype from $(top_srcdir)/include/os.h.

(To be squashed into
http://cgit.freedesktop.org/~alanc/xserver/commit/?id=c19f0ff5223d428f8ad2ab3c563c974c96a521ba
before next PULL request to avoid breaking bisection.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-23 11:06:34 -08:00
Jamey Sharp 87cc83474d Replace XmuSnprintf with snprintf.
Alan Coopersmith explains:

	XmuSnprintf() can be replaced by snprintf() now. (It was a
	implementation X provided for it's libraries to use in the days
	before all platforms we cared about had snprintf in libc.)

Reported-by: walter harms <wharms@bfs.de>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-19 15:16:04 -07:00
Cyril Brulebois 33dad2b74e hw/dmx: Stop using variables for text widgets.
They are unused in the sense they're not getting any callback set up, so
there's no point in storing them into variables. Keep the initial
alignment of the parameters to try and reduce the diff noise.

Those warnings go away accordingly:
|   CC     xdmxconfig-xdmxconfig.o
| xdmxconfig.c: In function ‘main’:
| xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable]
| xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable]

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-06-16 00:44:08 +02:00
Adam Jackson d127075da0 xdmxconfig: warning fix
xdmxconfig.c: In function ‘dmxConfigCanvasDraw’:
xdmxconfig.c:299:23: warning: ‘maxHeight’ may be used uninitialized in this function

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-01-20 21:03:55 -05:00
Gaetan Nadon 885a333009 man: refactor common code in the man pages makefiles
Create a manpages.am makefile snippet in the root dir.
Each man page makefile includes manpages.am.

Now all man pages in xserver are generated the same way
using the same method as all of other xorg modules.
All ".man.pre" files in git are ".man" now.
Links are no longer created between different file types.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:11:10 -08:00
Gaetan Nadon c86f7c2b8e Xdmx: build all man pages using XORG_MANPAGE_SECTIONS
Use standard directory and makefile.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:11:06 -08:00
Mikhail Gusarov 0a4d8cbdcd Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@

-if(E) { free(E); }
+free(E);

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06 20:27:18 +07:00
Yaakov Selkowitz 0820a6e2fb Fix .man.N targets for AM_SILENT_RULES
Add $(AM_V_GEN) for sed-based rules so they appear as expected with
automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm
commands which are not prone to fail.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:55 -05:00
Yaakov Selkowitz 9be4157391 Respect value of SED from configure
We now use libtool, which calls AC_PROG_SED and sets SED as the path to
a fully-functional 'sed' (which may also be called 'gsed' if GNU sed is
installed alongside a proprietary version).  Therefore we should respect
the value of SED so we are sure to use the correct one.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-03-22 00:45:54 -05:00
Gaetan Nadon c739beb439 .gitignore: use common defaults with custom section #24239
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.

Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-11 21:40:20 -08:00
Peter Hutterer 0b9dbd4bf2 Use the default XKB settings for dmx and kdrive.
Drop the dmx-specific defines, there's no reason to have separate ones
considering they're about as hardcoded as the default rules anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-20 13:32:11 +10:00
Peter Hutterer 7a588c833e dmx: Default rules are now base, not xfree86
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-13 10:30:16 +10:00
Dan Nicholson 5630ff8096 Ignore generated dmx manpages
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-01-18 09:49:06 -08:00
Dan Nicholson e1c8ee2157 Don't reuse PKG_CHECK_MODULES identifiers
Using GL for the PKG_CHECK_MODULES identifier multiple times means only
the first call will actually be used. Later calls will be skipped due to
GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a
different identifier and DMX to just reusing GL_CFLAGS.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-01-18 09:49:06 -08:00
Adam Jackson 8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Keith Packard 20e9144c07 Add $(DIX_CFLAGS) to remaining Makefile.am files 2006-11-07 12:49:28 -08:00
Daniel Stone 84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Alexander Gottwald 43324132af Added Mesa include directory 2006-02-22 16:08:56 +00:00
Alan Coopersmith a2a5254675 Add <string.h>, <stdlib.h>, and <stdio.h> to clear undefined function
warnings after the removal of libcwrapper headers.
2006-02-11 19:16:51 +00:00
Kevin E Martin 4a39354e14 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. 2005-12-06 22:48:51 +00:00
Kevin E Martin 7c00afd0ec Define XFree86Server only where it is required. 2005-12-02 06:02:45 +00:00
Alan Coopersmith 51a721a6db Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
2005-11-28 22:05:09 +00:00
Alan Coopersmith 267cbffa41 Bug #5019 <https://bugs.freedesktop.org/show_bug.cgi?id=5019> xserver
installs manpages into 'man1' instead of 'man1x'
2005-11-13 20:53:24 +00:00
Kevin E Martin 462a2407d5 Add xorg-server.m4 for driver dependency checking.
Update pkgcheck depedencies to work with separate build roots.
2005-11-01 15:01:51 +00:00
Adam Jackson dd0d010e9c Fix parallel builds my ensuring libdmxconfig builds first. 2005-10-18 19:14:08 +00:00
Kristian Høgsberg b349b20d78 Dist NOTES.
Dist helper shell scripts.
Dist XAA.HOWTO and a few more unused C files.
Dist xorgconf.cpp.
Fix DIST_EXTRA typo.
Clean yacc and lex generated files only during make maintainer-clean as we
    don't expect users to have those tools installed.
2005-10-13 18:08:24 +00:00
Kevin E Martin 9b894df44b Include dmx-config.h for modular build
Use <X11/extensions/dmxext.h> intead of "dmxext.h"
2005-10-06 02:40:41 +00:00