aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/dgaproc.h2
-rw-r--r--xorg-server/hw/xfree86/common/vidmodeproc.h32
-rw-r--r--xorg-server/hw/xfree86/common/xf86.h59
-rw-r--r--xorg-server/hw/xfree86/common/xf86AutoConfig.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Bus.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c54
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.h8
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c44
-rw-r--r--xorg-server/hw/xfree86/common/xf86DGA.c12
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c30
-rw-r--r--xorg-server/hw/xfree86/common/xf86Extensions.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c38
-rw-r--r--xorg-server/hw/xfree86/common/xf86InPriv.h3
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c12
-rw-r--r--xorg-server/hw/xfree86/common/xf86Mode.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Module.h20
-rw-r--r--xorg-server/hw/xfree86/common/xf86Opt.h4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Option.c5
-rw-r--r--xorg-server/hw/xfree86/common/xf86Optionstr.h6
-rw-r--r--xorg-server/hw/xfree86/common/xf86PM.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Priv.h6
-rw-r--r--xorg-server/hw/xfree86/common/xf86Privstr.h4
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiter.c12
-rw-r--r--xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h16
-rw-r--r--xorg-server/hw/xfree86/common/xf86VidMode.c40
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.c14
-rw-r--r--xorg-server/hw/xfree86/common/xf86Xinput.h12
-rw-r--r--xorg-server/hw/xfree86/common/xf86cmap.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbman.c18
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbman.h16
-rw-r--r--xorg-server/hw/xfree86/common/xf86pciBus.c12
-rw-r--r--xorg-server/hw/xfree86/common/xf86pciBus.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86sbusBus.h14
-rw-r--r--xorg-server/hw/xfree86/common/xf86str.h94
-rw-r--r--xorg-server/hw/xfree86/common/xf86vmode.c18
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.c8
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.h30
-rw-r--r--xorg-server/hw/xfree86/common/xf86xvmc.h2
41 files changed, 341 insertions, 327 deletions
diff --git a/xorg-server/hw/xfree86/common/dgaproc.h b/xorg-server/hw/xfree86/common/dgaproc.h
index e824d3094..87e923f26 100644
--- a/xorg-server/hw/xfree86/common/dgaproc.h
+++ b/xorg-server/hw/xfree86/common/dgaproc.h
@@ -24,7 +24,7 @@
typedef struct {
int num; /* A unique identifier for the mode (num > 0) */
- char *name; /* name of mode given in the XF86Config */
+ const char *name; /* name of mode given in the XF86Config */
int VSync_num;
int VSync_den;
int flags; /* DGA_CONCURRENT_ACCESS, etc... */
diff --git a/xorg-server/hw/xfree86/common/vidmodeproc.h b/xorg-server/hw/xfree86/common/vidmodeproc.h
index 311d35c7b..cff340c47 100644
--- a/xorg-server/hw/xfree86/common/vidmodeproc.h
+++ b/xorg-server/hw/xfree86/common/vidmodeproc.h
@@ -34,7 +34,7 @@ typedef enum {
} VidModeSelectMonitor;
typedef union {
- pointer ptr;
+ const void *ptr;
int i;
float f;
} vidMonitorValue;
@@ -42,38 +42,38 @@ typedef union {
extern Bool VidModeExtensionInit(ScreenPtr pScreen);
extern _X_EXPORT Bool VidModeAvailable(int scrnIndex);
-extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode,
+extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, void **mode,
int *dotClock);
-extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode,
+extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, void **mode,
int *dotClock);
-extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, pointer *mode,
+extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, void **mode,
int *dotClock);
-extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, pointer mode);
+extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, void *mode);
extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom);
extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y);
extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y);
-extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, pointer mode);
+extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, void *mode);
extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock);
-extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, pointer *monitor);
+extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, void **monitor);
extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock);
extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks);
extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex,
- pointer mode);
+ void *mode);
extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex,
- pointer mode);
-extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, pointer mode);
-extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, pointer mode);
+ void *mode);
+extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, void *mode);
+extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, void *mode);
extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock);
extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex);
extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green,
float blue);
extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green,
float *blue);
-extern _X_EXPORT pointer VidModeCreateMode(void);
-extern _X_EXPORT void VidModeCopyMode(pointer modefrom, pointer modeto);
-extern _X_EXPORT int VidModeGetModeValue(pointer mode, int valtyp);
-extern _X_EXPORT void VidModeSetModeValue(pointer mode, int valtyp, int val);
-extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(pointer monitor,
+extern _X_EXPORT void *VidModeCreateMode(void);
+extern _X_EXPORT void VidModeCopyMode(void *modefrom, void *modeto);
+extern _X_EXPORT int VidModeGetModeValue(void *mode, int valtyp);
+extern _X_EXPORT void VidModeSetModeValue(void *mode, int valtyp, int val);
+extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(void *monitor,
int valtyp, int indx);
extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *,
CARD16 *);
diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h
index eada01cf9..89025fe11 100644
--- a/xorg-server/hw/xfree86/common/xf86.h
+++ b/xorg-server/hw/xfree86/common/xf86.h
@@ -128,7 +128,7 @@ extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn,
void *dummy, EntityProc init,
EntityProc enter,
EntityProc leave,
- pointer private);
+ void *private);
/* Obsolete! don't use */
extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
int entityIndex,
@@ -136,7 +136,7 @@ extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn,
void *dummy, EntityProc init,
EntityProc enter,
EntityProc leave,
- pointer private);
+ void *private);
#else
#define xf86VGAarbiterInit() do {} while (0)
#define xf86VGAarbiterFini() do {} while (0)
@@ -166,7 +166,7 @@ extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn,
extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex);
extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init,
EntityProc enter, EntityProc leave,
- pointer);
+ void *);
extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex);
extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex);
@@ -203,11 +203,6 @@ extern _X_EXPORT void xf86ReconfigureLayout(void);
extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set,
int flags);
-#ifdef DPMSExtension
-extern _X_EXPORT int DPMSSet(ClientPtr client, int level);
-extern _X_EXPORT Bool DPMSSupported(void);
-#endif
-
/* xf86DGA.c */
#ifdef XFreeXDGA
@@ -221,18 +216,18 @@ extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode;
/* xf86Events.c */
extern _X_EXPORT void SetTimeSinceLastInputEvent(void);
-extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc,
- pointer data);
-extern _X_EXPORT int xf86RemoveInputHandler(pointer handler);
-extern _X_EXPORT void xf86DisableInputHandler(pointer handler);
-extern _X_EXPORT void xf86EnableInputHandler(pointer handler);
-extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc,
- pointer data);
-extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler);
-extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler);
-extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler);
+extern _X_EXPORT void *xf86AddInputHandler(int fd, InputHandlerProc proc,
+ void *data);
+extern _X_EXPORT int xf86RemoveInputHandler(void *handler);
+extern _X_EXPORT void xf86DisableInputHandler(void *handler);
+extern _X_EXPORT void xf86EnableInputHandler(void *handler);
+extern _X_EXPORT void *xf86AddGeneralHandler(int fd, InputHandlerProc proc,
+ void *data);
+extern _X_EXPORT int xf86RemoveGeneralHandler(void *handler);
+extern _X_EXPORT void xf86DisableGeneralHandler(void *handler);
+extern _X_EXPORT void xf86EnableGeneralHandler(void *handler);
extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc
- handler, pointer data);
+ handler, void *data);
extern _X_EXPORT void xf86InterceptSignals(int *signo);
extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
@@ -242,7 +237,7 @@ extern _X_EXPORT Bool xf86VTOwner(void);
/* xf86Helper.c */
-extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module,
+extern _X_EXPORT void xf86AddDriver(DriverPtr driver, void *module,
int flags);
extern _X_EXPORT void xf86DeleteDriver(int drvIndex);
extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags);
@@ -333,36 +328,36 @@ xf86DisableRandR(void);
extern _X_EXPORT CARD32
xorgGetVersion(void);
extern _X_EXPORT CARD32
-xf86GetModuleVersion(pointer module);
-extern _X_EXPORT pointer
+xf86GetModuleVersion(void *module);
+extern _X_EXPORT void *
xf86LoadDrvSubModule(DriverPtr drv, const char *name);
-extern _X_EXPORT pointer
+extern _X_EXPORT void *
xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name);
-extern _X_EXPORT pointer
-xf86LoadOneModule(char *name, pointer optlist);
+extern _X_EXPORT void *
+xf86LoadOneModule(const char *name, void *optlist);
extern _X_EXPORT void
-xf86UnloadSubModule(pointer mod);
+xf86UnloadSubModule(void *mod);
extern _X_EXPORT Bool
xf86LoaderCheckSymbol(const char *name);
extern _X_EXPORT void
xf86SetBackingStore(ScreenPtr pScreen);
extern _X_EXPORT void
xf86SetSilkenMouse(ScreenPtr pScreen);
-extern _X_EXPORT pointer
-xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, char *port_name,
- char **adaptor_name, pointer *adaptor_options);
+extern _X_EXPORT void *
+xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, const char *port_name,
+ const char **adaptor_name, void **adaptor_options);
extern _X_EXPORT void
xf86GetOS(const char **name, int *major, int *minor, int *teeny);
extern _X_EXPORT ScrnInfoPtr
xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag,
int entityIndex, EntityProc init,
- EntityProc enter, EntityProc leave, pointer private);
+ EntityProc enter, EntityProc leave, void *private);
extern _X_EXPORT Bool
xf86IsScreenPrimary(ScrnInfoPtr pScrn);
extern _X_EXPORT int
xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
- int format, unsigned long len, pointer value);
+ int format, unsigned long len, void *value);
extern _X_EXPORT Bool
xf86IsUnblank(int mode);
@@ -394,7 +389,7 @@ extern _X_EXPORT ModeStatus
xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags);
extern _X_EXPORT int
xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
- char **modeNames, ClockRangePtr clockRanges,
+ const char **modeNames, ClockRangePtr clockRanges,
int *linePitches, int minPitch, int maxPitch,
int minHeight, int maxHeight, int pitchInc,
int virtualX, int virtualY, int apertureSize,
diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
index af2b7f8f2..4eb86de22 100644
--- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c
+++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
@@ -300,6 +300,7 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver)
{
confScreenPtr nscreen;
GDevPtr cptr = NULL;
+ char *identifier;
nscreen = malloc(sizeof(confScreenRec));
if (!nscreen)
@@ -313,13 +314,14 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver)
}
memcpy(cptr, odev, sizeof(GDevRec));
- if (asprintf(&cptr->identifier, "Autoconfigured Video Device %s", driver)
+ if (asprintf(&identifier, "Autoconfigured Video Device %s", driver)
== -1) {
free(cptr);
free(nscreen);
return FALSE;
}
cptr->driver = driver;
+ cptr->identifier = identifier;
xf86ConfigLayout.screens[i].screen = nscreen;
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c
index d463e9196..507c57dbc 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.c
+++ b/xorg-server/hw/xfree86/common/xf86Bus.c
@@ -288,7 +288,7 @@ xf86IsEntityPrimary(int entityIndex)
Bool
xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter,
- EntityProc leave, pointer private)
+ EntityProc leave, void *private)
{
if (entityIndex >= xf86NumEntities)
return FALSE;
diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h
index e83ba780a..c59625db6 100644
--- a/xorg-server/hw/xfree86/common/xf86Bus.h
+++ b/xorg-server/hw/xfree86/common/xf86Bus.h
@@ -51,7 +51,7 @@ typedef struct {
EntityProc entityInit;
EntityProc entityEnter;
EntityProc entityLeave;
- pointer private;
+ void *private;
Bool active;
Bool inUse;
BusRec bus;
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index b5efc02af..5be1693d8 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -171,7 +171,7 @@ xf86GetPathElem(char **pnt)
static char *
xf86ValidateFontPath(char *path)
{
- char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem;
+ char *next, *tmp_path, *out_pnt, *path_elem, *p1, *dir_elem;
struct stat stat_buf;
int flag;
int dirlen;
@@ -236,17 +236,17 @@ xf86ValidateFontPath(char *path)
* use the datastructure that the parser provides and pick out the parts
* that we need at this point
*/
-char **
-xf86ModulelistFromConfig(pointer **optlist)
+const char **
+xf86ModulelistFromConfig(void ***optlist)
{
int count = 0, i = 0;
- char **modulearray;
+ const char **modulearray;
const char *ignore[] = { "GLcore", "speedo", "bitmap", "drm",
"freetype", "type1",
NULL
};
- pointer *optarray;
+ void **optarray;
XF86LoadPtr modp;
Bool found;
@@ -352,7 +352,7 @@ xf86ModulelistFromConfig(pointer **optlist)
* allocate the memory and walk the list again to fill in the pointers
*/
modulearray = xnfalloc((count + 1) * sizeof(char *));
- optarray = xnfalloc((count + 1) * sizeof(pointer));
+ optarray = xnfalloc((count + 1) * sizeof(void *));
count = 0;
if (xf86configptr->conf_modules) {
modp = xf86configptr->conf_modules->mod_load_lst;
@@ -374,12 +374,12 @@ xf86ModulelistFromConfig(pointer **optlist)
return modulearray;
}
-char **
+const char **
xf86DriverlistFromConfig(void)
{
int count = 0;
int j;
- char **modulearray;
+ const char **modulearray;
screenLayoutPtr slp;
/*
@@ -446,11 +446,11 @@ xf86DriverlistFromConfig(void)
return modulearray;
}
-char **
+const char **
xf86InputDriverlistFromConfig(void)
{
int count = 0;
- char **modulearray;
+ const char **modulearray;
InputInfoPtr *idp;
/*
@@ -505,11 +505,11 @@ xf86InputDriverlistFromConfig(void)
}
static void
-fixup_video_driver_list(char **drivers)
+fixup_video_driver_list(const char **drivers)
{
static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL };
- char **end, **drv;
- char *x;
+ const char **end, **drv;
+ const char *x;
int i;
/* walk to the end of the list */
@@ -533,10 +533,10 @@ fixup_video_driver_list(char **drivers)
}
}
-static char **
+static const char **
GenerateDriverlist(const char *dirname)
{
- char **ret;
+ const char **ret;
const char *subdirs[] = { dirname, NULL };
static const char *patlist[] = { "(.*)_drv\\.so", NULL };
ret = LoaderListDirs(subdirs, patlist);
@@ -548,10 +548,10 @@ GenerateDriverlist(const char *dirname)
return ret;
}
-char **
+const char **
xf86DriverlistFromCompile(void)
{
- static char **driverlist = NULL;
+ static const char **driverlist = NULL;
if (!driverlist)
driverlist = GenerateDriverlist("drivers");
@@ -589,33 +589,35 @@ configFiles(XF86ConfFilesPtr fileconf)
/* FontPath */
must_copy = TRUE;
- temp_path = defaultFontPath ? defaultFontPath : "";
+ temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) "";
if (xf86fpFlag)
pathFrom = X_CMDLINE;
else if (fileconf && fileconf->file_fontpath) {
pathFrom = X_CONFIG;
if (xf86Info.useDefaultFontPath) {
- if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath,
+ char *new_font_path;
+ if (asprintf(&new_font_path, "%s%s%s", fileconf->file_fontpath,
*temp_path ? "," : "", temp_path) == -1)
- defaultFontPath = NULL;
+ new_font_path = NULL;
else
must_copy = FALSE;
+ defaultFontPath = new_font_path;
}
else
defaultFontPath = fileconf->file_fontpath;
}
else
pathFrom = X_DEFAULT;
- temp_path = defaultFontPath ? defaultFontPath : "";
+ temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) "";
/* xf86ValidateFontPath modifies its argument, but returns a copy of it. */
- temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath;
+ temp_path = must_copy ? xnfstrdup(defaultFontPath) : (char *) defaultFontPath;
defaultFontPath = xf86ValidateFontPath(temp_path);
free(temp_path);
/* make fontpath more readable in the logfiles */
countDirs = 1;
- temp_path = defaultFontPath;
+ temp_path = (char *) defaultFontPath;
while ((temp_path = index(temp_path, ',')) != NULL) {
countDirs++;
temp_path++;
@@ -623,7 +625,7 @@ configFiles(XF86ConfFilesPtr fileconf)
log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1);
temp_path = log_buf;
- start = defaultFontPath;
+ start = (char *) defaultFontPath;
while ((end = index(start, ',')) != NULL) {
size = (end - start) + 1;
*(temp_path++) = '\t';
@@ -2349,7 +2351,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
ConfigStatus
xf86HandleConfigFile(Bool autoconfig)
{
- char *scanptr;
+ const char *scanptr;
Bool singlecard = 0;
Bool implicit_layout = FALSE;
@@ -2444,7 +2446,7 @@ xf86HandleConfigFile(Bool autoconfig)
else {
if (xf86configptr->conf_flags != NULL) {
char *dfltlayout = NULL;
- pointer optlist = xf86configptr->conf_flags->flg_option_lst;
+ void *optlist = xf86configptr->conf_flags->flg_option_lst;
if (optlist && xf86FindOption(optlist, "defaultserverlayout"))
dfltlayout =
diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h
index de06677c3..23fb383c3 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.h
+++ b/xorg-server/hw/xfree86/common/xf86Config.h
@@ -59,10 +59,10 @@ typedef struct _ModuleDefault {
/*
* prototypes
*/
-char **xf86ModulelistFromConfig(pointer **);
-char **xf86DriverlistFromConfig(void);
-char **xf86DriverlistFromCompile(void);
-char **xf86InputDriverlistFromConfig(void);
+const char **xf86ModulelistFromConfig(void ***);
+const char **xf86DriverlistFromConfig(void);
+const char **xf86DriverlistFromCompile(void);
+const char **xf86InputDriverlistFromConfig(void);
Bool xf86BuiltinInputDriver(const char *);
ConfigStatus xf86HandleConfigFile(Bool);
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 91e8df93d..1348b2753 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -81,6 +81,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData,
int chipset)
{
int ret, i, j;
+ char *lower_driver;
if (!xf86DoConfigure || !xf86DoConfigurePass1)
return NULL;
@@ -117,8 +118,9 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData,
DevToConfig[i].iDriver = CurrentDriver;
/* Fill in what we know, converting the driver name to lower case */
- DevToConfig[i].GDev.driver = xnfalloc(strlen(driver) + 1);
- for (j = 0; (DevToConfig[i].GDev.driver[j] = tolower(driver[j])); j++);
+ lower_driver = xnfalloc(strlen(driver) + 1);
+ for (j = 0; (lower_driver[j] = tolower(driver[j])); j++);
+ DevToConfig[i].GDev.driver = lower_driver;
switch (bus) {
#ifdef XSERVER_LIBPCIACCESS
@@ -193,11 +195,15 @@ configureScreenSection(int screennum)
{
int i;
int depths[] = { 1, 4, 8, 15, 16, 24 /*, 32 */ };
+ char *tmp;
parsePrologue(XF86ConfScreenPtr, XF86ConfScreenRec)
- XNFasprintf(&ptr->scrn_identifier, "Screen%d", screennum);
- XNFasprintf(&ptr->scrn_monitor_str, "Monitor%d", screennum);
- XNFasprintf(&ptr->scrn_device_str, "Card%d", screennum);
+ XNFasprintf(&tmp, "Screen%d", screennum);
+ ptr->scrn_identifier = tmp;
+ XNFasprintf(&tmp, "Monitor%d", screennum);
+ ptr->scrn_monitor_str = tmp;
+ XNFasprintf(&tmp, "Card%d", screennum);
+ ptr->scrn_device_str = tmp;
for (i = 0; i < sizeof(depths) / sizeof(depths[0]); i++) {
XF86ConfDisplayPtr display;
@@ -246,12 +252,14 @@ configureDeviceSection(int screennum)
{
OptionInfoPtr p;
int i = 0;
+ char *identifier;
parsePrologue(XF86ConfDevicePtr, XF86ConfDeviceRec)
/* Move device info to parser structure */
- if (asprintf(&ptr->dev_identifier, "Card%d", screennum) == -1)
- ptr->dev_identifier = NULL;
+ if (asprintf(&identifier, "Card%d", screennum) == -1)
+ identifier = NULL;
+ ptr->dev_identifier = identifier;
ptr->dev_chipset = DevToConfig[screennum].GDev.chipset;
ptr->dev_busid = DevToConfig[screennum].GDev.busID;
ptr->dev_driver = DevToConfig[screennum].GDev.driver;
@@ -353,20 +361,24 @@ configureLayoutSection(void)
for (scrnum = 0; scrnum < nDevToConfig; scrnum++) {
XF86ConfAdjacencyPtr aptr;
+ char *tmp;
aptr = malloc(sizeof(XF86ConfAdjacencyRec));
aptr->list.next = NULL;
aptr->adj_x = 0;
aptr->adj_y = 0;
aptr->adj_scrnum = scrnum;
- XNFasprintf(&aptr->adj_screen_str, "Screen%d", scrnum);
+ XNFasprintf(&tmp, "Screen%d", scrnum);
+ aptr->adj_screen_str = tmp;
if (scrnum == 0) {
aptr->adj_where = CONF_ADJ_ABSOLUTE;
aptr->adj_refscreen = NULL;
}
else {
+ char *tmp;
aptr->adj_where = CONF_ADJ_RIGHTOF;
- XNFasprintf(&aptr->adj_refscreen, "Screen%d", scrnum - 1);
+ XNFasprintf(&tmp, "Screen%d", scrnum - 1);
+ aptr->adj_refscreen = tmp;
}
ptr->lay_adjacency_lst =
(XF86ConfAdjacencyPtr) xf86addListItem((glp) ptr->lay_adjacency_lst,
@@ -387,7 +399,7 @@ configureFlagsSection(void)
static XF86ConfModulePtr
configureModuleSection(void)
{
- char **elist, **el;
+ const char **elist, **el;
/* Find the list of extension & font modules. */
const char *esubdirs[] = {
@@ -430,9 +442,11 @@ configureFilesSection(void)
static XF86ConfMonitorPtr
configureMonitorSection(int screennum)
{
+ char *tmp;
parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec)
- XNFasprintf(&ptr->mon_identifier, "Monitor%d", screennum);
+ XNFasprintf(&tmp, "Monitor%d", screennum);
+ ptr->mon_identifier = tmp;
ptr->mon_vendor = strdup("Monitor Vendor");
ptr->mon_modelname = strdup("Monitor Model");
@@ -472,10 +486,12 @@ configureDDCMonitorSection(int screennum)
#define displaySizeMaxLen 80
char displaySize_string[displaySizeMaxLen];
int displaySizeLen;
+ char *tmp;
parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec)
- XNFasprintf(&ptr->mon_identifier, "Monitor%d", screennum);
+ XNFasprintf(&tmp, "Monitor%d", screennum);
+ ptr->mon_identifier = tmp;
ptr->mon_vendor = strdup(ConfiguredMonitor->vendor.name);
XNFasprintf(&ptr->mon_modelname, "%x", ConfiguredMonitor->vendor.prod_id);
@@ -528,7 +544,7 @@ DoConfigure(void)
char filename[PATH_MAX];
const char *addslash = "";
XF86ConfigPtr xf86config = NULL;
- char **vlist, **vl;
+ const char **vlist, **vl;
int *dev2screen;
vlist = xf86DriverlistFromCompile();
@@ -766,7 +782,7 @@ void
DoShowOptions(void)
{
int i = 0;
- char **vlist = 0;
+ const char **vlist = NULL;
char *pSymbol = 0;
XF86ModuleData *initData = 0;
diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c
index 6a05ce536..b9e1e3f88 100644
--- a/xorg-server/hw/xfree86/common/xf86DGA.c
+++ b/xorg-server/hw/xfree86/common/xf86DGA.c
@@ -450,7 +450,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet)
pMode->pixmapHeight, pMode->depth,
pMode->bitsPerPixel,
pMode->bytesPerScanline,
- (pointer) (pMode->address));
+ (void *) (pMode->address));
}
}
@@ -1214,7 +1214,7 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device)
static void XDGAResetProc(ExtensionEntry * extEntry);
-static void DGAClientStateChange(CallbackListPtr *, pointer, pointer);
+static void DGAClientStateChange(CallbackListPtr *, void *, void *);
static DevPrivateKeyRec DGAScreenPrivateKeyRec;
@@ -1404,7 +1404,7 @@ ProcXDGAQueryModes(ClientPtr client)
}
static void
-DGAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
+DGAClientStateChange(CallbackListPtr *pcbl, void *nulldata, void *calldata)
{
NewClientInfoRec *pci = (NewClientInfoRec *) calldata;
ClientPtr client = NULL;
@@ -1484,7 +1484,7 @@ ProcXDGASetMode(ClientPtr client)
DGA_SETCLIENT(stuff->screen, client);
if (pPix) {
- if (AddResource(stuff->pid, RT_PIXMAP, (pointer) (pPix))) {
+ if (AddResource(stuff->pid, RT_PIXMAP, (void *) (pPix))) {
pPix->drawable.id = (int) stuff->pid;
rep.flags = DGA_PIXMAP_AVAILABLE;
}
@@ -1562,7 +1562,7 @@ ProcXDGAInstallColormap(ClientPtr client)
REQUEST_SIZE_MATCH(xXDGAInstallColormapReq);
- rc = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &cmap, stuff->cmap, RT_COLORMAP,
client, DixInstallAccess);
if (rc != Success)
return rc;
@@ -1991,7 +1991,7 @@ ProcXF86DGAInstallColormap(ClientPtr client)
if (!DGAActive(stuff->screen))
return DGAErrorBase + XF86DGADirectNotActivated;
- rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP,
+ rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP,
client, DixInstallAccess);
if (rc == Success) {
DGAInstallCmap(pcmp);
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index 881cb2773..14d1f4545 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -60,7 +60,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
#ifdef DPMSExtension
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
DPMSPtr pDPMS;
- pointer DPMSOpt;
+ void *DPMSOpt;
MessageType enabled_from;
DPMSKey = &DPMSKeyRec;
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index d0b14314b..cae78732c 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -114,7 +114,7 @@ static void xf86VTSwitch(void);
typedef struct x_IHRec {
int fd;
InputHandlerProc ihproc;
- pointer data;
+ void *data;
Bool enabled;
Bool is_input;
struct x_IHRec *next;
@@ -243,7 +243,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg)
/* ARGSUSED */
void
-xf86Wakeup(pointer blockData, int err, pointer pReadmask)
+xf86Wakeup(void *blockData, int err, void *pReadmask)
{
fd_set *LastSelectMask = (fd_set *) pReadmask;
fd_set devicesWithInput;
@@ -583,8 +583,8 @@ xf86VTSwitch(void)
/* Input handler registration */
-static pointer
-addInputHandler(int fd, InputHandlerProc proc, pointer data)
+static void *
+addInputHandler(int fd, InputHandlerProc proc, void *data)
{
IHPtr ih;
@@ -606,8 +606,8 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data)
return ih;
}
-pointer
-xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data)
+void *
+xf86AddInputHandler(int fd, InputHandlerProc proc, void *data)
{
IHPtr ih = addInputHandler(fd, proc, data);
@@ -618,8 +618,8 @@ xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data)
return ih;
}
-pointer
-xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
+void *
+xf86AddGeneralHandler(int fd, InputHandlerProc proc, void *data)
{
IHPtr ih = addInputHandler(fd, proc, data);
@@ -634,7 +634,7 @@ xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data)
* proc may be NULL if the server should not handle events on the console.
*/
InputHandlerProc
-xf86SetConsoleHandler(InputHandlerProc proc, pointer data)
+xf86SetConsoleHandler(InputHandlerProc proc, void *data)
{
static IHPtr handler = NULL;
InputHandlerProc old_proc = NULL;
@@ -667,7 +667,7 @@ removeInputHandler(IHPtr ih)
}
int
-xf86RemoveInputHandler(pointer handler)
+xf86RemoveInputHandler(void *handler)
{
IHPtr ih;
int fd;
@@ -686,7 +686,7 @@ xf86RemoveInputHandler(pointer handler)
}
int
-xf86RemoveGeneralHandler(pointer handler)
+xf86RemoveGeneralHandler(void *handler)
{
IHPtr ih;
int fd;
@@ -705,7 +705,7 @@ xf86RemoveGeneralHandler(pointer handler)
}
void
-xf86DisableInputHandler(pointer handler)
+xf86DisableInputHandler(void *handler)
{
IHPtr ih;
@@ -719,7 +719,7 @@ xf86DisableInputHandler(pointer handler)
}
void
-xf86DisableGeneralHandler(pointer handler)
+xf86DisableGeneralHandler(void *handler)
{
IHPtr ih;
@@ -733,7 +733,7 @@ xf86DisableGeneralHandler(pointer handler)
}
void
-xf86EnableInputHandler(pointer handler)
+xf86EnableInputHandler(void *handler)
{
IHPtr ih;
@@ -747,7 +747,7 @@ xf86EnableInputHandler(pointer handler)
}
void
-xf86EnableGeneralHandler(pointer handler)
+xf86EnableGeneralHandler(void *handler)
{
IHPtr ih;
diff --git a/xorg-server/hw/xfree86/common/xf86Extensions.c b/xorg-server/hw/xfree86/common/xf86Extensions.c
index f9e791607..c80de34e6 100644
--- a/xorg-server/hw/xfree86/common/xf86Extensions.c
+++ b/xorg-server/hw/xfree86/common/xf86Extensions.c
@@ -89,7 +89,6 @@ load_extension_config(void)
{
XF86ConfModulePtr mod_con = xf86configptr->conf_modules;
XF86LoadPtr modp;
- int i;
/* Only the best. */
if (!mod_con)
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index f1e6783a7..0916deccf 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -67,7 +67,7 @@ static int xf86ScrnInfoPrivateCount = 0;
/* Add a pointer to a new DriverRec to xf86DriverList */
void
-xf86AddDriver(DriverPtr driver, pointer module, int flags)
+xf86AddDriver(DriverPtr driver, void *module, int flags)
{
/* Don't add null entries */
if (!driver)
@@ -107,7 +107,7 @@ xf86DeleteDriver(int drvIndex)
/* Add a pointer to a new InputDriverRec to xf86InputDriverList */
void
-xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
+xf86AddInputDriver(InputDriverPtr driver, void *module, int flags)
{
/* Don't add null entries */
if (!driver)
@@ -1068,9 +1068,7 @@ void
xf86EnableDisableFBAccess(ScrnInfoPtr pScrnInfo, Bool enable)
{
ScreenPtr pScreen = pScrnInfo->pScreen;
- PixmapPtr pspix;
- pspix = (*pScreen->GetScreenPixmap) (pScreen);
if (enable) {
/*
* Restore all of the clip lists on the screen
@@ -1531,15 +1529,15 @@ xf86DisableRandR(void)
}
CARD32
-xf86GetModuleVersion(pointer module)
+xf86GetModuleVersion(void *module)
{
return (CARD32) LoaderGetModuleVersion(module);
}
-pointer
+void *
xf86LoadDrvSubModule(DriverPtr drv, const char *name)
{
- pointer ret;
+ void *ret;
int errmaj = 0, errmin = 0;
ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL,
@@ -1549,10 +1547,10 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name)
return ret;
}
-pointer
+void *
xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
{
- pointer ret;
+ void *ret;
int errmaj = 0, errmin = 0;
ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL,
@@ -1565,12 +1563,12 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)
/*
* xf86LoadOneModule loads a single module.
*/
-pointer
-xf86LoadOneModule(char *name, pointer opt)
+void *
+xf86LoadOneModule(const char *name, void *opt)
{
int errmaj, errmin;
char *Name;
- pointer mod;
+ void *mod;
if (!name)
return NULL;
@@ -1594,7 +1592,7 @@ xf86LoadOneModule(char *name, pointer opt)
}
void
-xf86UnloadSubModule(pointer mod)
+xf86UnloadSubModule(void *mod)
{
UnloadSubModule(mod);
}
@@ -1697,9 +1695,9 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
/* Wrote this function for the PM2 Xv driver, preliminary. */
-pointer
-xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, char *port_name,
- char **adaptor_name, pointer *adaptor_options)
+void *
+xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, const char *port_name,
+ const char **adaptor_name, void **adaptor_options)
{
confXvAdaptorPtr adaptor;
int i;
@@ -1731,7 +1729,7 @@ xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, char *port_name,
static void
xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
- EntityProc enter, EntityProc leave, pointer private)
+ EntityProc enter, EntityProc leave, void *private)
{
ScrnInfoPtr pScrn;
@@ -1743,7 +1741,7 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init,
ScrnInfoPtr
xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
EntityProc init, EntityProc enter, EntityProc leave,
- pointer private)
+ void *private)
{
EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
@@ -1785,7 +1783,7 @@ xf86IsScreenPrimary(ScrnInfoPtr pScrn)
int
xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
- int format, unsigned long len, pointer value)
+ int format, unsigned long len, void *value)
{
RootWinPropPtr pNewProp = NULL, pRegProp;
Bool existing = FALSE;
@@ -1817,7 +1815,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type,
pNewProp->next = NULL;
}
else {
- free(pNewProp->name);
+ free((void *) pNewProp->name);
existing = TRUE;
}
diff --git a/xorg-server/hw/xfree86/common/xf86InPriv.h b/xorg-server/hw/xfree86/common/xf86InPriv.h
index 5826ac388..b8229d2c1 100644
--- a/xorg-server/hw/xfree86/common/xf86InPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86InPriv.h
@@ -37,7 +37,4 @@
extern InputDriverPtr *xf86InputDriverList;
extern int xf86NumInputDrivers;
-/* xf86Helper.c */
-InputDriverPtr xf86LookupInputDriver(const char *name);
-
#endif /* _xf86InPriv_h */
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 91ec4c8bb..7c72aa964 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -395,8 +395,8 @@ void
InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
{
int i, j, k, scr_index;
- char **modulelist;
- pointer *optionlist;
+ const char **modulelist;
+ void **optionlist;
Pix24Flags screenpix24, pix24;
MessageType pix24From = X_DEFAULT;
Bool pix24Fail = FALSE;
@@ -623,7 +623,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
for (i = 0; i < xf86NumScreens; i++) {
if (xf86Screens[i]->name == NULL) {
- XNFasprintf(&xf86Screens[i]->name, "screen%d", i);
+ char *tmp;
+ XNFasprintf(&tmp, "screen%d", i);
+ xf86Screens[i]->name = tmp;
xf86MsgVerb(X_WARNING, 0,
"Screen driver %d has no name set, using `%s'.\n",
i, xf86Screens[i]->name);
@@ -1536,10 +1538,10 @@ ddxUseMsg(void)
* xf86LoadModules iterates over a list that is being passed in.
*/
Bool
-xf86LoadModules(char **list, pointer *optlist)
+xf86LoadModules(const char **list, void **optlist)
{
int errmaj, errmin;
- pointer opt;
+ void *opt;
int i;
char *name;
Bool failed = FALSE;
diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c
index 706ab64fc..44bc55953 100644
--- a/xorg-server/hw/xfree86/common/xf86Mode.c
+++ b/xorg-server/hw/xfree86/common/xf86Mode.c
@@ -1354,7 +1354,7 @@ scanLineWidth(unsigned int xsize, /* pixels */
int
xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
- char **modeNames, ClockRangePtr clockRanges,
+ const char **modeNames, ClockRangePtr clockRanges,
int *linePitches, int minPitch, int maxPitch, int pitchInc,
int minHeight, int maxHeight, int virtualX, int virtualY,
int apertureSize, LookupModeFlags strategy)
@@ -1998,7 +1998,7 @@ xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode)
mode->next->prev = mode->prev;
}
- free(mode->name);
+ free((void *) mode->name);
free(mode);
}
diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h
index 265b55348..b6ec19d13 100644
--- a/xorg-server/hw/xfree86/common/xf86Module.h
+++ b/xorg-server/hw/xfree86/common/xf86Module.h
@@ -170,13 +170,13 @@ typedef struct {
#define INITARGS void
/* Prototypes for Loader functions that are exported to modules */
-extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **,
- const char **, pointer,
+extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **,
+ const char **, void *,
const XF86ModReqInfo *, int *, int *);
-extern _X_EXPORT void UnloadSubModule(pointer);
-extern _X_EXPORT void UnloadModule(pointer);
-extern _X_EXPORT pointer LoaderSymbol(const char *);
-extern _X_EXPORT char **LoaderListDirs(const char **, const char **);
+extern _X_EXPORT void UnloadSubModule(void *);
+extern _X_EXPORT void UnloadModule(void *);
+extern _X_EXPORT void *LoaderSymbol(const char *);
+extern _X_EXPORT const char **LoaderListDirs(const char **, const char **);
extern _X_EXPORT void LoaderFreeDirList(char **);
extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int);
extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor,
@@ -184,11 +184,11 @@ extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor,
extern _X_EXPORT Bool LoaderShouldIgnoreABI(void);
extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass);
-typedef pointer (*ModuleSetupProc) (pointer, pointer, int *, int *);
-typedef void (*ModuleTearDownProc) (pointer);
+typedef void *(*ModuleSetupProc) (void *, void *, int *, int *);
+typedef void (*ModuleTearDownProc) (void *);
-#define MODULESETUPPROTO(func) pointer func(pointer, pointer, int*, int*)
-#define MODULETEARDOWNPROTO(func) void func(pointer)
+#define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*)
+#define MODULETEARDOWNPROTO(func) void func(void *)
typedef struct {
XF86ModuleVersionInfo *vers;
diff --git a/xorg-server/hw/xfree86/common/xf86Opt.h b/xorg-server/hw/xfree86/common/xf86Opt.h
index c3ba2d75c..3be2a0fc7 100644
--- a/xorg-server/hw/xfree86/common/xf86Opt.h
+++ b/xorg-server/hw/xfree86/common/xf86Opt.h
@@ -39,7 +39,7 @@ typedef struct {
typedef union {
unsigned long num;
- char *str;
+ const char *str;
double realnum;
Bool bool;
OptFrequency freq;
@@ -123,7 +123,7 @@ extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec * table,
extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec * table,
int token);
extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec * table, int token);
-extern _X_EXPORT char *xf86GetOptValString(const OptionInfoRec * table,
+extern _X_EXPORT const char *xf86GetOptValString(const OptionInfoRec * table,
int token);
extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec * table,
int token, int *value);
diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c
index 607c33354..0e8bc1f83 100644
--- a/xorg-server/hw/xfree86/common/xf86Option.c
+++ b/xorg-server/hw/xfree86/common/xf86Option.c
@@ -478,7 +478,8 @@ static Bool
ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p,
Bool markUsed)
{
- char *s, *end;
+ const char *s;
+ char *end;
Bool wasUsed = FALSE;
if ((s = xf86findOptionValue(options, p->name)) != NULL) {
@@ -755,7 +756,7 @@ xf86IsOptionSet(const OptionInfoRec * table, int token)
return p && p->found;
}
-char *
+const char *
xf86GetOptValString(const OptionInfoRec * table, int token)
{
OptionInfoPtr p;
diff --git a/xorg-server/hw/xfree86/common/xf86Optionstr.h b/xorg-server/hw/xfree86/common/xf86Optionstr.h
index c38499cb5..4ef917dee 100644
--- a/xorg-server/hw/xfree86/common/xf86Optionstr.h
+++ b/xorg-server/hw/xfree86/common/xf86Optionstr.h
@@ -31,10 +31,10 @@
*/
typedef struct _XF86OptionRec {
GenericListRec list;
- char *opt_name;
- char *opt_val;
+ const char *opt_name;
+ const char *opt_val;
int opt_used;
- char *opt_comment;
+ const char *opt_comment;
} XF86OptionRec;
typedef struct _InputOption *XF86OptionPtr;
diff --git a/xorg-server/hw/xfree86/common/xf86PM.c b/xorg-server/hw/xfree86/common/xf86PM.c
index 15257cb81..9e49e8eaf 100644
--- a/xorg-server/hw/xfree86/common/xf86PM.c
+++ b/xorg-server/hw/xfree86/common/xf86PM.c
@@ -196,7 +196,7 @@ DoApmEvent(pmEvent event, Bool undo)
#define MAX_NO_EVENTS 8
void
-xf86HandlePMEvents(int fd, pointer data)
+xf86HandlePMEvents(int fd, void *data)
{
pmEvent events[MAX_NO_EVENTS];
int i, n;
diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h
index 58cfe0a1a..6e374eb7e 100644
--- a/xorg-server/hw/xfree86/common/xf86Priv.h
+++ b/xorg-server/hw/xfree86/common/xf86Priv.h
@@ -139,11 +139,11 @@ DoShowOptions(void)
/* xf86Events.c */
extern _X_EXPORT void
-xf86Wakeup(pointer blockData, int err, pointer pReadmask);
+xf86Wakeup(void *blockData, int err, void *pReadmask);
extern _X_HIDDEN int
xf86SigWrapper(int signo);
extern _X_EXPORT void
-xf86HandlePMEvents(int fd, pointer data);
+xf86HandlePMEvents(int fd, void *data);
extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events,
int num);
extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event);
@@ -156,7 +156,7 @@ xf86CloseLog(enum ExitCode error);
/* xf86Init.c */
extern _X_EXPORT Bool
-xf86LoadModules(char **list, pointer *optlist);
+xf86LoadModules(const char **list, void **optlist);
extern _X_EXPORT int
xf86SetVerbosity(int verb);
extern _X_EXPORT int
diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h
index e20be03a9..f7a9c9f1c 100644
--- a/xorg-server/hw/xfree86/common/xf86Privstr.h
+++ b/xorg-server/hw/xfree86/common/xf86Privstr.h
@@ -136,11 +136,11 @@ typedef struct {
/* Information for root window properties. */
typedef struct _RootWinProp {
struct _RootWinProp *next;
- char *name;
+ const char *name;
Atom type;
short format;
long size;
- pointer data;
+ void *data;
} RootWinProp, *RootWinPropPtr;
/* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
index 225fff06e..5cc24298b 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c
@@ -257,7 +257,7 @@ VGAarbiterCloseScreen(ScreenPtr pScreen)
UNWRAP_SCREEN_INFO(FreeScreen);
UNWRAP_SPRITE;
- free((pointer) pScreenPriv);
+ free((void *) pScreenPriv);
xf86VGAarbiterLock(xf86ScreenToScrn(pScreen));
val = (*pScreen->CloseScreen) (pScreen);
xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen));
@@ -266,7 +266,7 @@ VGAarbiterCloseScreen(ScreenPtr pScreen)
static void
VGAarbiterBlockHandler(ScreenPtr pScreen,
- pointer pTimeout, pointer pReadmask)
+ void *pTimeout, void *pReadmask)
{
SCREEN_PROLOG(BlockHandler);
VGAGet(pScreen);
@@ -277,7 +277,7 @@ VGAarbiterBlockHandler(ScreenPtr pScreen,
static void
VGAarbiterWakeupHandler(ScreenPtr pScreen, unsigned long result,
- pointer pReadmask)
+ void *pReadmask)
{
SCREEN_PROLOG(WakeupHandler);
VGAGet(pScreen);
@@ -586,7 +586,7 @@ VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
}
static void
-VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
+VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
{
GC_UNWRAP(pGC);
(*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
@@ -860,7 +860,7 @@ VGAarbiterImageGlyphBlt(DrawablePtr pDraw,
GCPtr pGC,
int xInit, int yInit,
unsigned int nglyph,
- CharInfoPtr * ppci, pointer pglyphBase)
+ CharInfoPtr * ppci, void *pglyphBase)
{
ScreenPtr pScreen = pGC->pScreen;
@@ -877,7 +877,7 @@ VGAarbiterPolyGlyphBlt(DrawablePtr pDraw,
GCPtr pGC,
int xInit, int yInit,
unsigned int nglyph,
- CharInfoPtr * ppci, pointer pglyphBase)
+ CharInfoPtr * ppci, void *pglyphBase)
{
ScreenPtr pScreen = pGC->pScreen;
diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
index ba6edfcc3..ec21bc2f2 100644
--- a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -137,15 +137,15 @@ typedef struct _VGAarbiterScreen {
} VGAarbiterScreenRec, *VGAarbiterScreenPtr;
typedef struct _VGAarbiterGC {
- GCOps *wrapOps;
- GCFuncs *wrapFuncs;
+ const GCOps *wrapOps;
+ const GCFuncs *wrapFuncs;
} VGAarbiterGCRec, *VGAarbiterGCPtr;
/* Screen funcs */
-static void VGAarbiterBlockHandler(ScreenPtr pScreen, pointer pTimeout,
- pointer pReadmask);
+static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout,
+ void *pReadmask);
static void VGAarbiterWakeupHandler(ScreenPtr pScreen,
- unsigned long result, pointer pReadmask);
+ unsigned long result, void *pReadmask);
static Bool VGAarbiterCloseScreen(ScreenPtr pScreen);
static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w,
int h, unsigned int format,
@@ -188,7 +188,7 @@ static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask);
static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
static void VGAarbiterDestroyGC(GCPtr pGC);
-static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue,
+static void VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue,
int nrects);
static void VGAarbiterDestroyClip(GCPtr pGC);
static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc);
@@ -236,10 +236,10 @@ static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y,
int count, unsigned short *chars);
static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
int yInit, unsigned int nglyph,
- CharInfoPtr * ppci, pointer pglyphBase);
+ CharInfoPtr * ppci, void *pglyphBase);
static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit,
int yInit, unsigned int nglyph,
- CharInfoPtr * ppci, pointer pglyphBase);
+ CharInfoPtr * ppci, void *pglyphBase);
static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr
pDraw, int dx, int dy, int xOrg, int yOrg);
diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c
index a7d1c25bf..e708b2792 100644
--- a/xorg-server/hw/xfree86/common/xf86VidMode.c
+++ b/xorg-server/hw/xfree86/common/xf86VidMode.c
@@ -138,7 +138,7 @@ VidModeAvailable(int scrnIndex)
}
Bool
-VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
+VidModeGetCurrentModeline(int scrnIndex, void **mode, int *dotClock)
{
ScrnInfoPtr pScrn;
@@ -148,7 +148,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
pScrn = xf86Screens[scrnIndex];
if (pScrn->currentMode) {
- *mode = (pointer) (pScrn->currentMode);
+ *mode = (void *) (pScrn->currentMode);
*dotClock = pScrn->currentMode->Clock;
return TRUE;
@@ -211,7 +211,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks)
}
Bool
-VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
+VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock)
{
ScrnInfoPtr pScrn;
VidModePtr pVidMode;
@@ -228,7 +228,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
pVidMode->Next = pVidMode->First->next;
if (pVidMode->First->status == MODE_OK) {
- *mode = (pointer) (pVidMode->First);
+ *mode = (void *) (pVidMode->First);
*dotClock = VidModeGetDotClock(scrnIndex, pVidMode->First->Clock);
return TRUE;
}
@@ -237,7 +237,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
}
Bool
-VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
+VidModeGetNextModeline(int scrnIndex, void **mode, int *dotClock)
{
ScrnInfoPtr pScrn;
VidModePtr pVidMode;
@@ -252,7 +252,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
for (p = pVidMode->Next; p != NULL && p != pVidMode->First; p = p->next) {
if (p->status == MODE_OK) {
pVidMode->Next = p->next;
- *mode = (pointer) p;
+ *mode = (void *) p;
*dotClock = VidModeGetDotClock(scrnIndex, p->Clock);
return TRUE;
}
@@ -262,7 +262,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock)
}
Bool
-VidModeDeleteModeline(int scrnIndex, pointer mode)
+VidModeDeleteModeline(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
@@ -323,7 +323,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y)
}
Bool
-VidModeSwitchMode(int scrnIndex, pointer mode)
+VidModeSwitchMode(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
DisplayModePtr pTmpMode;
@@ -362,7 +362,7 @@ VidModeLockZoom(int scrnIndex, Bool lock)
}
Bool
-VidModeGetMonitor(int scrnIndex, pointer *monitor)
+VidModeGetMonitor(int scrnIndex, void **monitor)
{
ScrnInfoPtr pScrn;
@@ -370,13 +370,13 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor)
return FALSE;
pScrn = xf86Screens[scrnIndex];
- *monitor = (pointer) (pScrn->monitor);
+ *monitor = (void *) (pScrn->monitor);
return TRUE;
}
ModeStatus
-VidModeCheckModeForMonitor(int scrnIndex, pointer mode)
+VidModeCheckModeForMonitor(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
@@ -389,7 +389,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode)
}
ModeStatus
-VidModeCheckModeForDriver(int scrnIndex, pointer mode)
+VidModeCheckModeForDriver(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
@@ -402,7 +402,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode)
}
void
-VidModeSetCrtcForMode(int scrnIndex, pointer mode)
+VidModeSetCrtcForMode(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
DisplayModePtr ScreenModes;
@@ -421,7 +421,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode)
}
Bool
-VidModeAddModeline(int scrnIndex, pointer mode)
+VidModeAddModeline(int scrnIndex, void *mode)
{
ScrnInfoPtr pScrn;
@@ -444,7 +444,7 @@ VidModeAddModeline(int scrnIndex, pointer mode)
int
VidModeGetNumOfModes(int scrnIndex)
{
- pointer mode = NULL;
+ void *mode = NULL;
int dotClock = 0, nummodes = 0;
if (!VidModeGetFirstModeline(scrnIndex, &mode, &dotClock))
@@ -526,7 +526,7 @@ VidModeGetGammaRampSize(int scrnIndex)
return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen);
}
-pointer
+void *
VidModeCreateMode(void)
{
DisplayModePtr mode;
@@ -543,13 +543,13 @@ VidModeCreateMode(void)
}
void
-VidModeCopyMode(pointer modefrom, pointer modeto)
+VidModeCopyMode(void *modefrom, void *modeto)
{
memcpy(modeto, modefrom, sizeof(DisplayModeRec));
}
int
-VidModeGetModeValue(pointer mode, int valtyp)
+VidModeGetModeValue(void *mode, int valtyp)
{
int ret = 0;
@@ -592,7 +592,7 @@ VidModeGetModeValue(pointer mode, int valtyp)
}
void
-VidModeSetModeValue(pointer mode, int valtyp, int val)
+VidModeSetModeValue(void *mode, int valtyp, int val)
{
switch (valtyp) {
case VIDMODE_H_DISPLAY:
@@ -633,7 +633,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val)
}
vidMonitorValue
-VidModeGetMonitorValue(pointer monitor, int valtyp, int indx)
+VidModeGetMonitorValue(void *monitor, int valtyp, int indx)
{
vidMonitorValue ret = { NULL, };
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c
index 26c03c6c3..3a0151374 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.c
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.c
@@ -107,7 +107,7 @@ static int
* Eval config and modify DeviceVelocityRec accordingly
*/
static void
-ProcessVelocityConfiguration(DeviceIntPtr pDev, char *devname, pointer list,
+ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list,
DeviceVelocityPtr s)
{
int tempi;
@@ -539,7 +539,7 @@ MatchAttrToken(const char *attr, struct xorg_list *patterns,
* match. Each list entry is a separate Match line of the same type.
*/
xorg_list_for_each_entry(group, patterns, entry) {
- char *const *cur;
+ const char *const *cur;
Bool match = FALSE;
for (cur = group->values; *cur; cur++)
@@ -598,7 +598,7 @@ InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev,
* See if any of the device's tags match any of the MatchTag tokens.
*/
if (!xorg_list_is_empty(&iclass->match_tag)) {
- char *const *tag;
+ const char *const *tag;
Bool match;
if (!attrs->tags)
@@ -661,7 +661,7 @@ MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs)
/* Collect class options and driver settings */
classopts = xf86optionListDup(cl->option_lst);
if (cl->driver) {
- free(idev->driver);
+ free((void *) idev->driver);
idev->driver = xstrdup(cl->driver);
if (!idev->driver) {
xf86Msg(X_ERROR, "Failed to allocate memory while merging "
@@ -773,8 +773,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags)
/* Else the entry wasn't in the xf86InputDevs list (ignore this). */
}
- free(pInp->driver);
- free(pInp->name);
+ free((void *) pInp->driver);
+ free((void *) pInp->name);
xf86optionListFree(pInp->options);
free(pInp);
}
@@ -1067,7 +1067,7 @@ xf86CheckMotionEvent4DGA(DeviceIntPtr device, int is_absolute,
#if XFreeXDGA
ScreenPtr scr = NULL;
- int idx, i;
+ int idx = 0, i;
/* The evdev driver may not always send all axes across. */
if (valuator_mask_isset(mask, 0) || valuator_mask_isset(mask, 1)) {
diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h
index 35c38a554..f94261a01 100644
--- a/xorg-server/hw/xfree86/common/xf86Xinput.h
+++ b/xorg-server/hw/xfree86/common/xf86Xinput.h
@@ -74,7 +74,7 @@ typedef struct _InputDriverRec {
struct _InputInfoRec * pInfo, int flags);
void (*UnInit) (struct _InputDriverRec * drv,
struct _InputInfoRec * pInfo, int flags);
- pointer module;
+ void *module;
const char **default_options;
} InputDriverRec, *InputDriverPtr;
@@ -82,8 +82,8 @@ typedef struct _InputDriverRec {
typedef struct _InputInfoRec {
struct _InputInfoRec *next;
- char *name;
- char *driver;
+ const char *name;
+ const char *driver;
int flags;
@@ -97,10 +97,10 @@ typedef struct _InputInfoRec {
int fd;
DeviceIntPtr dev;
- pointer private;
+ void *private;
const char *type_name;
InputDriverPtr drv;
- pointer module;
+ void *module;
XF86OptionPtr options;
InputAttributes *attrs;
} *InputInfoPtr;
@@ -178,7 +178,7 @@ int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
InputInfoPtr xf86AllocateInput(void);
/* xf86Helper.c */
-extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module,
+extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module,
int flags);
extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex);
extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name);
diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c
index 85f35f8db..3f9c88035 100644
--- a/xorg-server/hw/xfree86/common/xf86cmap.c
+++ b/xorg-server/hw/xfree86/common/xf86cmap.c
@@ -224,7 +224,7 @@ xf86HandleColormaps(ScreenPtr pScreen,
ComputeGamma(pScreenPriv);
/* get the default map */
- dixLookupResourceByType((pointer *) &pDefMap, pScreen->defColormap,
+ dixLookupResourceByType((void **) &pDefMap, pScreen->defColormap,
RT_COLORMAP, serverClient, DixInstallAccess);
if (!CMapAllocateColormapPrivate(pDefMap)) {
diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c
index 4da6af2b6..dafaad304 100644
--- a/xorg-server/hw/xfree86/common/xf86fbman.c
+++ b/xorg-server/hw/xfree86/common/xf86fbman.c
@@ -74,7 +74,7 @@ xf86FBManagerRunning(ScreenPtr pScreen)
Bool
xf86RegisterFreeBoxCallback(ScreenPtr pScreen,
FreeBoxCallbackProcPtr FreeBoxCallback,
- pointer devPriv)
+ void *devPriv)
{
FBManagerFuncsPtr funcs;
@@ -93,7 +93,7 @@ xf86AllocateOffscreenArea(ScreenPtr pScreen,
int w, int h,
int gran,
MoveAreaCallbackProcPtr moveCB,
- RemoveAreaCallbackProcPtr removeCB, pointer privData)
+ RemoveAreaCallbackProcPtr removeCB, void *privData)
{
FBManagerFuncsPtr funcs;
@@ -113,7 +113,7 @@ xf86AllocateOffscreenLinear(ScreenPtr pScreen,
int gran,
MoveLinearCallbackProcPtr moveCB,
RemoveLinearCallbackProcPtr removeCB,
- pointer privData)
+ void *privData)
{
FBManagerFuncsPtr funcs;
@@ -309,7 +309,7 @@ SendCallFreeBoxCallbacks(FBManagerPtr offman)
static Bool
localRegisterFreeBoxCallback(ScreenPtr pScreen,
FreeBoxCallbackProcPtr FreeBoxCallback,
- pointer devPriv)
+ void *devPriv)
{
FBManagerPtr offman;
FreeBoxCallbackProcPtr *newCallbacks;
@@ -346,7 +346,7 @@ AllocateArea(FBManagerPtr offman,
int w, int h,
int granularity,
MoveAreaCallbackProcPtr moveCB,
- RemoveAreaCallbackProcPtr removeCB, pointer privData)
+ RemoveAreaCallbackProcPtr removeCB, void *privData)
{
ScreenPtr pScreen = offman->pScreen;
FBLinkPtr link = NULL;
@@ -436,7 +436,7 @@ localAllocateOffscreenArea(ScreenPtr pScreen,
int w, int h,
int gran,
MoveAreaCallbackProcPtr moveCB,
- RemoveAreaCallbackProcPtr removeCB, pointer privData)
+ RemoveAreaCallbackProcPtr removeCB, void *privData)
{
FBManagerPtr offman;
FBAreaPtr area = NULL;
@@ -824,7 +824,7 @@ DumpDebug(FBLinearLinkPtr pLink)
}
static FBLinearPtr
-AllocateLinear(FBManagerPtr offman, int size, int granularity, pointer privData)
+AllocateLinear(FBManagerPtr offman, int size, int granularity, void *privData)
{
ScreenPtr pScreen = offman->pScreen;
FBLinearLinkPtr linear = NULL;
@@ -903,7 +903,7 @@ localAllocateOffscreenLinear(ScreenPtr pScreen,
int gran,
MoveLinearCallbackProcPtr moveCB,
RemoveLinearCallbackProcPtr removeCB,
- pointer privData)
+ void *privData)
{
FBManagerPtr offman;
FBLinearLinkPtr link;
@@ -1394,7 +1394,7 @@ xf86AllocateLinearOffscreenArea(ScreenPtr pScreen,
int gran,
MoveAreaCallbackProcPtr moveCB,
RemoveAreaCallbackProcPtr removeCB,
- pointer privData)
+ void *privData)
{
FBManagerFuncsPtr funcs;
FBManagerPtr offman;
diff --git a/xorg-server/hw/xfree86/common/xf86fbman.h b/xorg-server/hw/xfree86/common/xf86fbman.h
index 99bf9917b..092c2e2dd 100644
--- a/xorg-server/hw/xfree86/common/xf86fbman.h
+++ b/xorg-server/hw/xfree86/common/xf86fbman.h
@@ -60,7 +60,7 @@ typedef struct _FBLinear {
DevUnion devPrivate;
} FBLinear, *FBLinearPtr;
-typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, pointer);
+typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, void *);
typedef void (*MoveAreaCallbackProcPtr) (FBAreaPtr, FBAreaPtr);
typedef void (*RemoveAreaCallbackProcPtr) (FBAreaPtr);
@@ -73,7 +73,7 @@ typedef struct {
int granularity,
MoveAreaCallbackProcPtr moveCB,
RemoveAreaCallbackProcPtr removeCB,
- pointer privData);
+ void *privData);
void (*FreeOffscreenArea) (FBAreaPtr area);
Bool (*ResizeOffscreenArea) (FBAreaPtr area, int w, int h);
Bool (*QueryLargestOffscreenArea) (ScreenPtr pScreen,
@@ -82,14 +82,14 @@ typedef struct {
int preferences, int priority);
Bool (*RegisterFreeBoxCallback) (ScreenPtr pScreen,
FreeBoxCallbackProcPtr FreeBoxCallback,
- pointer devPriv);
+ void *devPriv);
/* linear functions */
FBLinearPtr(*AllocateOffscreenLinear) (ScreenPtr pScreen,
int size,
int granularity,
MoveLinearCallbackProcPtr moveCB,
RemoveLinearCallbackProcPtr
- removeCB, pointer privData);
+ removeCB, void *privData);
void (*FreeOffscreenLinear) (FBLinearPtr area);
Bool (*ResizeOffscreenLinear) (FBLinearPtr area, int size);
Bool (*QueryLargestOffscreenLinear) (ScreenPtr pScreen,
@@ -121,7 +121,7 @@ xf86AllocateOffscreenArea(ScreenPtr pScreen,
int w, int h,
int granularity,
MoveAreaCallbackProcPtr moveCB,
- RemoveAreaCallbackProcPtr removeCB, pointer privData);
+ RemoveAreaCallbackProcPtr removeCB, void *privData);
extern _X_EXPORT FBAreaPtr
xf86AllocateLinearOffscreenArea(ScreenPtr pScreen,
@@ -129,7 +129,7 @@ xf86AllocateLinearOffscreenArea(ScreenPtr pScreen,
int granularity,
MoveAreaCallbackProcPtr moveCB,
RemoveAreaCallbackProcPtr removeCB,
- pointer privData);
+ void *privData);
extern _X_EXPORT FBLinearPtr
xf86AllocateOffscreenLinear(ScreenPtr pScreen,
@@ -137,7 +137,7 @@ xf86AllocateOffscreenLinear(ScreenPtr pScreen,
int granularity,
MoveLinearCallbackProcPtr moveCB,
RemoveLinearCallbackProcPtr removeCB,
- pointer privData);
+ void *privData);
extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area);
extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area);
@@ -152,7 +152,7 @@ extern _X_EXPORT Bool
xf86RegisterFreeBoxCallback(ScreenPtr pScreen,
FreeBoxCallbackProcPtr FreeBoxCallback,
- pointer devPriv);
+ void *devPriv);
extern _X_EXPORT Bool
xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen);
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c
index 258988a84..0f76a03ee 100644
--- a/xorg-server/hw/xfree86/common/xf86pciBus.c
+++ b/xorg-server/hw/xfree86/common/xf86pciBus.c
@@ -575,7 +575,7 @@ xf86PciProbeDev(DriverPtr drvp)
}
void
-xf86PciIsolateDevice(char *argument)
+xf86PciIsolateDevice(const char *argument)
{
int bus, device, func;
@@ -1013,7 +1013,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
static void
xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip,
EntityProc init, EntityProc enter,
- EntityProc leave, pointer private)
+ EntityProc leave, void *private)
{
ScrnInfoPtr pScrn;
@@ -1027,7 +1027,7 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip,
ScrnInfoPtr
xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
PciChipsets * p_chip, void *dummy, EntityProc init,
- EntityProc enter, EntityProc leave, pointer private)
+ EntityProc enter, EntityProc leave, void *private)
{
EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
@@ -1068,7 +1068,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,
Bool
xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex,
PciChipsets * p_chip, void *dummy, EntityProc init,
- EntityProc enter, EntityProc leave, pointer private)
+ EntityProc enter, EntityProc leave, void *private)
{
EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex);
@@ -1484,6 +1484,7 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
GDevRec * GDev, int *chipset)
{
char busnum[8];
+ char *tmp;
pVideo = (struct pci_device *) busData;
@@ -1493,8 +1494,9 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
snprintf(busnum, sizeof(busnum), "%d@%d",
pVideo->bus & 0x00ff, pVideo->bus >> 8);
- XNFasprintf(&GDev->busID, "PCI:%s:%d:%d",
+ XNFasprintf(&tmp, "PCI:%s:%d:%d",
busnum, pVideo->dev, pVideo->func);
+ GDev->busID = tmp;
GDev->chipID = pVideo->device_id;
GDev->chipRev = pVideo->revision;
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h
index 4972c3688..b497a7f2d 100644
--- a/xorg-server/hw/xfree86/common/xf86pciBus.h
+++ b/xorg-server/hw/xfree86/common/xf86pciBus.h
@@ -36,7 +36,7 @@
void xf86PciProbe(void);
Bool xf86PciAddMatchingDev(DriverPtr drvp);
Bool xf86PciProbeDev(DriverPtr drvp);
-void xf86PciIsolateDevice(char *argument);
+void xf86PciIsolateDevice(const char *argument);
int xf86PciMatchDriver(char *matches[], int nmatches);
Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c
index 33b2b7dd8..5875a9136 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.c
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.c
@@ -400,7 +400,7 @@ xf86platformAddDevice(int index)
DriverPtr drvp = NULL;
int entity;
screenLayoutPtr layout;
- static char *hotplug_driver_name = "modesetting";
+ static const char *hotplug_driver_name = "modesetting";
/* force load the driver for now */
xf86LoadOneModule(hotplug_driver_name, NULL);
diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.h b/xorg-server/hw/xfree86/common/xf86sbusBus.h
index a4d9c6cde..9cfcbc574 100644
--- a/xorg-server/hw/xfree86/common/xf86sbusBus.h
+++ b/xorg-server/hw/xfree86/common/xf86sbusBus.h
@@ -52,16 +52,16 @@ typedef struct sbus_device {
int fd;
int width, height;
sbusPromNode node;
- char *descr;
- char *device;
+ const char *descr;
+ const char *device;
} sbusDevice, *sbusDevicePtr;
struct sbus_devtable {
int devId;
int fbType;
- char *promName;
- char *driverName;
- char *descr;
+ const char *promName;
+ const char *driverName;
+ const char *descr;
};
extern _X_EXPORT void xf86SbusProbe(void);
@@ -76,10 +76,10 @@ extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex);
extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp);
extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn,
sbusDevicePtr psdp);
-extern _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp,
+extern _X_EXPORT void *xf86MapSbusMem(sbusDevicePtr psdp,
unsigned long offset,
unsigned long size);
-extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr,
+extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, void *addr,
unsigned long size);
extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp);
extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg,
diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h
index 4c2d147a2..b164b7f21 100644
--- a/xorg-server/hw/xfree86/common/xf86str.h
+++ b/xorg-server/hw/xfree86/common/xf86str.h
@@ -145,7 +145,7 @@ typedef enum {
typedef struct _DisplayModeRec {
struct _DisplayModeRec *prev;
struct _DisplayModeRec *next;
- char *name; /* identifier for the mode */
+ const char *name; /* identifier for the mode */
ModeStatus status;
int type;
@@ -212,9 +212,9 @@ typedef struct {
#define GAMMA_ZERO (GAMMA_MIN / 100.0)
typedef struct {
- char *id;
- char *vendor;
- char *model;
+ const char *id;
+ const char *vendor;
+ const char *model;
int nHsync;
range hsync[MAX_HSYNC];
int nVrefresh;
@@ -224,8 +224,8 @@ typedef struct {
Gamma gamma; /* Gamma of the monitor */
int widthmm;
int heightmm;
- pointer options;
- pointer DDC;
+ void *options;
+ void *DDC;
Bool reducedblanking; /* Allow CVT reduced blanking modes? */
int maxPixClock; /* in kHz, like mode->Clock */
} MonRec, *MonPtr;
@@ -259,7 +259,7 @@ typedef enum {
GET_REQUIRED_HW_INTERFACES = 10
} xorgDriverFuncOp;
-typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, pointer);
+typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *);
/* RR_GET_INFO, RR_SET_CONFIG */
typedef struct {
@@ -299,11 +299,11 @@ struct _DriverRec;
typedef struct {
int driverVersion;
- char *driverName;
+ const char *driverName;
void (*Identify) (int flags);
Bool (*Probe) (struct _DriverRec * drv, int flags);
const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
- pointer module;
+ void *module;
int refCount;
} DriverRec1;
@@ -315,11 +315,11 @@ struct xf86_platform_device;
typedef struct _DriverRec {
int driverVersion;
- char *driverName;
+ const char *driverName;
void (*Identify) (int flags);
Bool (*Probe) (struct _DriverRec * drv, int flags);
const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype);
- pointer module;
+ void *module;
int refCount;
xorgDriverFuncProc *driverFunc;
@@ -386,19 +386,19 @@ typedef enum {
} DacSpeedIndex;
typedef struct {
- char *identifier;
- char *vendor;
- char *board;
- char *chipset;
- char *ramdac;
- char *driver;
+ const char *identifier;
+ const char *vendor;
+ const char *board;
+ const char *chipset;
+ const char *ramdac;
+ const char *driver;
struct _confscreenrec *myScreenSection;
Bool claimed;
int dacSpeeds[MAXDACSPEEDS];
int numclocks;
int clock[MAXCLOCKS];
- char *clockchip;
- char *busID;
+ const char *clockchip;
+ const char *busID;
Bool active;
Bool inUse;
int videoRam;
@@ -408,7 +408,7 @@ typedef struct {
unsigned long IOBase;
int chipID;
int chipRev;
- pointer options;
+ void *options;
int irq;
int screen; /* For multi-CRTC cards */
} GDevRec, *GDevPtr;
@@ -424,24 +424,24 @@ typedef struct {
rgb blackColour;
rgb whiteColour;
int defaultVisual;
- char **modes;
- pointer options;
+ const char **modes;
+ void *options;
} DispRec, *DispPtr;
typedef struct _confxvportrec {
- char *identifier;
- pointer options;
+ const char *identifier;
+ void *options;
} confXvPortRec, *confXvPortPtr;
typedef struct _confxvadaptrec {
- char *identifier;
+ const char *identifier;
int numports;
confXvPortPtr ports;
- pointer options;
+ void *options;
} confXvAdaptorRec, *confXvAdaptorPtr;
typedef struct _confscreenrec {
- char *id;
+ const char *id;
int screennum;
int defaultdepth;
int defaultbpp;
@@ -452,7 +452,7 @@ typedef struct _confscreenrec {
DispPtr displays;
int numxvadaptors;
confXvAdaptorPtr xvadaptors;
- pointer options;
+ void *options;
} confScreenRec, *confScreenPtr;
typedef enum {
@@ -467,29 +467,29 @@ typedef enum {
typedef struct _screenlayoutrec {
confScreenPtr screen;
- char *topname;
+ const char *topname;
confScreenPtr top;
- char *bottomname;
+ const char *bottomname;
confScreenPtr bottom;
- char *leftname;
+ const char *leftname;
confScreenPtr left;
- char *rightname;
+ const char *rightname;
confScreenPtr right;
PositionType where;
int x;
int y;
- char *refname;
+ const char *refname;
confScreenPtr refscreen;
} screenLayoutRec, *screenLayoutPtr;
typedef struct _InputInfoRec InputInfoRec;
typedef struct _serverlayoutrec {
- char *id;
+ const char *id;
screenLayoutPtr screens;
GDevPtr inactives;
InputInfoRec **inputs; /* NULL terminated */
- pointer options;
+ void *options;
} serverLayoutRec, *serverLayoutPtr;
typedef struct _confdribufferrec {
@@ -512,7 +512,7 @@ typedef struct _confdrirec {
#define NUM_RESERVED_POINTERS 14
#define NUM_RESERVED_FUNCS 10
-typedef pointer (*funcPointer) (void);
+typedef void *(*funcPointer) (void);
/* flags for depth 24 pixmap options */
typedef enum {
@@ -581,7 +581,7 @@ typedef struct _PciChipsets {
} PciChipsets;
/* Entity properties */
-typedef void (*EntityProc) (int entityIndex, pointer private);
+typedef void (*EntityProc) (int entityIndex, void *private);
typedef struct _entityInfo {
int index;
@@ -671,7 +671,7 @@ typedef void xf86ModeSetProc(ScrnInfoPtr);
typedef struct _ScrnInfoRec {
int driverVersion;
- char *driverName; /* canonical name used in */
+ const char *driverName; /* canonical name used in */
/* the config file */
ScreenPtr pScreen; /* Pointer to the ScreenRec */
int scrnIndex; /* Number of this screen */
@@ -730,20 +730,20 @@ typedef struct _ScrnInfoRec {
int heightmm;
int xDpi; /* width DPI */
int yDpi; /* height DPI */
- char *name; /* Name to prefix messages */
- pointer driverPrivate; /* Driver private area */
+ const char *name; /* Name to prefix messages */
+ void *driverPrivate; /* Driver private area */
DevUnion *privates; /* Other privates can hook in
* here */
DriverPtr drv; /* xf86DriverList[] entry */
- pointer module; /* Pointer to module head */
+ void *module; /* Pointer to module head */
int colorKey;
int overlayFlags;
/* Some of these may be moved out of here into the driver private area */
- char *chipset; /* chipset name */
- char *ramdac; /* ramdac name */
- char *clockchip; /* clock name */
+ const char *chipset; /* chipset name */
+ const char *ramdac; /* ramdac name */
+ const char *clockchip; /* clock name */
Bool progClock; /* clock is programmable */
int numClocks; /* number of clocks */
int clock[MAXCLOCKS]; /* list of clock frequencies */
@@ -754,7 +754,7 @@ typedef struct _ScrnInfoRec {
int memClk; /* memory clock */
int textClockFreq; /* clock of text mode */
Bool flipPixels; /* swap default black/white */
- pointer options;
+ void *options;
int chipID;
int chipRev;
@@ -779,7 +779,7 @@ typedef struct _ScrnInfoRec {
int *entityInstanceList;
struct pci_device *vgaDev;
- pointer reservedPtr[NUM_RESERVED_POINTERS];
+ void *reservedPtr[NUM_RESERVED_POINTERS];
/*
* Driver entry points.
@@ -864,7 +864,7 @@ typedef enum {
typedef void (*DPMSSetProcPtr) (ScrnInfoPtr, int, int);
/* Input handler proc */
-typedef void (*InputHandlerProc) (int fd, pointer data);
+typedef void (*InputHandlerProc) (int fd, void *data);
/* These are used by xf86GetClocks */
#define CLK_REG_SAVE -1
diff --git a/xorg-server/hw/xfree86/common/xf86vmode.c b/xorg-server/hw/xfree86/common/xf86vmode.c
index cad0e6a21..2b07833ad 100644
--- a/xorg-server/hw/xfree86/common/xf86vmode.c
+++ b/xorg-server/hw/xfree86/common/xf86vmode.c
@@ -216,7 +216,7 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask)
}
static int
-XF86VidModeFreeEvents(pointer value, XID id)
+XF86VidModeFreeEvents(void *value, XID id)
{
XF86VidModeEventPtr pOld = (XF86VidModeEventPtr) value;
ScreenPtr pScreen = pOld->screen;
@@ -314,7 +314,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client)
.type = X_Reply,
.sequenceNumber = client->sequence
};
- pointer mode;
+ void *mode;
int dotClock;
int ver;
@@ -413,7 +413,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client)
{
REQUEST(xXF86VidModeGetAllModeLinesReq);
xXF86VidModeGetAllModeLinesReply rep;
- pointer mode;
+ void *mode;
int modecount, dotClock;
int ver;
@@ -524,7 +524,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client)
xXF86OldVidModeAddModeLineReq *oldstuff =
(xXF86OldVidModeAddModeLineReq *) client->requestBuffer;
xXF86VidModeAddModeLineReq newstuff;
- pointer mode;
+ void *mode;
int len;
int dotClock;
int ver;
@@ -688,7 +688,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client)
xXF86OldVidModeDeleteModeLineReq *oldstuff =
(xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer;
xXF86VidModeDeleteModeLineReq newstuff;
- pointer mode;
+ void *mode;
int len, dotClock;
int ver;
@@ -813,7 +813,7 @@ ProcXF86VidModeModModeLine(ClientPtr client)
xXF86OldVidModeModModeLineReq *oldstuff =
(xXF86OldVidModeModModeLineReq *) client->requestBuffer;
xXF86VidModeModModeLineReq newstuff;
- pointer mode, modetmp;
+ void *mode, *modetmp;
int len, dotClock;
int ver;
@@ -942,7 +942,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client)
(xXF86OldVidModeValidateModeLineReq *) client->requestBuffer;
xXF86VidModeValidateModeLineReq newstuff;
xXF86VidModeValidateModeLineReply rep;
- pointer mode, modetmp = NULL;
+ void *mode, *modetmp = NULL;
int len, status, dotClock;
int ver;
@@ -1080,7 +1080,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client)
xXF86OldVidModeSwitchToModeReq *oldstuff =
(xXF86OldVidModeSwitchToModeReq *) client->requestBuffer;
xXF86VidModeSwitchToModeReq newstuff;
- pointer mode;
+ void *mode;
int len, dotClock;
int ver;
@@ -1205,7 +1205,7 @@ ProcXF86VidModeGetMonitor(ClientPtr client)
};
CARD32 *hsyncdata, *vsyncdata;
int i, nHsync, nVrefresh;
- pointer monitor;
+ void *monitor;
DEBUG_P("XF86VidModeGetMonitor");
diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c
index 92d0f6da2..b16cb5df3 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.c
+++ b/xorg-server/hw/xfree86/common/xf86xv.c
@@ -261,7 +261,7 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num)
sure that I appreciate that. */
ScreenPriv = malloc(sizeof(XF86XVScreenRec));
- pxvs->devPriv.ptr = (pointer) ScreenPriv;
+ pxvs->devPriv.ptr = (void *) ScreenPriv;
if (!ScreenPriv)
return FALSE;
@@ -551,7 +551,7 @@ xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * infoPtr, int number)
adaptorPriv->PutImage = adaptorPtr->PutImage;
adaptorPriv->ReputImage = adaptorPtr->ReputImage; /* image/still */
- pa->devPriv.ptr = (pointer) adaptorPriv;
+ pa->devPriv.ptr = (void *) adaptorPriv;
if (!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) {
xf86XVFreeAdaptor(pa);
@@ -957,7 +957,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv)
}
static int
-xf86XVReputAllVideo(WindowPtr pWin, pointer data)
+xf86XVReputAllVideo(WindowPtr pWin, void *data)
{
XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin);
@@ -1922,7 +1922,7 @@ xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr fillboxes)
}
void
-xf86XVFillKeyHelperPort(DrawablePtr pDraw, pointer data, CARD32 key,
+xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key,
RegionPtr clipboxes, Bool fillEverything)
{
WindowPtr pWin = (WindowPtr) pDraw;
diff --git a/xorg-server/hw/xfree86/common/xf86xv.h b/xorg-server/hw/xfree86/common/xf86xv.h
index 091efcaa9..8986e2e57 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.h
+++ b/xorg-server/hw/xfree86/common/xf86xv.h
@@ -84,47 +84,47 @@ typedef int (*PutVideoFuncPtr) (ScrnInfoPtr pScrn,
short vid_x, short vid_y, short drw_x,
short drw_y, short vid_w, short vid_h,
short drw_w, short drw_h, RegionPtr clipBoxes,
- pointer data, DrawablePtr pDraw);
+ void *data, DrawablePtr pDraw);
typedef int (*PutStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
short drw_x, short drw_y, short vid_w,
short vid_h, short drw_w, short drw_h,
- RegionPtr clipBoxes, pointer data,
+ RegionPtr clipBoxes, void *data,
DrawablePtr pDraw);
typedef int (*GetVideoFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
short drw_x, short drw_y, short vid_w,
short vid_h, short drw_w, short drw_h,
- RegionPtr clipBoxes, pointer data,
+ RegionPtr clipBoxes, void *data,
DrawablePtr pDraw);
typedef int (*GetStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y,
short drw_x, short drw_y, short vid_w,
short vid_h, short drw_w, short drw_h,
- RegionPtr clipBoxes, pointer data,
+ RegionPtr clipBoxes, void *data,
DrawablePtr pDraw);
-typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, pointer data, Bool Exit);
+typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, void *data, Bool Exit);
typedef int (*SetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute,
- INT32 value, pointer data);
+ INT32 value, void *data);
typedef int (*GetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute,
- INT32 *value, pointer data);
+ INT32 *value, void *data);
typedef void (*QueryBestSizeFuncPtr) (ScrnInfoPtr pScrn, Bool motion,
short vid_w, short vid_h, short drw_w,
short drw_h, unsigned int *p_w,
- unsigned int *p_h, pointer data);
+ unsigned int *p_h, void *data);
typedef int (*PutImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y,
short drw_x, short drw_y, short src_w,
short src_h, short drw_w, short drw_h,
int image, unsigned char *buf, short width,
short height, Bool Sync, RegionPtr clipBoxes,
- pointer data, DrawablePtr pDraw);
+ void *data, DrawablePtr pDraw);
typedef int (*ReputImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y,
short drw_x, short drw_y, short src_w,
short src_h, short drw_w, short drw_h,
- RegionPtr clipBoxes, pointer data,
+ RegionPtr clipBoxes, void *data,
DrawablePtr pDraw);
typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image,
unsigned short *width,
unsigned short *height,
int *pitches, int *offsets);
-typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, pointer data,
+typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, void *data,
WindowPtr window, int dx, int dy);
typedef enum {
@@ -137,7 +137,7 @@ typedef enum {
typedef struct {
int id;
- char *name;
+ const char *name;
unsigned short width, height;
XvRationalRec rate;
} XF86VideoEncodingRec, *XF86VideoEncodingPtr;
@@ -151,13 +151,13 @@ typedef struct {
int flags;
int min_value;
int max_value;
- char *name;
+ const char *name;
} XF86AttributeRec, *XF86AttributePtr;
typedef struct {
unsigned int type;
int flags;
- char *name;
+ const char *name;
int nEncodings;
XF86VideoEncodingPtr pEncodings;
int nFormats;
@@ -238,7 +238,7 @@ xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
extern _X_EXPORT void
-xf86XVFillKeyHelperPort(DrawablePtr pDraw, pointer data, CARD32 key,
+xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key,
RegionPtr clipboxes, Bool fillEverything);
extern _X_EXPORT Bool
diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.h b/xorg-server/hw/xfree86/common/xf86xvmc.h
index 2478fe344..aaa4e65f0 100644
--- a/xorg-server/hw/xfree86/common/xf86xvmc.h
+++ b/xorg-server/hw/xfree86/common/xf86xvmc.h
@@ -109,7 +109,7 @@ typedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn,
XvMCSubpicturePtr subpicture);
typedef struct {
- char *name;
+ const char *name;
int num_surfaces;
XF86MCSurfaceInfoPtr *surfaces;
int num_subpictures;