summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-04-06 11:59:31 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-04-06 11:59:31 +0200
commit1c75a9479011e5f1ad01c950628d0ef5a302d8b6 (patch)
tree7be4720569998def4aeef228e63693db0788e3ea /src
parent680dd50193b5b3fcabdd3f1fcbd6a889d5a95c54 (diff)
Bug #10475: Fixed lots of char*/const char* mixups.
I didn't fix all of them, as that would require touching public headers.
Diffstat (limited to 'src')
-rw-r--r--src/CrGlCur.c4
-rw-r--r--src/Font.c2
-rw-r--r--src/GetDflt.c4
-rw-r--r--src/ParseCmd.c2
-rw-r--r--src/StrKeysym.c2
-rw-r--r--src/XlibInt.c2
-rw-r--r--src/imConv.c4
-rw-r--r--src/xcms/cmsColNm.c2
-rw-r--r--src/xkb/XKBCvt.c2
-rw-r--r--src/xkb/XKBlibint.h4
-rw-r--r--src/xlibi18n/XimTrInt.h2
-rw-r--r--src/xlibi18n/Ximint.h2
-rw-r--r--src/xlibi18n/Xlcint.h4
13 files changed, 18 insertions, 18 deletions
diff --git a/src/CrGlCur.c b/src/CrGlCur.c
index 32dee8c0..423de750 100644
--- a/src/CrGlCur.c
+++ b/src/CrGlCur.c
@@ -82,10 +82,10 @@ open_library (void)
}
static void *
-fetch_symbol (XModuleType module, char *under_symbol)
+fetch_symbol (XModuleType module, const char *under_symbol)
{
void *result = NULL;
- char *symbol = under_symbol + 1;
+ const char *symbol = under_symbol + 1;
#if defined(hpux)
int getsyms_cnt, i;
struct shl_symbol *symbols;
diff --git a/src/Font.c b/src/Font.c
index 5dc57737..9e5d0a6e 100644
--- a/src/Font.c
+++ b/src/Font.c
@@ -678,7 +678,7 @@ int _XF86LoadQueryLocaleFont(
Font *fidp)
{
int l;
- char *charset, *p;
+ const char *charset, *p;
char buf[256];
XFontStruct *fs;
XLCd lcd;
diff --git a/src/GetDflt.c b/src/GetDflt.c
index 8a856337..2098e813 100644
--- a/src/GetDflt.c
+++ b/src/GetDflt.c
@@ -164,7 +164,7 @@ InitDefaults(
*/
if (dpy->xdefaults == NULL) {
- char *slashDotXdefaults = "/.Xdefaults";
+ const char *slashDotXdefaults = "/.Xdefaults";
(void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1);
(void) strcat (fname, slashDotXdefaults);
@@ -174,7 +174,7 @@ InitDefaults(
}
if (!(xenv = getenv ("XENVIRONMENT"))) {
- char *slashDotXdefaultsDash = "/.Xdefaults-";
+ const char *slashDotXdefaultsDash = "/.Xdefaults-";
int len;
(void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1);
diff --git a/src/ParseCmd.c b/src/ParseCmd.c
index ddcbf784..fb79668e 100644
--- a/src/ParseCmd.c
+++ b/src/ParseCmd.c
@@ -65,7 +65,7 @@ SOFTWARE.
#include <stdio.h>
-static void _XReportParseError(XrmOptionDescRec *arg, char *msg)
+static void _XReportParseError(XrmOptionDescRec *arg, const char *msg)
{
(void) fprintf(stderr, "Error parsing argument \"%s\" (%s); %s\n",
arg->option, arg->specifier, msg);
diff --git a/src/StrKeysym.c b/src/StrKeysym.c
index 74ccecbc..a6d7b2d9 100644
--- a/src/StrKeysym.c
+++ b/src/StrKeysym.c
@@ -55,7 +55,7 @@ _XInitKeysymDB(void)
{
if (!initialized)
{
- char *dbname;
+ const char *dbname;
XrmInitialize();
/* use and name of this env var is not part of the standard */
diff --git a/src/XlibInt.c b/src/XlibInt.c
index a6166f22..1d025c7b 100644
--- a/src/XlibInt.c
+++ b/src/XlibInt.c
@@ -2742,7 +2742,7 @@ static int _XPrintDefaultError(
char buffer[BUFSIZ];
char mesg[BUFSIZ];
char number[32];
- char *mtype = "XlibMessage";
+ const char *mtype = "XlibMessage";
register _XExtension *ext = (_XExtension *)NULL;
_XExtension *bext = (_XExtension *)NULL;
XGetErrorText(dpy, event->error_code, buffer, BUFSIZ);
diff --git a/src/imConv.c b/src/imConv.c
index f519401e..06042b94 100644
--- a/src/imConv.c
+++ b/src/imConv.c
@@ -67,8 +67,8 @@ typedef int (*ucstocsConvProc)(
);
struct SubstRec {
- char* encoding_name;
- char* charset_name;
+ const char* encoding_name;
+ const char* charset_name;
};
static struct SubstRec SubstTable[] = {
diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c
index 87f26527..c48b85ab 100644
--- a/src/xcms/cmsColNm.c
+++ b/src/xcms/cmsColNm.c
@@ -709,7 +709,7 @@ LoadColornameDB(void)
{
int size;
FILE *stream;
- char *pathname;
+ const char *pathname;
struct stat txt;
int length;
diff --git a/src/xkb/XKBCvt.c b/src/xkb/XKBCvt.c
index 1bdf81cd..9ac438e5 100644
--- a/src/xkb/XKBCvt.c
+++ b/src/xkb/XKBCvt.c
@@ -189,7 +189,7 @@ Strcmp(char *str1, char *str2)
#endif
int
-_XkbGetConverters(char *encoding_name, XkbConverters *cvt_rtrn)
+_XkbGetConverters(const char *encoding_name, XkbConverters *cvt_rtrn)
{
if ( !cvt_rtrn ) return 0;
diff --git a/src/xkb/XKBlibint.h b/src/xkb/XKBlibint.h
index a154d1bc..ededdaa7 100644
--- a/src/xkb/XKBlibint.h
+++ b/src/xkb/XKBlibint.h
@@ -297,8 +297,8 @@ extern char *_XkbGetCharset(
);
extern int _XkbGetConverters(
- char * /* encoding_name */,
- XkbConverters * /* cvt_rtrn */
+ const char * /* encoding_name */,
+ XkbConverters * /* cvt_rtrn */
);
#ifdef NEED_MAP_READERS
diff --git a/src/xlibi18n/XimTrInt.h b/src/xlibi18n/XimTrInt.h
index cc1cabfa..cab201df 100644
--- a/src/xlibi18n/XimTrInt.h
+++ b/src/xlibi18n/XimTrInt.h
@@ -36,7 +36,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include "Ximint.h"
typedef struct {
- char *transportname;
+ const char *transportname;
Bool (*config)(
Xim,
char *
diff --git a/src/xlibi18n/Ximint.h b/src/xlibi18n/Ximint.h
index 4aca3c81..3cbcfc4b 100644
--- a/src/xlibi18n/Ximint.h
+++ b/src/xlibi18n/Ximint.h
@@ -229,7 +229,7 @@ extern Bool _XimCheckCreateICValues(
extern XIMResourceList _XimGetResourceListRec(
XIMResourceList res_list,
unsigned int list_num,
- char *name
+ const char *name
);
extern void _XimSetIMMode(
diff --git a/src/xlibi18n/Xlcint.h b/src/xlibi18n/Xlcint.h
index fcc3a65f..53704c54 100644
--- a/src/xlibi18n/Xlcint.h
+++ b/src/xlibi18n/Xlcint.h
@@ -112,7 +112,7 @@ typedef struct {
* and Input Context
*/
typedef struct {
- char *resource_name; /* Resource string */
+ const char *resource_name; /* Resource string */
XrmQuark xrm_name; /* Resource name quark */
int resource_size; /* Size in bytes of data */
long resource_offset; /* Offset from base */
@@ -354,7 +354,7 @@ typedef struct {
} XlcArg, *XlcArgList;
typedef struct _XlcResource {
- char *name;
+ const char *name;
XrmQuark xrm_name;
int size;
int offset;