Compare commits
13 Commits
master
...
base/netbs
Author | SHA1 | Date | |
---|---|---|---|
|
b3142e6486 | ||
|
8da9dc8d1d | ||
|
1fd975d4f6 | ||
|
10cbefdf85 | ||
|
90db2fa113 | ||
|
78e8bf021c | ||
|
4c333669c0 | ||
|
71874dce1e | ||
|
7147f88c2c | ||
|
0077c83414 | ||
|
968353a8be | ||
|
8e2f829870 | ||
|
ac78fa0414 |
143
.gitlab-ci.yml
143
.gitlab-ci.yml
|
@ -4,7 +4,7 @@
|
||||||
# Please see the ci-templates documentation for details:
|
# Please see the ci-templates documentation for details:
|
||||||
# https://freedesktop.pages.freedesktop.org/ci-templates/
|
# https://freedesktop.pages.freedesktop.org/ci-templates/
|
||||||
|
|
||||||
.templates_sha: &template_sha c5626190ec14b475271288dda7a7dae8dbe0cd76 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
.templates_sha: &template_sha wip/bsd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
|
||||||
|
|
||||||
# FDO_DISTRIBUTION_TAG is the tag of the docker image used for the build jobs.
|
# FDO_DISTRIBUTION_TAG is the tag of the docker image used for the build jobs.
|
||||||
# If the image doesn't exist yet, the docker-image stage generates it.
|
# If the image doesn't exist yet, the docker-image stage generates it.
|
||||||
|
@ -16,17 +16,30 @@
|
||||||
# gcc/clang or other packages, which might break the build with older commits
|
# gcc/clang or other packages, which might break the build with older commits
|
||||||
# using the same tag.
|
# using the same tag.
|
||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: xorg/xserver
|
FDO_UPSTREAM_REPO: xorg/xserver
|
||||||
FDO_DISTRIBUTION_VERSION: bullseye-slim
|
MESON_BUILDDIR: "build"
|
||||||
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
|
REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
|
||||||
FDO_DISTRIBUTION_TAG: "2024-03-26-explicit-sync-2"
|
REPO_URL_LIBDRM: 'https://gitlab.freedesktop.org/mesa/drm.git'
|
||||||
MESON_BUILDDIR: "build"
|
XORG_DEBIAN_VERSION: 'bullseye-slim'
|
||||||
|
XORG_DEBIAN_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
|
||||||
|
XORG_DEBIAN_TAG: '2024-03-26-explicit-sync-2'
|
||||||
|
XORG_FREEBSD_VERSION: '14.0'
|
||||||
|
XORG_FREEBSD_EXEC: ''
|
||||||
|
XORG_FREEBSD_TAG: '2024-04-25.0'
|
||||||
|
XORG_NETBSD_VERSION: '10.0'
|
||||||
|
XORG_NETBSD_TAG: '2024-04-17.27'
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'metux/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file: '/templates/debian.yml'
|
file: '/templates/debian.yml'
|
||||||
- project: 'freedesktop/ci-templates'
|
- project: 'metux/ci-templates'
|
||||||
|
ref: *template_sha
|
||||||
|
file: '/templates/freebsd.yml'
|
||||||
|
- project: 'metux/ci-templates'
|
||||||
|
ref: *template_sha
|
||||||
|
file: '/templates/netbsd.yml'
|
||||||
|
- project: 'metux/ci-templates'
|
||||||
ref: *template_sha
|
ref: *template_sha
|
||||||
file: '/templates/ci-fairy.yml'
|
file: '/templates/ci-fairy.yml'
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
|
@ -101,10 +114,63 @@ debian-bullseye:
|
||||||
stage: docker-image
|
stage: docker-image
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_DEBIAN_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: "$XORG_DEBIAN_EXEC"
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_DEBIAN_TAG"
|
||||||
|
|
||||||
|
freebsd-image:
|
||||||
|
extends:
|
||||||
|
- .fdo.qemu-build@freebsd@x86_64
|
||||||
|
stage: docker-image
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_FREEBSD_TAG"
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_FREEBSD_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: ''
|
||||||
|
FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman xtrans libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util'
|
||||||
|
|
||||||
|
netbsd-image:
|
||||||
|
extends:
|
||||||
|
- .fdo.qemu-build@netbsd@x86_64
|
||||||
|
stage: docker-image
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_NETBSD_TAG"
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_NETBSD_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: ''
|
||||||
|
FDO_DISTRIBUTION_PACKAGES: 'git pkgconf autoconf automake xorg-util-macros'
|
||||||
|
|
||||||
|
.xorg-image@debian:
|
||||||
|
extends:
|
||||||
|
- .fdo.distribution-image@debian
|
||||||
|
variables:
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_DEBIAN_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: "$XORG_DEBIAN_EXEC"
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_DEBIAN_TAG"
|
||||||
|
|
||||||
|
.xorg-image@freebsd:
|
||||||
|
extends:
|
||||||
|
- .fdo.distribution-image@freebsd
|
||||||
|
variables:
|
||||||
|
GIT_DEPTH: 1
|
||||||
|
PKG_CONFIG_PATH: /usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/pkg/share/pkgconfig:/usr/pkg/lib/pkgconfig:/usr/local/libdata/pkgconfig
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_FREEBSD_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: "$XORG_FREEBSD_EXEC"
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_FREEBSD_TAG"
|
||||||
|
|
||||||
|
.xorg-image@netbsd:
|
||||||
|
extends:
|
||||||
|
- .fdo.distribution-image@netbsd
|
||||||
|
variables:
|
||||||
|
GIT_DEPTH: 1
|
||||||
|
PKG_CONFIG_PATH: /usr/X11R7/share/pkgconfig:/usr/X11R7/lib/pkgconfig:/usr/lib/pkgconfig:/usr/pkg/lib/pkgconfig
|
||||||
|
FDO_DISTRIBUTION_VERSION: "$XORG_NETBSD_VERSION"
|
||||||
|
FDO_DISTRIBUTION_EXEC: "$XORG_NETBSD_EXEC"
|
||||||
|
FDO_DISTRIBUTION_TAG: "$XORG_NETBSD_TAG"
|
||||||
|
|
||||||
.common-build-and-test:
|
.common-build-and-test:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@debian
|
- .xorg-image@debian
|
||||||
- .ci-run-policy
|
- .ci-run-policy
|
||||||
stage: build-and-test
|
stage: build-and-test
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -154,6 +220,63 @@ mingw-cross-build:
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true
|
MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true
|
||||||
|
|
||||||
|
freebsd:
|
||||||
|
stage: build-and-test
|
||||||
|
extends:
|
||||||
|
- .xorg-image@freebsd
|
||||||
|
variables:
|
||||||
|
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false
|
||||||
|
PKG_CONFIG_PATH: /usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/pkg/share/pkgconfig:/usr/pkg/lib/pkgconfig
|
||||||
|
script:
|
||||||
|
# running of of disk space without this
|
||||||
|
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
||||||
|
- git gc
|
||||||
|
- git clone $REPO_URL_XORGPROTO dep.xorgproto
|
||||||
|
- /app/vmctl start
|
||||||
|
- set +e
|
||||||
|
- scp -r $PWD "vm:"
|
||||||
|
# need to install newer xorgproto
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
|
||||||
|
# test not working yet, so skipped
|
||||||
|
# - scp -r vm:$CI_PROJECT_NAME/test-results.xml .
|
||||||
|
- /app/vmctl stop
|
||||||
|
- set -e
|
||||||
|
- test -e .success || exit 1
|
||||||
|
|
||||||
|
netbsd:
|
||||||
|
stage: build-and-test
|
||||||
|
extends:
|
||||||
|
- .xorg-image@netbsd
|
||||||
|
variables:
|
||||||
|
# fixme: try glx and glamor
|
||||||
|
MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false
|
||||||
|
X_PATH: /sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin
|
||||||
|
script:
|
||||||
|
# running of of disk space without this
|
||||||
|
# needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
|
||||||
|
- git gc
|
||||||
|
- git clone $REPO_URL_XORGPROTO dep.xorgproto
|
||||||
|
- git clone $REPO_URL_LIBDRM dep.libdrm
|
||||||
|
- /app/vmctl start
|
||||||
|
- set +e
|
||||||
|
- scp -r $PWD "vm:"
|
||||||
|
- /app/vmctl exec "pkgin -4 update"
|
||||||
|
# for reasons yet unknown, installing meson in the image breaks autotools, so do it afterwards
|
||||||
|
- /app/vmctl exec "pkgin -V -4 -y install meson"
|
||||||
|
# xorgproto on NetBSD is too old - install recent version
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr/X11R7 && make && make install"
|
||||||
|
# libdrm on NetBSD is too old - install recent version
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME/dep.libdrm && meson setup --prefix=/usr/X11R7 ../build.libdrm"
|
||||||
|
- /app/vmctl exec "cd $CI_PROJECT_NAME/build.libdrm && meson compile && meson install"
|
||||||
|
# 2do: upgrade libdrm to 2.4.116
|
||||||
|
- /app/vmctl exec "export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" PATH=\"$X_PATH\" ; cd $CI_PROJECT_NAME && CI_JOB_ID=\"$CI_JOB_ID\" CI_JOB_NAME=\"$CI_JOB_NAME\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
|
||||||
|
# tests not working yet, so skipped
|
||||||
|
# - scp -r vm:$CI_PROJECT_NAME/test-results.xml .
|
||||||
|
- /app/vmctl stop
|
||||||
|
- set -e
|
||||||
|
- test -e .success || exit 1
|
||||||
|
|
||||||
meson-dist:
|
meson-dist:
|
||||||
extends: .common-build-and-test
|
extends: .common-build-and-test
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -172,7 +295,7 @@ meson-dist:
|
||||||
|
|
||||||
xf86-driver-build-test:
|
xf86-driver-build-test:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@debian
|
- .xorg-image@debian
|
||||||
- .ci-run-policy
|
- .ci-run-policy
|
||||||
stage: drivers
|
stage: drivers
|
||||||
parallel:
|
parallel:
|
||||||
|
|
|
@ -266,7 +266,7 @@ StringToBusType(const char *busID, const char **retID)
|
||||||
BusType ret = BUS_NONE;
|
BusType ret = BUS_NONE;
|
||||||
|
|
||||||
/* If no type field, Default to PCI */
|
/* If no type field, Default to PCI */
|
||||||
if (isdigit(busID[0])) {
|
if (isdigit((unsigned char)busID[0])) {
|
||||||
if (retID)
|
if (retID)
|
||||||
*retID = busID;
|
*retID = busID;
|
||||||
return BUS_PCI;
|
return BUS_PCI;
|
||||||
|
|
|
@ -124,7 +124,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData,
|
||||||
|
|
||||||
/* Fill in what we know, converting the driver name to lower case */
|
/* Fill in what we know, converting the driver name to lower case */
|
||||||
lower_driver = xnfalloc(strlen(driver) + 1);
|
lower_driver = xnfalloc(strlen(driver) + 1);
|
||||||
for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
|
for (j = 0; (lower_driver[j] = tolower((unsigned char)driver[j])); j++);
|
||||||
DevToConfig[i].GDev.driver = lower_driver;
|
DevToConfig[i].GDev.driver = lower_driver;
|
||||||
|
|
||||||
switch (bus) {
|
switch (bus) {
|
||||||
|
|
|
@ -912,8 +912,8 @@ xf86NormalizeName(const char *s)
|
||||||
case '\t':
|
case '\t':
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
if (isupper(*p))
|
if (isupper((unsigned char)*p))
|
||||||
*q++ = tolower(*p);
|
*q++ = tolower((unsigned char)*p);
|
||||||
else
|
else
|
||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,14 +282,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
if (d != NULL) {
|
if (d != NULL) {
|
||||||
*(d++) = 0;
|
*(d++) = 0;
|
||||||
for (i = 0; d[i] != 0; i++) {
|
for (i = 0; d[i] != 0; i++) {
|
||||||
if (!isdigit(d[i])) {
|
if (!isdigit((unsigned char)d[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
for (i = 0; p[i] != 0; i++) {
|
for (i = 0; p[i] != 0; i++) {
|
||||||
if (!isdigit(p[i])) {
|
if (!isdigit((unsigned char)p[i])) {
|
||||||
free(s);
|
free(s);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,10 +340,10 @@ xf86getToken(const xf86ConfigSymTabRec * tab)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */
|
/* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */
|
||||||
else if ((c == ',') && !isalpha(configBuf[configPos])) {
|
else if ((c == ',') && !isalpha((unsigned char)configBuf[configPos])) {
|
||||||
return COMMA;
|
return COMMA;
|
||||||
}
|
}
|
||||||
else if ((c == '-') && !isalpha(configBuf[configPos])) {
|
else if ((c == '-') && !isalpha((unsigned char)configBuf[configPos])) {
|
||||||
return DASH;
|
return DASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1028,8 +1028,8 @@ xf86nameCompare(const char *s1, const char *s2)
|
||||||
s1++;
|
s1++;
|
||||||
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
||||||
s2++;
|
s2++;
|
||||||
c1 = (isupper(*s1) ? tolower(*s1) : *s1);
|
c1 = (isupper((unsigned char)*s1) ? tolower((unsigned char)*s1) : *s1);
|
||||||
c2 = (isupper(*s2) ? tolower(*s2) : *s2);
|
c2 = (isupper((unsigned char)*s2) ? tolower((unsigned char)*s2) : *s2);
|
||||||
while (c1 == c2) {
|
while (c1 == c2) {
|
||||||
if (c1 == '\0')
|
if (c1 == '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1039,8 +1039,8 @@ xf86nameCompare(const char *s1, const char *s2)
|
||||||
s1++;
|
s1++;
|
||||||
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
while (*s2 == '_' || *s2 == ' ' || *s2 == '\t')
|
||||||
s2++;
|
s2++;
|
||||||
c1 = (isupper(*s1) ? tolower(*s1) : *s1);
|
c1 = (isupper((unsigned char)*s1) ? tolower((unsigned char)*s1) : *s1);
|
||||||
c2 = (isupper(*s2) ? tolower(*s2) : *s2);
|
c2 = (isupper((unsigned char)*s2) ? tolower((unsigned char)*s2) : *s2);
|
||||||
}
|
}
|
||||||
return c1 - c2;
|
return c1 - c2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -984,7 +984,7 @@ ResetHosts(const char *display)
|
||||||
*ptr = 0;
|
*ptr = 0;
|
||||||
hostlen = strlen(ohostname) + 1;
|
hostlen = strlen(ohostname) + 1;
|
||||||
for (i = 0; i < hostlen; i++)
|
for (i = 0; i < hostlen; i++)
|
||||||
lhostname[i] = tolower(ohostname[i]);
|
lhostname[i] = tolower((unsigned char)ohostname[i]);
|
||||||
hostname = ohostname;
|
hostname = ohostname;
|
||||||
if (!strncmp("local:", lhostname, 6)) {
|
if (!strncmp("local:", lhostname, 6)) {
|
||||||
family = FamilyLocalHost;
|
family = FamilyLocalHost;
|
||||||
|
|
|
@ -622,7 +622,7 @@ VerifyDisplayName(const char *d)
|
||||||
for digits, or exception of :0.0 and similar (two decimal points max)
|
for digits, or exception of :0.0 and similar (two decimal points max)
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < strlen(d); i++) {
|
for (i = 0; i < strlen(d); i++) {
|
||||||
if (!isdigit(d[i])) {
|
if (!isdigit((unsigned char)d[i])) {
|
||||||
if (d[i] != '.' || period_found)
|
if (d[i] != '.' || period_found)
|
||||||
return 0;
|
return 0;
|
||||||
period_found = TRUE;
|
period_found = TRUE;
|
||||||
|
@ -940,7 +940,7 @@ ProcessCommandLine(int argc, char *argv[])
|
||||||
else if (strcmp(argv[i], "-terminate") == 0) {
|
else if (strcmp(argv[i], "-terminate") == 0) {
|
||||||
dispatchExceptionAtReset = DE_TERMINATE;
|
dispatchExceptionAtReset = DE_TERMINATE;
|
||||||
terminateDelay = -1;
|
terminateDelay = -1;
|
||||||
if ((i + 1 < argc) && (isdigit(*argv[i + 1])))
|
if ((i + 1 < argc) && (isdigit((unsigned char)*argv[i + 1])))
|
||||||
terminateDelay = atoi(argv[++i]);
|
terminateDelay = atoi(argv[++i]);
|
||||||
terminateDelay = max(0, terminateDelay);
|
terminateDelay = max(0, terminateDelay);
|
||||||
}
|
}
|
||||||
|
|
|
@ -778,11 +778,11 @@ XkbProcessArguments(int argc, char *argv[], int i)
|
||||||
else {
|
else {
|
||||||
XkbWantAccessX = 1;
|
XkbWantAccessX = 1;
|
||||||
|
|
||||||
if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
|
if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
|
||||||
XkbDfltAccessXTimeout = atoi(argv[++i]);
|
XkbDfltAccessXTimeout = atoi(argv[++i]);
|
||||||
j++;
|
j++;
|
||||||
|
|
||||||
if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
|
if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
|
||||||
/*
|
/*
|
||||||
* presumption that the reasonably useful range of
|
* presumption that the reasonably useful range of
|
||||||
* values fits in 0..MAXINT since SunOS 4 doesn't
|
* values fits in 0..MAXINT since SunOS 4 doesn't
|
||||||
|
@ -792,14 +792,14 @@ XkbProcessArguments(int argc, char *argv[], int i)
|
||||||
strtol(argv[++i], NULL, 16);
|
strtol(argv[++i], NULL, 16);
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
|
if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
|
||||||
if (argv[++i][0] == '1')
|
if (argv[++i][0] == '1')
|
||||||
XkbDfltAccessXFeedback = XkbAccessXFeedbackMask;
|
XkbDfltAccessXFeedback = XkbAccessXFeedbackMask;
|
||||||
else
|
else
|
||||||
XkbDfltAccessXFeedback = 0;
|
XkbDfltAccessXFeedback = 0;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) {
|
if (((i + 1) < argc) && (isdigit((unsigned char)argv[i + 1][0]))) {
|
||||||
XkbDfltAccessXOptions = (unsigned short)
|
XkbDfltAccessXOptions = (unsigned short)
|
||||||
strtol(argv[++i], NULL, 16);
|
strtol(argv[++i], NULL, 16);
|
||||||
j++;
|
j++;
|
||||||
|
|
|
@ -91,9 +91,9 @@ XkbAtomText(Atom atm, unsigned format)
|
||||||
}
|
}
|
||||||
if (format == XkbCFile) {
|
if (format == XkbCFile) {
|
||||||
for (tmp = rtrn; *tmp != '\0'; tmp++) {
|
for (tmp = rtrn; *tmp != '\0'; tmp++) {
|
||||||
if ((tmp == rtrn) && (!isalpha(*tmp)))
|
if ((tmp == rtrn) && (!isalpha((unsigned char)*tmp)))
|
||||||
*tmp = '_';
|
*tmp = '_';
|
||||||
else if (!isalnum(*tmp))
|
else if (!isalnum((unsigned char)*tmp))
|
||||||
*tmp = '_';
|
*tmp = '_';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -467,7 +467,7 @@ XkbIMWhichStateMaskText(unsigned use_which, unsigned format)
|
||||||
if (len != 0)
|
if (len != 0)
|
||||||
buf[len++] = '|';
|
buf[len++] = '|';
|
||||||
sprintf(&buf[len], "XkbIM_Use%s", imWhichNames[i]);
|
sprintf(&buf[len], "XkbIM_Use%s", imWhichNames[i]);
|
||||||
buf[len + 9] = toupper(buf[len + 9]);
|
buf[len + 9] = toupper((unsigned char)buf[len + 9]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (len != 0)
|
if (len != 0)
|
||||||
|
@ -529,7 +529,7 @@ XkbControlsMaskText(unsigned ctrls, unsigned format)
|
||||||
if (len != 0)
|
if (len != 0)
|
||||||
buf[len++] = '|';
|
buf[len++] = '|';
|
||||||
sprintf(&buf[len], "Xkb%sMask", ctrlNames[i]);
|
sprintf(&buf[len], "Xkb%sMask", ctrlNames[i]);
|
||||||
buf[len + 3] = toupper(buf[len + 3]);
|
buf[len + 3] = toupper((unsigned char)buf[len + 3]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (len != 0)
|
if (len != 0)
|
||||||
|
@ -560,7 +560,7 @@ XkbStringText(char *str, unsigned format)
|
||||||
else if (format == XkbXKMFile)
|
else if (format == XkbXKMFile)
|
||||||
return str;
|
return str;
|
||||||
for (ok = TRUE, len = 0, in = str; *in != '\0'; in++, len++) {
|
for (ok = TRUE, len = 0, in = str; *in != '\0'; in++, len++) {
|
||||||
if (!isprint(*in)) {
|
if (!isprint((unsigned char)*in)) {
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
switch (*in) {
|
switch (*in) {
|
||||||
case '\n':
|
case '\n':
|
||||||
|
@ -581,7 +581,7 @@ XkbStringText(char *str, unsigned format)
|
||||||
return str;
|
return str;
|
||||||
buf = tbGetBuffer(len + 1);
|
buf = tbGetBuffer(len + 1);
|
||||||
for (in = str, out = buf; *in != '\0'; in++) {
|
for (in = str, out = buf; *in != '\0'; in++) {
|
||||||
if (isprint(*in))
|
if (isprint((unsigned char)*in))
|
||||||
*out++ = *in;
|
*out++ = *in;
|
||||||
else {
|
else {
|
||||||
*out++ = '\\';
|
*out++ = '\\';
|
||||||
|
|
Loading…
Reference in New Issue