diff options
author | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-01-15 21:23:25 +0100 |
commit | 1b0fcca503ae9cf2d462b60770f96c794dfbb27a (patch) | |
tree | d08c81de02b94da202195d84c99e192bc24ae69e /xorg-server/hw/xfree86/parser | |
parent | aaeb8bf497c82efabc4f9b27c319042c0e72d816 (diff) | |
download | vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.gz vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.tar.bz2 vcxsrv-1b0fcca503ae9cf2d462b60770f96c794dfbb27a.zip |
mesa xkeyboard-config xserver git update 15 jan 2014
xserver commit 2d2d49dab5c5718989de97d7227aac793479745e
xkeyboard-config commit 78af7aa79c6552924295644b911e45d07a0fcdad
mesa commit a05c596a00916ce6a9c9d35ff36cd1e401fddd43
Diffstat (limited to 'xorg-server/hw/xfree86/parser')
-rw-r--r-- | xorg-server/hw/xfree86/parser/Configint.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/Files.c | 3 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/Flags.c | 14 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/InputClass.c | 24 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/Module.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/configProcs.h | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/scan.c | 15 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/parser/xf86Parser.h | 94 |
8 files changed, 79 insertions, 79 deletions
diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h index 81cc1fc59..62e514201 100644 --- a/xorg-server/hw/xfree86/parser/Configint.h +++ b/xorg-server/hw/xfree86/parser/Configint.h @@ -90,7 +90,7 @@ typedef struct { #include "configProcs.h" #include <stdlib.h> -#define TestFree(a) if (a) { free (a); a = NULL; } +#define TestFree(a) if (a) { free ((void *) a); a = NULL; } #define parsePrologue(typeptr,typerec) typeptr ptr; \ if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return NULL; } diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c index 0d3e47ac5..a6e18dd2c 100644 --- a/xorg-server/hw/xfree86/parser/Files.c +++ b/xorg-server/hw/xfree86/parser/Files.c @@ -97,8 +97,7 @@ xf86parseFilesSection(void) j = FALSE; str = val.str; if (ptr->file_fontpath == NULL) { - ptr->file_fontpath = malloc(1); - ptr->file_fontpath[0] = '\0'; + ptr->file_fontpath = calloc(1, 1); i = strlen(str) + 1; } else { diff --git a/xorg-server/hw/xfree86/parser/Flags.c b/xorg-server/hw/xfree86/parser/Flags.c index 2461476d1..326c6b77d 100644 --- a/xorg-server/hw/xfree86/parser/Flags.c +++ b/xorg-server/hw/xfree86/parser/Flags.c @@ -189,7 +189,7 @@ xf86printServerFlagsSection(FILE * f, XF86ConfFlagsPtr flags) } static XF86OptionPtr -addNewOption2(XF86OptionPtr head, char *name, char *val, int used) +addNewOption2(XF86OptionPtr head, char *name, char *_val, int used) { XF86OptionPtr new, old = NULL; @@ -202,7 +202,7 @@ addNewOption2(XF86OptionPtr head, char *name, char *val, int used) else new = calloc(1, sizeof(*new)); new->opt_name = name; - new->opt_val = val; + new->opt_val = _val; new->opt_used = used; if (old) @@ -211,9 +211,9 @@ addNewOption2(XF86OptionPtr head, char *name, char *val, int used) } XF86OptionPtr -xf86addNewOption(XF86OptionPtr head, char *name, char *val) +xf86addNewOption(XF86OptionPtr head, char *name, char *_val) { - return addNewOption2(head, name, val, 0); + return addNewOption2(head, name, _val, 0); } void @@ -230,11 +230,11 @@ XF86OptionPtr xf86optionListDup(XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; - char *val; + char *_val; while (opt) { - val = opt->opt_val ? strdup(opt->opt_val) : NULL; - newopt = xf86addNewOption(newopt, strdup(opt->opt_name), val); + _val = opt->opt_val ? strdup(opt->opt_val) : NULL; + newopt = xf86addNewOption(newopt, strdup(opt->opt_name), _val); newopt->opt_used = opt->opt_used; if (opt->opt_comment) newopt->opt_comment = strdup(opt->opt_comment); diff --git a/xorg-server/hw/xfree86/parser/InputClass.c b/xorg-server/hw/xfree86/parser/InputClass.c index de6a816ea..a7f573e70 100644 --- a/xorg-server/hw/xfree86/parser/InputClass.c +++ b/xorg-server/hw/xfree86/parser/InputClass.c @@ -64,7 +64,7 @@ xf86ConfigSymTabRec InputClassTab[] = { #define TOKEN_SEP "|" static void -add_group_entry(struct xorg_list *head, char **values) +add_group_entry(struct xorg_list *head, const char **values) { xf86MatchGroup *group; @@ -257,7 +257,7 @@ void xf86printInputClassSection(FILE * cf, XF86ConfInputClassPtr ptr) { const xf86MatchGroup *group; - char *const *cur; + const char *const *cur; while (ptr) { fprintf(cf, "Section \"InputClass\"\n"); @@ -363,7 +363,7 @@ xf86freeInputClassList(XF86ConfInputClassPtr ptr) while (ptr) { xf86MatchGroup *group, *next; - char **list; + const char **list; TestFree(ptr->identifier); TestFree(ptr->driver); @@ -371,55 +371,55 @@ xf86freeInputClassList(XF86ConfInputClassPtr ptr) xorg_list_for_each_entry_safe(group, next, &ptr->match_product, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_vendor, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_device, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_os, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_pnpid, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_usbid, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_driver, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_tag, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_layout, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) - free(*list); + free((void *) *list); free(group); } diff --git a/xorg-server/hw/xfree86/parser/Module.c b/xorg-server/hw/xfree86/parser/Module.c index 87ddfc635..243ba9195 100644 --- a/xorg-server/hw/xfree86/parser/Module.c +++ b/xorg-server/hw/xfree86/parser/Module.c @@ -218,7 +218,7 @@ xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr) } XF86LoadPtr -xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, +xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type, XF86OptionPtr opts) { XF86LoadPtr new; diff --git a/xorg-server/hw/xfree86/parser/configProcs.h b/xorg-server/hw/xfree86/parser/configProcs.h index 1250f3922..60509dcd8 100644 --- a/xorg-server/hw/xfree86/parser/configProcs.h +++ b/xorg-server/hw/xfree86/parser/configProcs.h @@ -67,7 +67,7 @@ int xf86validateLayout(XF86ConfigPtr p); XF86ConfModulePtr xf86parseModuleSection(void); void xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr); extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, - char *name, int type, + const char *name, int type, XF86OptionPtr opts); void xf86freeModules(XF86ConfModulePtr ptr); @@ -141,7 +141,7 @@ xf86freeExtensions(XF86ConfExtensionsPtr ptr); #include <xorg-config.h> #endif -#ifndef IN_XSERVER +#ifndef HAVE_XORG_CONFIG_H /* Externally provided functions */ void ErrorF(const char *f, ...); diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index f852b83ec..55a84426d 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -820,7 +820,7 @@ static char * OpenConfigDir(const char *path, const char *cmdline, const char *projroot, const char *confname) { - char *dirpath, *pathcopy; + char *dirpath = NULL, *pathcopy; const char *template; Bool found = FALSE; int cmdlineUsed = 0; @@ -1078,9 +1078,10 @@ xf86nameCompare(const char *s1, const char *s2) } char * -xf86addComment(char *cur, char *add) +xf86addComment(char *cur, const char *add) { char *str; + const char *cstr; int len, curlen, iscomment, hasnewline = 0, insnewline, endnewline; if (add == NULL || add[0] == '\0') @@ -1095,14 +1096,14 @@ xf86addComment(char *cur, char *add) else curlen = 0; - str = add; + cstr = add; iscomment = 0; - while (*str) { - if (*str != ' ' && *str != '\t') + while (*cstr) { + if (*cstr != ' ' && *cstr != '\t') break; - ++str; + ++cstr; } - iscomment = (*str == '#'); + iscomment = (*cstr == '#'); len = strlen(add); endnewline = add[len - 1] == '\n'; diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h index e7210e811..83607f26c 100644 --- a/xorg-server/hw/xfree86/parser/xf86Parser.h +++ b/xorg-server/hw/xfree86/parser/xf86Parser.h @@ -85,7 +85,7 @@ typedef struct { typedef struct { GenericListRec list; int load_type; - char *load_name; + const char *load_name; XF86OptionPtr load_opt; char *load_comment; int ignore; @@ -116,7 +116,7 @@ typedef struct { typedef struct { GenericListRec list; - char *ml_identifier; + const char *ml_identifier; int ml_clock; int ml_hdisplay; int ml_hsyncstart; @@ -134,21 +134,21 @@ typedef struct { typedef struct { GenericListRec list; - char *vp_identifier; + const char *vp_identifier; XF86OptionPtr vp_option_lst; char *vp_comment; } XF86ConfVideoPortRec, *XF86ConfVideoPortPtr; typedef struct { GenericListRec list; - char *va_identifier; - char *va_vendor; - char *va_board; - char *va_busid; - char *va_driver; + const char *va_identifier; + const char *va_vendor; + const char *va_board; + const char *va_busid; + const char *va_driver; XF86OptionPtr va_option_lst; XF86ConfVideoPortPtr va_port_lst; - char *va_fwdref; + const char *va_fwdref; char *va_comment; } XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr; @@ -165,21 +165,21 @@ typedef struct { typedef struct { GenericListRec list; - char *modes_identifier; + const char *modes_identifier; XF86ConfModeLinePtr mon_modeline_lst; char *modes_comment; } XF86ConfModesRec, *XF86ConfModesPtr; typedef struct { GenericListRec list; - char *ml_modes_str; + const char *ml_modes_str; XF86ConfModesPtr ml_modes; } XF86ConfModesLinkRec, *XF86ConfModesLinkPtr; typedef struct { GenericListRec list; - char *mon_identifier; - char *mon_vendor; + const char *mon_identifier; + const char *mon_vendor; char *mon_modelname; int mon_width; /* in mm */ int mon_height; /* in mm */ @@ -201,21 +201,21 @@ typedef struct { typedef struct { GenericListRec list; - char *dev_identifier; - char *dev_vendor; - char *dev_board; - char *dev_chipset; - char *dev_busid; - char *dev_card; - char *dev_driver; - char *dev_ramdac; + const char *dev_identifier; + const char *dev_vendor; + const char *dev_board; + const char *dev_chipset; + const char *dev_busid; + const char *dev_card; + const char *dev_driver; + const char *dev_ramdac; int dev_dacSpeeds[CONF_MAXDACSPEEDS]; int dev_videoram; int dev_textclockfreq; unsigned long dev_bios_base; unsigned long dev_mem_base; unsigned long dev_io_base; - char *dev_clockchip; + const char *dev_clockchip; int dev_clocks; int dev_clock[CONF_MAXCLOCKS]; int dev_chipid; @@ -228,7 +228,7 @@ typedef struct { typedef struct { GenericListRec list; - char *mode_name; + const char *mode_name; } XF86ModeRec, *XF86ModePtr; typedef struct { @@ -239,7 +239,7 @@ typedef struct { int disp_virtualY; int disp_depth; int disp_bpp; - char *disp_visual; + const char *disp_visual; parser_rgb disp_weight; parser_rgb disp_black; parser_rgb disp_white; @@ -255,20 +255,20 @@ typedef struct { typedef struct { GenericListRec list; - char *al_adaptor_str; + const char *al_adaptor_str; XF86ConfVideoAdaptorPtr al_adaptor; } XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr; typedef struct { GenericListRec list; - char *scrn_identifier; - char *scrn_obso_driver; + const char *scrn_identifier; + const char *scrn_obso_driver; int scrn_defaultdepth; int scrn_defaultbpp; int scrn_defaultfbbpp; - char *scrn_monitor_str; + const char *scrn_monitor_str; XF86ConfMonitorPtr scrn_monitor; - char *scrn_device_str; + const char *scrn_device_str; XF86ConfDevicePtr scrn_device; XF86ConfAdaptorLinkPtr scrn_adaptor_lst; XF86ConfDisplayPtr scrn_display_lst; @@ -279,8 +279,8 @@ typedef struct { typedef struct { GenericListRec list; - char *inp_identifier; - char *inp_driver; + const char *inp_identifier; + const char *inp_driver; XF86OptionPtr inp_option_lst; char *inp_comment; } XF86ConfInputRec, *XF86ConfInputPtr; @@ -288,7 +288,7 @@ typedef struct { typedef struct { GenericListRec list; XF86ConfInputPtr iref_inputdev; - char *iref_inputdev_str; + const char *iref_inputdev_str; XF86OptionPtr iref_option_lst; } XF86ConfInputrefRec, *XF86ConfInputrefPtr; @@ -299,13 +299,13 @@ typedef struct { typedef struct { struct xorg_list entry; - char **values; + const char **values; } xf86MatchGroup; typedef struct { GenericListRec list; char *identifier; - char *driver; + const char *driver; struct xorg_list match_product; struct xorg_list match_vendor; struct xorg_list match_device; @@ -338,30 +338,30 @@ typedef struct { GenericListRec list; int adj_scrnum; XF86ConfScreenPtr adj_screen; - char *adj_screen_str; + const char *adj_screen_str; XF86ConfScreenPtr adj_top; - char *adj_top_str; + const char *adj_top_str; XF86ConfScreenPtr adj_bottom; - char *adj_bottom_str; + const char *adj_bottom_str; XF86ConfScreenPtr adj_left; - char *adj_left_str; + const char *adj_left_str; XF86ConfScreenPtr adj_right; - char *adj_right_str; + const char *adj_right_str; int adj_where; int adj_x; int adj_y; - char *adj_refscreen; + const char *adj_refscreen; } XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr; typedef struct { GenericListRec list; - char *inactive_device_str; + const char *inactive_device_str; XF86ConfDevicePtr inactive_device; } XF86ConfInactiveRec, *XF86ConfInactivePtr; typedef struct { GenericListRec list; - char *lay_identifier; + const char *lay_identifier; XF86ConfAdjacencyPtr lay_adjacency_lst; XF86ConfInactivePtr lay_inactive_lst; XF86ConfInputrefPtr lay_input_lst; @@ -371,22 +371,22 @@ typedef struct { typedef struct { GenericListRec list; - char *vs_name; - char *vs_identifier; + const char *vs_name; + const char *vs_identifier; XF86OptionPtr vs_option_lst; char *vs_comment; } XF86ConfVendSubRec, *XF86ConfVendSubPtr; typedef struct { GenericListRec list; - char *vnd_identifier; + const char *vnd_identifier; XF86OptionPtr vnd_option_lst; XF86ConfVendSubPtr vnd_sub_lst; char *vnd_comment; } XF86ConfVendorRec, *XF86ConfVendorPtr; typedef struct { - char *dri_group_name; + const char *dri_group_name; int dri_group; int dri_mode; char *dri_comment; @@ -462,7 +462,7 @@ extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, extern _X_EXPORT int xf86pathIsAbsolute(const char *path); extern _X_EXPORT int xf86pathIsSafe(const char *path); -extern _X_EXPORT char *xf86addComment(char *cur, char *add); +extern _X_EXPORT char *xf86addComment(char *cur, const char *add); extern _X_EXPORT Bool xf86getBoolValue(Bool *val, const char *str); #endif /* _xf86Parser_h_ */ |