Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
da68f394
Commit
da68f394
authored
Aug 14, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Aug 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Constify some variables.
parent
80a1a2f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
reader.c
dlls/riched20/reader.c
+15
-15
rtf.h
dlls/riched20/rtf.h
+13
-13
No files found.
dlls/riched20/reader.c
View file @
da68f394
...
...
@@ -92,7 +92,7 @@ static void RTFPutCodePageChar(RTF_Info *info, int c);
/*
* Saves a string on the heap and returns a pointer to it.
*/
static
inline
char
*
RTFStrSave
(
char
*
s
)
static
inline
char
*
RTFStrSave
(
c
onst
c
har
*
s
)
{
char
*
p
;
...
...
@@ -254,7 +254,7 @@ void RTFInit(RTF_Info *info)
* to be accurate, only insofar as the calling program makes them so.
*/
void
RTFSetInputName
(
RTF_Info
*
info
,
char
*
name
)
void
RTFSetInputName
(
RTF_Info
*
info
,
c
onst
c
har
*
name
)
{
info
->
inputName
=
RTFStrSave
(
name
);
if
(
info
->
inputName
==
NULL
)
...
...
@@ -262,13 +262,13 @@ void RTFSetInputName(RTF_Info *info, char *name)
}
char
*
RTFGetInputName
(
RTF_Info
*
info
)
char
*
RTFGetInputName
(
const
RTF_Info
*
info
)
{
return
(
info
->
inputName
);
}
void
RTFSetOutputName
(
RTF_Info
*
info
,
char
*
name
)
void
RTFSetOutputName
(
RTF_Info
*
info
,
c
onst
c
har
*
name
)
{
info
->
outputName
=
RTFStrSave
(
name
);
if
(
info
->
outputName
==
NULL
)
...
...
@@ -276,7 +276,7 @@ void RTFSetOutputName(RTF_Info *info, char *name)
}
char
*
RTFGetOutputName
(
RTF_Info
*
info
)
char
*
RTFGetOutputName
(
const
RTF_Info
*
info
)
{
return
(
info
->
outputName
);
}
...
...
@@ -301,7 +301,7 @@ void RTFSetClassCallback(RTF_Info *info, int class, RTFFuncPtr callback)
}
RTFFuncPtr
RTFGetClassCallback
(
RTF_Info
*
info
,
int
class
)
RTFFuncPtr
RTFGetClassCallback
(
const
RTF_Info
*
info
,
int
class
)
{
if
(
class
>=
0
&&
class
<
rtfMaxClass
)
return
info
->
ccb
[
class
];
...
...
@@ -320,7 +320,7 @@ void RTFSetDestinationCallback(RTF_Info *info, int dest, RTFFuncPtr callback)
}
RTFFuncPtr
RTFGetDestinationCallback
(
RTF_Info
*
info
,
int
dest
)
RTFFuncPtr
RTFGetDestinationCallback
(
const
RTF_Info
*
info
,
int
dest
)
{
if
(
dest
>=
0
&&
dest
<
rtfMaxDestination
)
return
info
->
dcb
[
dest
];
...
...
@@ -447,7 +447,7 @@ void RTFSetReadHook(RTF_Info *info, RTFFuncPtr f)
}
RTFFuncPtr
RTFGetReadHook
(
RTF_Info
*
info
)
RTFFuncPtr
RTFGetReadHook
(
const
RTF_Info
*
info
)
{
return
(
info
->
readHook
);
}
...
...
@@ -1258,7 +1258,7 @@ static void ReadObjGroup(RTF_Info *info)
*/
RTFStyle
*
RTFGetStyle
(
RTF_Info
*
info
,
int
num
)
RTFStyle
*
RTFGetStyle
(
const
RTF_Info
*
info
,
int
num
)
{
RTFStyle
*
s
;
...
...
@@ -1273,7 +1273,7 @@ RTFStyle *RTFGetStyle(RTF_Info *info, int num)
}
RTFFont
*
RTFGetFont
(
RTF_Info
*
info
,
int
num
)
RTFFont
*
RTFGetFont
(
const
RTF_Info
*
info
,
int
num
)
{
RTFFont
*
f
;
...
...
@@ -1288,7 +1288,7 @@ RTFFont *RTFGetFont(RTF_Info *info, int num)
}
RTFColor
*
RTFGetColor
(
RTF_Info
*
info
,
int
num
)
RTFColor
*
RTFGetColor
(
const
RTF_Info
*
info
,
int
num
)
{
RTFColor
*
c
;
...
...
@@ -2373,19 +2373,19 @@ static int Hash(const char *s)
* Token comparison routines
*/
int
RTFCheckCM
(
RTF_Info
*
info
,
int
class
,
int
major
)
int
RTFCheckCM
(
const
RTF_Info
*
info
,
int
class
,
int
major
)
{
return
(
info
->
rtfClass
==
class
&&
info
->
rtfMajor
==
major
);
}
int
RTFCheckCMM
(
RTF_Info
*
info
,
int
class
,
int
major
,
int
minor
)
int
RTFCheckCMM
(
const
RTF_Info
*
info
,
int
class
,
int
major
,
int
minor
)
{
return
(
info
->
rtfClass
==
class
&&
info
->
rtfMajor
==
major
&&
info
->
rtfMinor
==
minor
);
}
int
RTFCheckMM
(
RTF_Info
*
info
,
int
major
,
int
minor
)
int
RTFCheckMM
(
const
RTF_Info
*
info
,
int
major
,
int
minor
)
{
return
(
info
->
rtfMajor
==
major
&&
info
->
rtfMinor
==
minor
);
}
...
...
@@ -2661,7 +2661,7 @@ RTFFlushUnicodeOutputBuffer(RTF_Info *info)
}
static
void
RTFPutUnicodeString
(
RTF_Info
*
info
,
WCHAR
*
string
,
int
length
)
RTFPutUnicodeString
(
RTF_Info
*
info
,
const
WCHAR
*
string
,
int
length
)
{
if
(
info
->
dwCPOutputCount
)
RTFFlushCPOutputBuffer
(
info
);
...
...
dlls/riched20/rtf.h
View file @
da68f394
...
...
@@ -1112,30 +1112,30 @@ struct _RTF_Info {
void
RTFInit
(
RTF_Info
*
);
void
RTFDestroy
(
RTF_Info
*
info
);
void
RTFSetInputName
(
RTF_Info
*
,
char
*
);
char
*
RTFGetInputName
(
RTF_Info
*
);
void
RTFSetOutputName
(
RTF_Info
*
,
char
*
);
char
*
RTFGetOutputName
(
RTF_Info
*
);
void
RTFSetInputName
(
RTF_Info
*
,
c
onst
c
har
*
);
char
*
RTFGetInputName
(
const
RTF_Info
*
);
void
RTFSetOutputName
(
RTF_Info
*
,
c
onst
c
har
*
);
char
*
RTFGetOutputName
(
const
RTF_Info
*
);
void
RTFSetClassCallback
(
RTF_Info
*
,
int
,
RTFFuncPtr
);
RTFFuncPtr
RTFGetClassCallback
(
RTF_Info
*
,
int
);
RTFFuncPtr
RTFGetClassCallback
(
const
RTF_Info
*
,
int
);
void
RTFSetDestinationCallback
(
RTF_Info
*
,
int
,
RTFFuncPtr
);
RTFFuncPtr
RTFGetDestinationCallback
(
RTF_Info
*
,
int
);
RTFFuncPtr
RTFGetDestinationCallback
(
const
RTF_Info
*
,
int
);
void
RTFRead
(
RTF_Info
*
);
int
RTFGetToken
(
RTF_Info
*
);
/* writer should rarely need this */
void
RTFUngetToken
(
RTF_Info
*
);
int
RTFPeekToken
(
RTF_Info
*
);
void
RTFSetToken
(
RTF_Info
*
,
int
,
int
,
int
,
int
,
const
char
*
);
void
RTFSetReadHook
(
RTF_Info
*
,
RTFFuncPtr
);
RTFFuncPtr
RTFGetReadHook
(
RTF_Info
*
);
RTFFuncPtr
RTFGetReadHook
(
const
RTF_Info
*
);
void
RTFRouteToken
(
RTF_Info
*
);
void
RTFSkipGroup
(
RTF_Info
*
);
void
RTFExpandStyle
(
RTF_Info
*
,
int
);
int
RTFCheckCM
(
RTF_Info
*
,
int
,
int
);
int
RTFCheckCMM
(
RTF_Info
*
,
int
,
int
,
int
);
int
RTFCheckMM
(
RTF_Info
*
,
int
,
int
);
RTFFont
*
RTFGetFont
(
RTF_Info
*
,
int
);
RTFColor
*
RTFGetColor
(
RTF_Info
*
,
int
);
RTFStyle
*
RTFGetStyle
(
RTF_Info
*
,
int
);
int
RTFCheckCM
(
const
RTF_Info
*
,
int
,
int
);
int
RTFCheckCMM
(
const
RTF_Info
*
,
int
,
int
,
int
);
int
RTFCheckMM
(
const
RTF_Info
*
,
int
,
int
);
RTFFont
*
RTFGetFont
(
const
RTF_Info
*
,
int
);
RTFColor
*
RTFGetColor
(
const
RTF_Info
*
,
int
);
RTFStyle
*
RTFGetStyle
(
const
RTF_Info
*
,
int
);
int
RTFCharToHex
(
char
);
int
RTFHexToChar
(
int
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment