Commit Graph

175 Commits

Author SHA1 Message Date
Olivier Fourdan f2781e9536 xfree86/cvt: Drop cvt utility
The cvt utility is now replaced by the standalone version found in
libxcvt, no need to build the one in xfree86 anymore.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2021-08-06 11:29:29 +00:00
Olivier Fourdan f788289bdc xfree86: Use libxcvt
Replace the local implementation of the VESA CVT standard timing
modelines generator with the one from libxct to avoid code duplication.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2021-08-06 11:29:29 +00:00
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
Adam Jackson 4c1453393f gtf: Warning fix
../hw/xfree86/utils/gtf/gtf.c: In function ‘print_fb_mode’:
../hw/xfree86/utils/gtf/gtf.c:241:50: warning: cast from function call of type ‘double’ to non-matching type ‘int’ [-Wbad-function-cast]
     printf("    timings %d %d %d %d %d %d %d\n", (int) rint(1000000.0 / m->pclk),       /* pixclock in picoseconds */

That's pretty nitpicky of you, gcc, but at least it's easy to fix.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2018-04-05 14:18:16 -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
David CARLIER 127e0569ca xfree86: small memory leaks fixes
A couple of memory leaks fixes and avoiding bit shifting on an
unitialized value.

[hdegoede@redhat.com: Split out some non free fixes in separate patches]
[hdegoede@redhat.com: Don't touch ancient (and weird) os/rpcauth.c code]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-09-28 14:53:39 -04:00
Alan Coopersmith b96dc99996 Add XNFcallocarray() to allow xnfcalloc() to check for overflow
The xnfcalloc() macro took two arguments but simply multiplied them
together without checking for overflow and defeating any overflow
checking that calloc() might have done.  Let's not do that.

The original XNFcalloc() function is left for now to preserve driver
ABI, but is marked as deprecated so it can be removed in a future round
of ABI break/cleanup.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:07 -07: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
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Peter Hutterer bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Jeremy White ecf6275508 Define prototypes for hw/xfree86/modes/xf86Modes.c only in xf86Modes.h.
This removes a large number of redundant declaration warnings.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-04-08 09:19:34 -07:00
Alan Coopersmith c3180a74a4 cvt man page should use Hz, not kHz, for vertical refresh rate
https://bugs.freedesktop.org/show_bug.cgi?id=48311

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2012-05-18 15:00:47 -07:00
Gaetan Nadon 92d50c38b2 man: s/__xservername__/Xorg/g - no longer required
Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html:

  The Xorg & xorg.conf substitutions are leftover from the transitional
  period where some distros were building our sources with the XFree86
  and XF86config names until they had time to adjust the rest of their
  packages/installer/config code to the new names.

This will fix inconsistencies and prevent the creation of new unneeded
sed patterns.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-03-26 16:36:55 -07:00
Gaetan Nadon 9e880cd2e3 man: s/__xconfigfile__/xorg.conf/g - no longer required
Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html:

  The Xorg & xorg.conf substitutions are leftover from the transitional
  period where some distros were building our sources with the XFree86
  and XF86config names until they had time to adjust the rest of their
  packages/installer/config code to the new names.

This will fix inconsistencies and prevent the creation of new unneeded
sed patterns.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-03-26 16:36:47 -07: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 09e4b78f79 Fix gcc -Wwrite-strings warnings in xf86 ddx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:07 -08:00
Jeremy Huddleston 09dbfcb0ad os: Remove Error()
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-11 21:23:46 -07:00
Alan Coopersmith c46215c100 Cross-reference cvt(1) & gtf(1) man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-09-20 07:41:18 -07: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 b9276cb86b XFree86 utils: build utils man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor
Using standard file extensions (.man) means no need for .gitignore
Use standard directory and makefile
Fix trailing whitespaces

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:10:32 -08:00
Alan Coopersmith 446482efaa Convert cvt code to use XNFasprintf()
Requires linking xprintf.c into standalone cvt utility

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2010-12-07 11:10:36 -08:00
Alan Coopersmith 2db6951763 Sun's copyrights now belong to Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Mikhail Gusarov 7287ef9e6c Remove unnecessary parentheses around return values in functions
This patch was generated by the following Perl code:

perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;'

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10 06:42:42 -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
Alan Coopersmith c9726bbe31 Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16 17:11:35 -08: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
Adam Jackson 746e7b22e1 cvt: Allow multiple-of-60Hz refresh rates for reduced blanking.
Doing so generates the same timings as given in the DMT spec for
120Hz RB, so we should be set there.  Other rates might be legal
too but why push our luck.
2009-06-09 16:20:11 -04:00
Keith Packard 4c326c4d34 Make cvt complain about invalid arguments more often.
cvt doesn't correctly parse 'cvt -vr 1920 1080'. This patch doesn't fix
that, but it does at least generate an error message now.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-06 08:58:53 -08:00
Paulo Cesar Pereira de Andrade 5dbe70dd52 Remove dummylib.
Only cvt required it, and only used XNF{,c}alloc
via xnf{,c}alloc macros.
  Based on patch by Eric Anholt.
2008-12-04 02:42:28 -02:00
Daniel Stone 5c1e254cc8 Remove xorgcfg
Us shipping a GUI configuration utility (especially as part of the
server!) was pretty pointless.  There was pretty much nothing it could
configure which wasn't already runtime adjustable: if you could get a
server up with functioning input and output, there wasn't much xorgcfg
could do for you.

Au revoir.
2008-07-24 03:01:45 +03:00
Daniel Stone b74927c384 Remove ioport
I don't know why we would possibly be shipping this.
2008-07-24 02:42:13 +03:00
Daniel Stone 8c05183790 Remove kbd_mode
We only built this on BSD and Solaris, and if such a tool is generally
useful, ship it with the OS.
2008-07-24 02:40:02 +03:00
Adam Jackson 0ff5bc4048 Unifdef QNX.
Again, hasn't worked since at least 7.0.
2008-07-23 10:44:34 -04:00
James Cloos 92b0a04ffd Fix compile failure
This fixes a compile failure by ensuring that mouse-cfg.c
can see the MTYPE_ constants.
2008-07-19 18:21:37 -04:00
Mathieu Bérard 47833eef35 Drop a bunch of #ifdef Lynx. 2008-07-17 11:59:24 -04:00
Adam Jackson d87f170bd9 Remove XF86Misc code from xorgcfg. 2008-07-17 10:29:52 -04:00
Adam Jackson acc9105431 Remove font module support from xorgcfg. 2008-07-16 14:24:47 -04:00
Tiago Vignatti f72500c4a0 Nuke libc wrapper remaining stuffs. 2008-07-04 03:45:18 -03:00
Adam Jackson 9719354ae0 Check for __amd64__, not __x86_64__.
Spiritual revert of 1fa4de80fc.  Intel's C
compiler claims to be gcc-compatible; if they're not defining the same
macros as gcc then that's their bug, not ours.  Even if we were to do
this aliasing we should do it once and for all in servermd.h.
2008-06-24 14:37:06 -04:00
Adam Jackson d34430414a Remove xorgconfig. Use X -configure instead. 2008-06-24 13:32:55 -04:00
Matthieu Herrb 0a81d47638 Remove RCS Id. 2008-06-19 16:53:40 +02:00
Paulo Cesar Pereira de Andrade 01c61f3d97 xorgcfg: Fix a crash if xorg.conf doesn't have a Files section.
This patch only creates a Files section if required, so if no entries are
added, an empty Files section will not be created.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-01 15:55:15 +09:30
Matt Turner 1fa4de80fc Check for __x86_64__ when we check for __amd64__
It seems Intel C Compiler neglects to define __amd64__, __amd64, or
amd64, but *does* define __x86_64__.
2008-04-12 20:39:18 +02:00
Mark Kettenis 06c0372c3a OpenBSD support for libpciaccess.
xserver and libpciaccess both need to open /dev/xf86, which can only
be opened once.  I implemented pci_system_init_dev_mem() like Ian
suggested.  This requires some minor changes to the BSD-specific
os-support code.  Since pci_system_init_dev_mem() is a no-op on
FreeBSD this should be no problem.
2008-03-12 21:45:37 +01:00
Matthieu Herrb c934366424 use UTILS_SYS_LIBS to pass SYS_LIBS to utils/ioports correctly 2008-03-02 19:32:01 +01:00
Adam Jackson 4cb4817c10 Remove the duplicate copy of xf86cvt.c 2008-02-29 16:01:15 -05:00
Adam Jackson e6a4cde16d Use the client-side XKB headers for the config utilities 2008-02-22 18:36:29 -05:00
Daniel Stone 68bd7ac193 XKB: Move headers into the server tree
We need to start breaking the XKB API to enforce sanity, so drag whichever
headers we need to do so into the server tree, as the client API is set in
stone, being part of Xlib.
2008-02-17 22:52:07 +02:00
Alan Coopersmith ccf6636d2c Kill xf86getpagesize even harder (dummylib & ioport) 2008-01-02 19:28:33 -08:00
Adam Jackson 1faba797cb Death to libcwrapper.
This has been deprecated since 1.1.  Since we're breaking ABI again anyway,
remove it entirely.
2007-12-03 14:12:58 -05:00