summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* XmuReadBitmapDataFromFile: set close-on-exec when opening filesHEADmasterAlan Coopersmith2023-03-271-1/+7
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* src/Makefile.am: Remove hardcoded -D_BSD_SOURCEAlan Coopersmith2023-02-161-1/+1
| | | | | | | | | | | Not needed now that AC_USE_SYSTEM_EXTENSIONS is in configure.ac Avoids compiler warning of: /usr/include/features.h:194:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 194 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* _XEditResGet32: Fix casts to avoid unexpected sign extension in 64-bitAlan Coopersmith2022-09-131-1/+1
| | | | | | | Like _XEditResGet16 we need to cast to our destination type, not the source type, before combining the upper & lower halves. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Handle -Wmissing-field-initializers warningsAlan Coopersmith2022-09-131-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Handle -Wsign-compare warningsAlan Coopersmith2022-09-133-4/+4
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Clear some more -Wdiscarded-qualifiers warningsAlan Coopersmith2022-09-132-4/+4
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use _CONST_X_STRING to make libXt declare String as const char *Alan Coopersmith2022-09-134-5/+5
| | | | | | Clears 11 out of 58 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use memcpy instead of memmove when buffers are known not to overlapAlan Coopersmith2022-09-132-4/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* More typo fixesAlan Coopersmith2022-09-135-8/+8
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* get_os_name: Use autoconf to detect uname() supportAlan Coopersmith2022-08-211-26/+10
| | | | | | Stop maintaining a list of #ifdefs for ancient platforms Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* XmuGetHostname: Drop support for ancient USG systemsAlan Coopersmith2022-08-211-19/+0
| | | | | | | | USG was defined for a handful of pre-SVR4 systems based on AT&T's Unix System Group releases in the old imake configs and has never been defined in X11R7 modular builds. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove support for XA_IP_ADDRESSMatthieu Herrb2022-08-211-28/+2
| | | | | | | | | | | | | This code has a number of issues: - It doesn't support IPv6 https://bugs.freedesktop.org/show_bug.cgi?id=7611 - The IP address is set by the selection owner so it doesn't bring any security for anyone querying the selection - The extra DNS query that it does is problematic in some sandboxed environments (like OpenBSD's pledge https://marc.info/?l=openbsd-bugs&m=157842725819911&w=2) Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix OWNER_OS in XmuConvertStandardSelection() on LinuxMatthieu Herrb2022-08-211-0/+3
| | | | | | It used to return BSD Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Unifdef SYSVNETMatthieu Herrb2022-08-211-9/+0
| | | | | | | This has not been set by configure since the switch to autotools. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert code to use Xmumallocarray() & reallocarray()Alan Coopersmith2022-08-063-13/+22
| | | | | | Provides automatic integer overflow checking in allocation size calculations Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Import reallocarray() from libX11 (originally from OpenBSD)Alan Coopersmith2022-08-063-1/+87
| | | | | | | | | Wrapper for realloc() that checks for overflow when multiplying arguments together, so we don't have to add overflow checks to every single call. For documentation on usage, see: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnnecessary casts from *alloc() and free() callsAlan Coopersmith2022-08-069-48/+43
| | | | | | These are not needed in C89 and later. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix spelling/wording issuesAlan Coopersmith2022-07-177-31/+31
| | | | | | | Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Apply standard X.Org formatting & bracketing to StrToWidg.cAlan Coopersmith2018-05-051-76/+74
| | | | | | | | | | | | | | Makes code easier for humans to read and gets rid of gcc warning: StrToWidg.c: In function ‘XmuCvtStringToWidget’: StrToWidg.c:107:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (widgetP = parent->core.popup_list; i; i--, widgetP++) ^~~ StrToWidg.c:114:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ XtStringConversionWarning(fromVal->addr, XtRWidget); ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Convert tabs to spaces in StrToWidg.cAlan Coopersmith2018-05-051-53/+53
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Include <direct.h> for _getdrives() on Win32Jon TURNEY2015-04-121-0/+1
| | | | | Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: David Macek <david.macek.0@gmail.com>
* Remove pointless X_NOT_POSIXJon TURNEY2015-03-231-2/+2
| | | | | | | | | Both stdlib.h (only included for prototype of atoi()), and limits.h (only included for PATH_MAX) are in C89, so putting this under X_NOT_POSIX seems a little excessive. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* ShapeEllipseOrRoundedRectangle: Check height AND width, not width twiceAlan Coopersmith2013-12-021-1/+1
| | | | | | | | | | Fixed to match check in ShapeOval() https://bugs.freedesktop.org/show_bug.cgi?id=72245 Fixes cppcheck warning: [ShapeWidg.c:204]: (style) Same expression on both sides of '||'. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove SUNSHLIB support for SunOS 4.x shared librariesAlan Coopersmith2013-11-224-77/+3
| | | | | | | Never enabled in modular builds, was only enabled for SunOS 4.x in imake. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
* Preserve constness when casting const pointers in various functionsAlan Coopersmith2013-07-224-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes gcc warnings: CrCmap.c: In function 'compare': CrCmap.c:499:18: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] CrCmap.c:499:32: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] LocBitmap.c: In function 'XmuLocatePixmapFile': LocBitmap.c:161:11: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] LocBitmap.c:178:11: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c: In function 'XmuCopyISOLatin1Lowered': Lower.c:65:46: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c: In function 'XmuCopyISOLatin1Uppered': Lower.c:77:46: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c: In function 'XmuCompareISOLatin1': Lower.c:89:13: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c:89:42: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c: In function 'XmuNCopyISOLatin1Lowered': Lower.c:104:50: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Lower.c: In function 'XmuNCopyISOLatin1Uppered': Lower.c:119:50: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] WidgetNode.c: In function 'compare_resource_entries': WidgetNode.c:89:21: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] WidgetNode.c:90:7: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix a const issue.Thomas Klausner2013-06-061-1/+1
| | | | | Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* unifdef -U__UNIXOS2__Alan Coopersmith2013-01-042-17/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unused DECnet ("DNETCONN") code from XmuConvertStandardSelectionAlan Coopersmith2012-12-261-15/+3
| | | | | | | | Has never been converted to build in modular builds, so has been unusable since X11R7.0 release in 2005. DNETCONN support was removed from xtrans back in 2008. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix gcc -Wwrite-strings warnings (some, not all)Alan Coopersmith2011-11-104-32/+32
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Drop support for pre-ANSI-C89 preprocessorsAlan Coopersmith2011-11-102-12/+0
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix build with -DDEBUGJeremy Huddleston2011-09-241-1/+1
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=1069 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-1638-182/+182
| | | | | | | 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>
* Make EditresCom.c identation a lot less randomAlan Coopersmith2011-02-101-572/+574
| | | | | | 2 spaces! No 4! 2! 3! No, Blue! Red! Aughughurglrgll... Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* config: remove config test for snprintfGaetan Nadon2011-02-021-7/+0
| | | | | | | | | | | | The macro HAS_SNPRINTF is hard coded to always be defined. If it were not defined, Lower.c would include snprintf.c which does not exist. Seems to be relics from IMakefile Other modules are using snprintf unconditionally. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* XmuCvtStringToCursor: sprintf -> snprintf & check for XtMalloc failureAlan Coopersmith2010-12-051-10/+14
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge cvs tags.Jesse Adkins2010-10-0645-140/+0
| | | | | Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Purge macro NEED_EVENTSFernando Carrijo2010-07-081-1/+0
| | | | | | Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* config: remove execute permission on source C fileGaetan Nadon2010-03-272-0/+0
| | | | | | | Introduced in 85f77401635dfa57d40de89aa2c9f39a344a8d3b "Fix build problems on WIN32 platforms" Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONSAlan Coopersmith2009-09-231-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* libXmu: check for LONG64, not LONG_64Julien Cristau2009-03-311-3/+3
| | | | | | | | | | | The latter isn't defined anywhere, so editres hasn't been able to read a pointer on 64bit since about 10 years. Admittedly, this should be using stdint types, but... Debian bug#521887 <http://bugs.debian.org/521887> Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Julien Cristau <jcristau@debian.org>
* Janitor: make distcheck, compiler warnings, .gitignore.Paulo Cesar Pereira de Andrade2009-01-292-8/+1
|
* Fix build problems on WIN32 platformsColin Harrison2008-04-292-0/+4
|
* Switch to winsock2Colin Harrison2008-04-261-1/+1
|
* Compile warning fix by using Cardinal instead of int.Paulo Cesar Pereira de Andrade2008-02-281-1/+1
| | | | This also matches the function prototype.
* Coverity #52: Dead code in get_os_name()Alan Coopersmith2008-01-141-0/+4
|
* Clear sparse warnings: Using plain integer as NULL pointerAlan Coopersmith2008-01-133-5/+8
|
* Add hooks for checking sources with tools like lint & sparseAlan Coopersmith2008-01-111-2/+25
|
* renamed: .cvsignore -> .gitignoreAlan Coopersmith2006-07-131-0/+0
|
* Define BITMAPDIR for the case where ${prefix} != /usrlibXmu-1_0_2XORG-7_1Matthieu Herrb2006-04-301-1/+3
|
* Bug #6276: Fix build on Cygwin. (Yaakov Selkowitz)XORG-7_0_99_901Adam Jackson2006-03-201-2/+2
|