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
b53d7d32
Commit
b53d7d32
authored
Jan 17, 2009
by
Andrew Talbot
Committed by
Alexandre Julliard
Jan 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Declare some functions static.
parent
ebe4a9e3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
58 deletions
+49
-58
editor.h
dlls/riched20/editor.h
+0
-2
reader.c
dlls/riched20/reader.c
+47
-47
rtf.h
dlls/riched20/rtf.h
+0
-7
string.c
dlls/riched20/string.c
+1
-1
style.c
dlls/riched20/style.c
+1
-1
No files found.
dlls/riched20/editor.h
View file @
b53d7d32
...
...
@@ -71,7 +71,6 @@ void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]);
void
ME_DumpStyle
(
ME_Style
*
s
);
CHARFORMAT2W
*
ME_ToCF2W
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
void
ME_CopyToCF2W
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
CHARFORMAT2W
*
ME_ToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
void
ME_CopyToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
);
void
ME_CopyCharFormat
(
CHARFORMAT2W
*
pDest
,
const
CHARFORMAT2W
*
pSrc
);
/* only works with 2W structs */
void
ME_CharFormatFromLogFont
(
HDC
hDC
,
const
LOGFONTW
*
lf
,
CHARFORMAT2W
*
fmt
);
/* ditto */
...
...
@@ -89,7 +88,6 @@ void ME_DumpDocument(ME_TextBuffer *buffer);
const
char
*
ME_GetDITypeName
(
ME_DIType
type
);
/* string.c */
int
ME_GetOptimalBuffer
(
int
nLen
);
ME_String
*
ME_MakeString
(
LPCWSTR
szText
);
ME_String
*
ME_MakeStringN
(
LPCWSTR
szText
,
int
nMaxChars
);
ME_String
*
ME_MakeStringR
(
WCHAR
cRepeat
,
int
nMaxChars
);
...
...
dlls/riched20/reader.c
View file @
b53d7d32
...
...
@@ -178,6 +178,33 @@ RTFDestroy(RTF_Info *info)
}
/* ---------------------------------------------------------------------- */
/*
* Callback table manipulation routines
*/
/*
* Install or return a writer callback for a token class
*/
static
void
RTFSetClassCallback
(
RTF_Info
*
info
,
int
class
,
RTFFuncPtr
callback
)
{
if
(
class
>=
0
&&
class
<
rtfMaxClass
)
info
->
ccb
[
class
]
=
callback
;
}
static
RTFFuncPtr
RTFGetClassCallback
(
const
RTF_Info
*
info
,
int
class
)
{
if
(
class
>=
0
&&
class
<
rtfMaxClass
)
return
info
->
ccb
[
class
];
return
NULL
;
}
/*
* Initialize the reader. This may be called multiple times,
* to read multiple files. The only thing not reset is the input
...
...
@@ -281,33 +308,6 @@ char *RTFGetOutputName(const RTF_Info *info)
}
/* ---------------------------------------------------------------------- */
/*
* Callback table manipulation routines
*/
/*
* Install or return a writer callback for a token class
*/
void
RTFSetClassCallback
(
RTF_Info
*
info
,
int
class
,
RTFFuncPtr
callback
)
{
if
(
class
>=
0
&&
class
<
rtfMaxClass
)
info
->
ccb
[
class
]
=
callback
;
}
RTFFuncPtr
RTFGetClassCallback
(
const
RTF_Info
*
info
,
int
class
)
{
if
(
class
>=
0
&&
class
<
rtfMaxClass
)
return
info
->
ccb
[
class
];
return
NULL
;
}
/*
* Install or return a writer callback for a destination type
*/
...
...
@@ -319,7 +319,7 @@ void RTFSetDestinationCallback(RTF_Info *info, int dest, RTFFuncPtr callback)
}
RTFFuncPtr
RTFGetDestinationCallback
(
const
RTF_Info
*
info
,
int
dest
)
static
RTFFuncPtr
RTFGetDestinationCallback
(
const
RTF_Info
*
info
,
int
dest
)
{
if
(
dest
>=
0
&&
dest
<
rtfMaxDestination
)
return
info
->
dcb
[
dest
];
...
...
@@ -416,6 +416,22 @@ void RTFReadGroup (RTF_Info *info)
/*
* Install or return a token reader hook.
*/
void
RTFSetReadHook
(
RTF_Info
*
info
,
RTFFuncPtr
f
)
{
info
->
readHook
=
f
;
}
static
RTFFuncPtr
RTFGetReadHook
(
const
RTF_Info
*
info
)
{
return
(
info
->
readHook
);
}
/*
* Read one token. Call the read hook if there is one. The
* token class is the return value. Returns rtfEOF when there
* are no more tokens.
...
...
@@ -446,23 +462,7 @@ int RTFGetToken(RTF_Info *info)
}
/*
* Install or return a token reader hook.
*/
void
RTFSetReadHook
(
RTF_Info
*
info
,
RTFFuncPtr
f
)
{
info
->
readHook
=
f
;
}
RTFFuncPtr
RTFGetReadHook
(
const
RTF_Info
*
info
)
{
return
(
info
->
readHook
);
}
void
RTFUngetToken
(
RTF_Info
*
info
)
static
void
RTFUngetToken
(
RTF_Info
*
info
)
{
if
(
info
->
pushedClass
>=
0
)
/* there's already an ungotten token */
ERR
(
"cannot unget two tokens
\n
"
);
...
...
@@ -797,7 +797,7 @@ static int GetChar(RTF_Info *info)
* part of the token text.
*/
void
RTFSetToken
(
RTF_Info
*
info
,
int
class
,
int
major
,
int
minor
,
int
param
,
const
char
*
text
)
static
void
RTFSetToken
(
RTF_Info
*
info
,
int
class
,
int
major
,
int
minor
,
int
param
,
const
char
*
text
)
{
info
->
rtfClass
=
class
;
info
->
rtfMajor
=
major
;
...
...
@@ -1269,7 +1269,7 @@ static void ReadObjGroup(RTF_Info *info)
*/
RTFStyle
*
RTFGetStyle
(
const
RTF_Info
*
info
,
int
num
)
static
RTFStyle
*
RTFGetStyle
(
const
RTF_Info
*
info
,
int
num
)
{
RTFStyle
*
s
;
...
...
dlls/riched20/rtf.h
View file @
b53d7d32
...
...
@@ -1195,17 +1195,11 @@ void RTFSetInputName (RTF_Info *, const char *);
char
*
RTFGetInputName
(
const
RTF_Info
*
);
void
RTFSetOutputName
(
RTF_Info
*
,
const
char
*
);
char
*
RTFGetOutputName
(
const
RTF_Info
*
);
void
RTFSetClassCallback
(
RTF_Info
*
,
int
,
RTFFuncPtr
);
RTFFuncPtr
RTFGetClassCallback
(
const
RTF_Info
*
,
int
);
void
RTFSetDestinationCallback
(
RTF_Info
*
,
int
,
RTFFuncPtr
);
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
(
const
RTF_Info
*
);
void
RTFRouteToken
(
RTF_Info
*
);
void
RTFSkipGroup
(
RTF_Info
*
);
void
RTFReadGroup
(
RTF_Info
*
);
...
...
@@ -1215,7 +1209,6 @@ 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
);
...
...
dlls/riched20/string.c
View file @
b53d7d32
...
...
@@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
richedit
);
int
ME_GetOptimalBuffer
(
int
nLen
)
static
int
ME_GetOptimalBuffer
(
int
nLen
)
{
return
((
2
*
nLen
+
1
)
+
128
)
&~
63
;
}
...
...
dlls/riched20/style.c
View file @
b53d7d32
...
...
@@ -77,7 +77,7 @@ void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from)
*
to
=
*
from
;
}
CHARFORMAT2W
*
ME_ToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
)
static
CHARFORMAT2W
*
ME_ToCFAny
(
CHARFORMAT2W
*
to
,
CHARFORMAT2W
*
from
)
{
assert
(
from
->
cbSize
==
sizeof
(
CHARFORMAT2W
));
if
(
to
->
cbSize
==
sizeof
(
CHARFORMATA
))
...
...
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