Commit e84f07de authored by Rémi Assailly's avatar Rémi Assailly Committed by Alexandre Julliard

char -> const char fixes.

parent fc0061f8
...@@ -778,7 +778,7 @@ int oldBumpLine; ...@@ -778,7 +778,7 @@ int oldBumpLine;
* part of the token text. * part of the token text.
*/ */
void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, char *text) void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, const char *text)
{ {
TRACE("\n"); TRACE("\n");
...@@ -942,7 +942,7 @@ int RTFReadCharSetMap(RTF_Info *info, int csId) ...@@ -942,7 +942,7 @@ int RTFReadCharSetMap(RTF_Info *info, int csId)
* Return -1 if name is unknown. * Return -1 if name is unknown.
*/ */
int RTFStdCharCode(RTF_Info *info, char *name) int RTFStdCharCode(RTF_Info *info, const char *name)
{ {
int i; int i;
...@@ -962,7 +962,7 @@ int i; ...@@ -962,7 +962,7 @@ int i;
* Return NULL if code is unknown. * Return NULL if code is unknown.
*/ */
char *RTFStdCharName(RTF_Info *info, int code) const char *RTFStdCharName(RTF_Info *info, int code)
{ {
if (code < 0 || code >= rtfSC_MaxChar) if (code < 0 || code >= rtfSC_MaxChar)
return ((char *) NULL); return ((char *) NULL);
...@@ -1065,10 +1065,10 @@ int RTFGetCharSet(RTF_Info *info) ...@@ -1065,10 +1065,10 @@ int RTFGetCharSet(RTF_Info *info)
static void ReadFontTbl(RTF_Info *info) static void ReadFontTbl(RTF_Info *info)
{ {
RTFFont *fp = NULL; RTFFont *fp = NULL;
char buf[rtfBufSiz], *bp; char buf[rtfBufSiz], *bp;
int old = -1; int old = -1;
char *fn = "ReadFontTbl"; const char *fn = "ReadFontTbl";
TRACE("\n"); TRACE("\n");
...@@ -1219,7 +1219,7 @@ static void ReadColorTbl(RTF_Info *info) ...@@ -1219,7 +1219,7 @@ static void ReadColorTbl(RTF_Info *info)
{ {
RTFColor *cp; RTFColor *cp;
int cnum = 0; int cnum = 0;
char *fn = "ReadColorTbl"; const char *fn = "ReadColorTbl";
TRACE("\n"); TRACE("\n");
...@@ -1261,7 +1261,7 @@ static void ReadStyleSheet(RTF_Info *info) ...@@ -1261,7 +1261,7 @@ static void ReadStyleSheet(RTF_Info *info)
RTFStyle *sp; RTFStyle *sp;
RTFStyleElt *sep, *sepLast; RTFStyleElt *sep, *sepLast;
char buf[rtfBufSiz], *bp; char buf[rtfBufSiz], *bp;
char *fn = "ReadStyleSheet"; const char *fn = "ReadStyleSheet";
TRACE("\n"); TRACE("\n");
...@@ -1544,10 +1544,10 @@ typedef struct RTFKey RTFKey; ...@@ -1544,10 +1544,10 @@ typedef struct RTFKey RTFKey;
struct RTFKey struct RTFKey
{ {
int rtfKMajor; /* major number */ int rtfKMajor; /* major number */
int rtfKMinor; /* minor number */ int rtfKMinor; /* minor number */
char *rtfKStr; /* symbol name */ const char *rtfKStr; /* symbol name */
int rtfKHash; /* symbol name hash value */ int rtfKHash; /* symbol name hash value */
}; };
/* /*
...@@ -2459,7 +2459,7 @@ RTFKey *rp; ...@@ -2459,7 +2459,7 @@ RTFKey *rp;
if (inited == 0) if (inited == 0)
{ {
for (rp = rtfKey; rp->rtfKStr != (char *) NULL; rp++) for (rp = rtfKey; rp->rtfKStr != (char *) NULL; rp++)
rp->rtfKHash = Hash (rp->rtfKStr); rp->rtfKHash = Hash ((char*)rp->rtfKStr);
++inited; ++inited;
} }
} }
...@@ -2621,7 +2621,6 @@ int RTFReadOutputMap(RTF_Info *info, char *outMap[], int reinit) ...@@ -2621,7 +2621,6 @@ int RTFReadOutputMap(RTF_Info *info, char *outMap[], int reinit)
{ {
unsigned int i; unsigned int i;
int stdCode; int stdCode;
char *name, *seq;
if (reinit) if (reinit)
{ {
...@@ -2633,10 +2632,10 @@ int RTFReadOutputMap(RTF_Info *info, char *outMap[], int reinit) ...@@ -2633,10 +2632,10 @@ int RTFReadOutputMap(RTF_Info *info, char *outMap[], int reinit)
for (i=0 ;i< sizeof(text_map)/sizeof(char*); i+=2) for (i=0 ;i< sizeof(text_map)/sizeof(char*); i+=2)
{ {
name = text_map[i]; const char *name = text_map[i];
seq = text_map[i+1]; const char *seq = text_map[i+1];
stdCode = RTFStdCharCode( info, name ); stdCode = RTFStdCharCode( info, name );
outMap[stdCode] = seq; outMap[stdCode] = (char*)seq;
} }
return (1); return (1);
...@@ -2676,7 +2675,7 @@ FILE *RTFOpenLibFile (RTF_Info *info, char *file, char *mode) ...@@ -2676,7 +2675,7 @@ FILE *RTFOpenLibFile (RTF_Info *info, char *file, char *mode)
*/ */
void RTFMsg (RTF_Info *info, char *fmt, ...) void RTFMsg (RTF_Info *info, const char *fmt, ...)
{ {
char buf[rtfBufSiz]; char buf[rtfBufSiz];
...@@ -2706,7 +2705,7 @@ static void DefaultPanicProc(RTF_Info *info, char *s) ...@@ -2706,7 +2705,7 @@ static void DefaultPanicProc(RTF_Info *info, char *s)
void RTFPanic(RTF_Info *info, char *fmt, ...) void RTFPanic(RTF_Info *info, const char *fmt, ...)
{ {
char buf[rtfBufSiz]; char buf[rtfBufSiz];
......
...@@ -1518,7 +1518,7 @@ void RTFRead (RTF_Info *); ...@@ -1518,7 +1518,7 @@ void RTFRead (RTF_Info *);
int RTFGetToken (RTF_Info *); /* writer should rarely need this */ int RTFGetToken (RTF_Info *); /* writer should rarely need this */
void RTFUngetToken (RTF_Info *); void RTFUngetToken (RTF_Info *);
int RTFPeekToken (RTF_Info *); int RTFPeekToken (RTF_Info *);
void RTFSetToken (RTF_Info *, int, int, int, int, char *); void RTFSetToken (RTF_Info *, int, int, int, int, const char *);
void RTFSetReadHook (RTF_Info *, RTFFuncPtr); void RTFSetReadHook (RTF_Info *, RTFFuncPtr);
RTFFuncPtr RTFGetReadHook (RTF_Info *); RTFFuncPtr RTFGetReadHook (RTF_Info *);
void RTFRouteToken (RTF_Info *); void RTFRouteToken (RTF_Info *);
...@@ -1546,14 +1546,14 @@ void RTFSetPanicProc ( RTF_Info *, RTFFuncPtr); ...@@ -1546,14 +1546,14 @@ void RTFSetPanicProc ( RTF_Info *, RTFFuncPtr);
* stdarg.h. * stdarg.h.
*/ */
void RTFMsg (RTF_Info *, char *fmt, ...); void RTFMsg (RTF_Info *, const char *fmt, ...);
void RTFPanic (RTF_Info *, char *fmt, ...); void RTFPanic (RTF_Info *, const char *fmt, ...);
int RTFReadOutputMap ( RTF_Info *, char *[], int); int RTFReadOutputMap ( RTF_Info *, char *[], int);
int RTFReadCharSetMap ( RTF_Info *, int); int RTFReadCharSetMap ( RTF_Info *, int);
void RTFSetCharSetMap ( RTF_Info *, char *, int); void RTFSetCharSetMap ( RTF_Info *, char *, int);
int RTFStdCharCode ( RTF_Info *, char *); int RTFStdCharCode ( RTF_Info *, const char *);
char *RTFStdCharName ( RTF_Info *, int); const char *RTFStdCharName ( RTF_Info *, int);
int RTFMapChar ( RTF_Info *, int); int RTFMapChar ( RTF_Info *, int);
int RTFGetCharSet( RTF_Info * ); int RTFGetCharSet( RTF_Info * );
void RTFSetCharSet( RTF_Info *, int); void RTFSetCharSet( RTF_Info *, int);
......
static char *stdCharName[] = const char *stdCharName[] =
{ {
"nothing", "nothing",
"space", "space",
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* characters in ASCII range (32-127 * characters in ASCII range (32-127
*/ */
char *text_map[] = { const char *text_map[] = {
"space" ," ", "space" ," ",
"exclam" ,"!", "exclam" ,"!",
"quotedbl" ,"\"", "quotedbl" ,"\"",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment