diff options
author | marha <marha@users.sourceforge.net> | 2010-10-19 19:56:00 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-10-19 19:56:00 +0000 |
commit | 6ab3babba7b1b74528c2194a495fa1e2e67faa55 (patch) | |
tree | ed84a65e3d6f8bebb29359424d69d37b416754a5 /xorg-server/hw/xfree86/parser/scan.c | |
parent | d621ea397a3d181e7a0bf07d72bd21e116fccdb8 (diff) | |
download | vcxsrv-6ab3babba7b1b74528c2194a495fa1e2e67faa55.tar.gz vcxsrv-6ab3babba7b1b74528c2194a495fa1e2e67faa55.tar.bz2 vcxsrv-6ab3babba7b1b74528c2194a495fa1e2e67faa55.zip |
xserver update 19/10/2010
Diffstat (limited to 'xorg-server/hw/xfree86/parser/scan.c')
-rw-r--r-- | xorg-server/hw/xfree86/parser/scan.c | 63 |
1 files changed, 1 insertions, 62 deletions
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index 783a42545..b829868f7 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -115,53 +115,6 @@ static int pushToken = LOCK_TOKEN; static int eol_seen = 0; /* private state to handle comments */
LexRec val;
-/*
- * xf86strToUL --
- *
- * A portable, but restricted, version of strtoul(). It only understands
- * hex, octal, and decimal. But it's good enough for our needs.
- */
-static unsigned int
-xf86strToUL (char *str)
-{
- int base = 10;
- char *p = str;
- unsigned int tot = 0;
-
- if (*p == '0')
- {
- p++;
- if ((*p == 'x') || (*p == 'X'))
- {
- p++;
- base = 16;
- }
- else
- base = 8;
- }
- while (*p)
- {
- if ((*p >= '0') && (*p <= ((base == 8) ? '7' : '9')))
- {
- tot = tot * base + (*p - '0');
- }
- else if ((base == 16) && (*p >= 'a') && (*p <= 'f'))
- {
- tot = tot * base + 10 + (*p - 'a');
- }
- else if ((base == 16) && (*p >= 'A') && (*p <= 'F'))
- {
- tot = tot * base + 10 + (*p - 'A');
- }
- else
- {
- return tot;
- }
- p++;
- }
- return tot;
-}
-
/*
* xf86getNextLine --
*
@@ -434,7 +387,7 @@ again: configRBuf[i++] = c;
configPos--; /* GJA -- one too far */
configRBuf[i] = '\0';
- val.num = xf86strToUL (configRBuf);
+ val.num = strtoul (configRBuf, NULL, 0);
val.realnum = atof (configRBuf);
return NUMBER;
}
@@ -601,7 +554,6 @@ xf86pathIsSafe(const char *path) * %P projroot
* %C sysconfdir
* %D datadir
- * %M config file format version number
* %% %
*/
@@ -626,11 +578,6 @@ xf86pathIsSafe(const char *path) #ifndef XCONFENV
#define XCONFENV "XORGCONFIG"
#endif
-/* xorg.conf is based on XF86Config version 4. If we ever break
- compatibility of the xorg.conf syntax, we'll bump this version number. */
-#ifndef CONFIG_FILE_VERSION
-#define CONFIG_FILE_VERSION 4
-#endif
#define BAIL_OUT do { \
free(result); \
@@ -661,7 +608,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, int i, l;
static const char *env = NULL;
static char *hostname = NULL;
- static char majorvers[3] = "";
if (!template)
return NULL;
@@ -762,13 +708,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, case 'D':
APPEND_STR(DATADIR);
break;
- case 'M':
- if (!majorvers[0]) {
- snprintf(majorvers, sizeof(majorvers),
- "%d", CONFIG_FILE_VERSION);
- }
- APPEND_STR(majorvers);
- break;
case '%':
result[l++] = '%';
CHECK_LENGTH;
|