Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> --- SCCDFile.h | 2 +- loadData.c | 15 ++++++++------- xcmsdb.c | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/SCCDFile.h b/SCCDFile.h index a9a7722..41a51bf 100644 --- a/SCCDFile.h +++ b/SCCDFile.h @@ -139,7 +139,7 @@ typedef struct _XDCCC_Correction { struct _XDCCC_Correction* next; } XDCCC_Correction; -extern int LoadSCCData(Display *pDpy, int screenNumber, char *filename, +extern int LoadSCCData(Display *pDpy, int screenNumber, const char *filename, int targetFormat); #endif /* SCCDFILE_H */ diff --git a/loadData.c b/loadData.c index a0a2a58..170d9e0 100644 --- a/loadData.c +++ b/loadData.c @@ -62,7 +62,7 @@ */ typedef struct _DefineEntry { - char *pString; + const char *pString; int define; } DefineEntry; @@ -151,7 +151,7 @@ static DefineEntry VisualClassTbl[] = { static int StrToDefine(DefineEntry pde[], /* IN: table of X string-define pairs */ /* last entry must contain pair "", 0 */ - char *pstring) /* IN: string to be looked up in that table */ + const char *pstring) /* IN: string to be looked up in that table */ /* * DESCRIPTION * Converts a string to an integer define. @@ -184,7 +184,7 @@ StrToDefine(DefineEntry pde[], /* IN: table of X string-define pairs */ * * SYNOPSIS */ -static char * +static const char * DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */ /* last entry must contain pair "", 0 */ int id) /* IN: id to be looked up in that table */ @@ -221,7 +221,7 @@ DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */ * SYNOPSIS */ static int -SCKeyOf(char *string) +SCKeyOf(const char *string) /* * DESCRIPTION * Converts a string to an integer define. @@ -250,7 +250,7 @@ SCKeyOf(char *string) * SYNOPSIS */ static int -SCScrnClassOf(char *string) +SCScrnClassOf(const char *string) /* * DESCRIPTION * Converts a string to an integer define. @@ -278,7 +278,7 @@ SCScrnClassOf(char *string) * * SYNOPSIS */ -static char * +static const char * SCScrnClassStringOf(int id) /* * DESCRIPTION @@ -1417,7 +1417,8 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf) * SYNOPSIS */ int -LoadSCCData(Display *pDpy, int screenNumber, char *filename, int targetFormat) +LoadSCCData(Display *pDpy, int screenNumber, const char *filename, + int targetFormat) /* * DESCRIPTION diff --git a/xcmsdb.c b/xcmsdb.c index 973c6ab..b1ec2ce 100644 --- a/xcmsdb.c +++ b/xcmsdb.c @@ -87,7 +87,7 @@ MissingArg (const char *option) } static Bool -optionmatch(char *opt, char *arg, int minlen) +optionmatch(const char *opt, const char *arg, int minlen) { int arglen; @@ -207,7 +207,7 @@ main(int argc, char *argv[]) static Atom -ParseAtom(Display *dpy, char *name, int only_flag) +ParseAtom(Display *dpy, const char *name, int only_flag) { return(XInternAtom(dpy, name, only_flag)); } @@ -348,7 +348,7 @@ QuerySCCDataRGB(Display *dpy, Window root) VisualID visualID; XVisualInfo vinfo_template, *vinfo_ret; int nvis; - static char *visual_strings[] = { + static const char *visual_strings[] = { "StaticGray", "GrayScale", "StaticColor", -- 1.7.9.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel