added missing const for char* arguments

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2001-11-26 07:33:30 +00:00
parent 9832ce0bcc
commit bbd08c6a95
3 changed files with 11 additions and 10 deletions

View File

@@ -218,7 +218,8 @@ TexMacroDef *VerbatimMacroDef = NULL;
#define IncrementLineNumber() LineNumbers[CurrentInputIndex] ++ #define IncrementLineNumber() LineNumbers[CurrentInputIndex] ++
TexRef::TexRef(char *label, char *file, char *section, char *sectionN) TexRef::TexRef(const char *label, const char *file,
const char *section, const char *sectionN)
{ {
refLabel = copystring(label); refLabel = copystring(label);
refFile = file ? copystring(file) : (char*) NULL; refFile = file ? copystring(file) : (char*) NULL;
@@ -1551,7 +1552,7 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e
* *
*/ */
int ParseMacroBody(char *macro_name, TexChunk *parent, int ParseMacroBody(const char *macro_name, TexChunk *parent,
int no_args, char *buffer, int pos, int no_args, char *buffer, int pos,
char *environment, bool parseToBrace, char *environment, bool parseToBrace,
TexChunk *customMacroArgs) TexChunk *customMacroArgs)

View File

@@ -147,7 +147,7 @@ bool read_a_line(char *buf);
bool TexLoadFile(char *filename); bool TexLoadFile(char *filename);
int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL); char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
int ParseMacroBody(char *macro_name, TexChunk *parent, int no_args, int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args,
char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL); char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
void TraverseDocument(void); void TraverseDocument(void);
void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE); void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
@@ -367,7 +367,7 @@ void Tex2RTFYield(bool force = FALSE);
// make up a topic name otherwise. // make up a topic name otherwise.
char *FindTopicName(TexChunk *chunk); char *FindTopicName(TexChunk *chunk);
// Force the current topic to be this (e.g. force 'references' label). // Force the current topic to be this (e.g. force 'references' label).
void ForceTopicName(char *name); void ForceTopicName(const char *name);
void ResetTopicCounter(void); void ResetTopicCounter(void);
// Parse unit eg. 14, 12pt, 34cm and return value in points. // Parse unit eg. 14, 12pt, 34cm and return value in points.
@@ -396,7 +396,7 @@ class TexRef: public wxObject
char *refFile; // Reference filename (can be NULL) char *refFile; // Reference filename (can be NULL)
char *sectionNumber; // Section or figure number (as a string) char *sectionNumber; // Section or figure number (as a string)
char *sectionName; // name e.g. 'section' char *sectionName; // name e.g. 'section'
TexRef(char *label, char *file, char *section, char *sectionN = NULL); TexRef(const char *label, const char *file, const char *section, const char *sectionN = NULL);
~TexRef(void); ~TexRef(void);
}; };
@@ -530,12 +530,12 @@ class ColourTableEntry: public wxObject
unsigned int green; unsigned int green;
unsigned int blue; unsigned int blue;
ColourTableEntry(char *theName, unsigned int r, unsigned int g, unsigned int b); ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b);
~ColourTableEntry(void); ~ColourTableEntry(void);
}; };
extern wxList ColourTable; extern wxList ColourTable;
extern void AddColour(char *theName, unsigned int r, unsigned int g, unsigned int b); extern void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b);
extern int FindColourPosition(char *theName); extern int FindColourPosition(char *theName);
// Converts e.g. "red" -> "#FF0000" // Converts e.g. "red" -> "#FF0000"
extern bool FindColourHTMLString(char *theName, char *buf); extern bool FindColourHTMLString(char *theName, char *buf);

View File

@@ -150,7 +150,7 @@ void ResetTopicCounter(void)
static char *forceTopicName = NULL; static char *forceTopicName = NULL;
void ForceTopicName(char *name) void ForceTopicName(const char *name)
{ {
if (forceTopicName) if (forceTopicName)
delete[] forceTopicName; delete[] forceTopicName;
@@ -1463,7 +1463,7 @@ char *ParseMultifieldString(char *allFields, int *pos)
* *
*/ */
ColourTableEntry::ColourTableEntry(char *theName, unsigned int r, unsigned int g, unsigned int b) ColourTableEntry::ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b)
{ {
name = copystring(theName); name = copystring(theName);
red = r; red = r;
@@ -1476,7 +1476,7 @@ ColourTableEntry::~ColourTableEntry(void)
delete[] name; delete[] name;
} }
void AddColour(char *theName, unsigned int r, unsigned int g, unsigned int b) void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b)
{ {
wxNode *node = ColourTable.Find(theName); wxNode *node = ColourTable.Find(theName);
if (node) if (node)