Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
53858d61
Commit
53858d61
authored
Dec 31, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Dec 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add newlines to ERR macro output.
parent
ac9b0870
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
reader.c
dlls/riched20/reader.c
+25
-25
No files found.
dlls/riched20/reader.c
View file @
53858d61
...
@@ -219,7 +219,7 @@ void RTFInit(RTF_Info *info)
...
@@ -219,7 +219,7 @@ void RTFInit(RTF_Info *info)
info
->
rtfTextBuf
=
RTFAlloc
(
rtfBufSiz
);
info
->
rtfTextBuf
=
RTFAlloc
(
rtfBufSiz
);
info
->
pushedTextBuf
=
RTFAlloc
(
rtfBufSiz
);
info
->
pushedTextBuf
=
RTFAlloc
(
rtfBufSiz
);
if
(
info
->
rtfTextBuf
==
NULL
||
info
->
pushedTextBuf
==
NULL
)
if
(
info
->
rtfTextBuf
==
NULL
||
info
->
pushedTextBuf
==
NULL
)
ERR
(
"Cannot allocate text buffers."
);
ERR
(
"Cannot allocate text buffers.
\n
"
);
info
->
rtfTextBuf
[
0
]
=
info
->
pushedTextBuf
[
0
]
=
'\0'
;
info
->
rtfTextBuf
[
0
]
=
info
->
pushedTextBuf
[
0
]
=
'\0'
;
}
}
...
@@ -283,7 +283,7 @@ void RTFSetInputName(RTF_Info *info, char *name)
...
@@ -283,7 +283,7 @@ void RTFSetInputName(RTF_Info *info, char *name)
info
->
inputName
=
RTFStrSave
(
name
);
info
->
inputName
=
RTFStrSave
(
name
);
if
(
info
->
inputName
==
NULL
)
if
(
info
->
inputName
==
NULL
)
ERR
(
"RTFSetInputName: out of memory"
);
ERR
(
"RTFSetInputName: out of memory
\n
"
);
}
}
...
@@ -299,7 +299,7 @@ void RTFSetOutputName(RTF_Info *info, char *name)
...
@@ -299,7 +299,7 @@ void RTFSetOutputName(RTF_Info *info, char *name)
info
->
outputName
=
RTFStrSave
(
name
);
info
->
outputName
=
RTFStrSave
(
name
);
if
(
info
->
outputName
==
NULL
)
if
(
info
->
outputName
==
NULL
)
ERR
(
"RTFSetOutputName: out of memory"
);
ERR
(
"RTFSetOutputName: out of memory
\n
"
);
}
}
...
@@ -388,7 +388,7 @@ void RTFRouteToken(RTF_Info *info)
...
@@ -388,7 +388,7 @@ void RTFRouteToken(RTF_Info *info)
if
(
info
->
rtfClass
<
0
||
info
->
rtfClass
>=
rtfMaxClass
)
/* watchdog */
if
(
info
->
rtfClass
<
0
||
info
->
rtfClass
>=
rtfMaxClass
)
/* watchdog */
{
{
ERR
(
"Unknown class %d: %s (reader malfunction)"
,
ERR
(
"Unknown class %d: %s (reader malfunction)
\n
"
,
info
->
rtfClass
,
info
->
rtfTextBuf
);
info
->
rtfClass
,
info
->
rtfTextBuf
);
}
}
if
(
RTFCheckCM
(
info
,
rtfControl
,
rtfDestination
))
if
(
RTFCheckCM
(
info
,
rtfControl
,
rtfDestination
))
...
@@ -490,9 +490,9 @@ void RTFUngetToken(RTF_Info *info)
...
@@ -490,9 +490,9 @@ void RTFUngetToken(RTF_Info *info)
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
if
(
info
->
pushedClass
>=
0
)
/* there's already an ungotten token */
if
(
info
->
pushedClass
>=
0
)
/* there's already an ungotten token */
ERR
(
"cannot unget two tokens"
);
ERR
(
"cannot unget two tokens
\n
"
);
if
(
info
->
rtfClass
<
0
)
if
(
info
->
rtfClass
<
0
)
ERR
(
"no token to unget"
);
ERR
(
"no token to unget
\n
"
);
info
->
pushedClass
=
info
->
rtfClass
;
info
->
pushedClass
=
info
->
rtfClass
;
info
->
pushedMajor
=
info
->
rtfMajor
;
info
->
pushedMajor
=
info
->
rtfMajor
;
info
->
pushedMinor
=
info
->
rtfMinor
;
info
->
pushedMinor
=
info
->
rtfMinor
;
...
@@ -893,19 +893,19 @@ static void ReadFontTbl(RTF_Info *info)
...
@@ -893,19 +893,19 @@ static void ReadFontTbl(RTF_Info *info)
else
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
else
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
old
=
0
;
/* brace */
old
=
0
;
/* brace */
else
/* can't tell! */
else
/* can't tell! */
ERR
(
"%s: Cannot determine format"
,
fn
);
ERR
(
"%s: Cannot determine format
\n
"
,
fn
);
}
}
if
(
old
==
0
)
/* need to find "{" here */
if
(
old
==
0
)
/* need to find "{" here */
{
{
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
ERR
(
"%s: missing
\"
{
\"
"
,
fn
);
ERR
(
"%s: missing
\"
{
\"
\n
"
,
fn
);
RTFGetToken
(
info
);
/* yes, skip to next token */
RTFGetToken
(
info
);
/* yes, skip to next token */
if
(
info
->
rtfClass
==
rtfEOF
)
if
(
info
->
rtfClass
==
rtfEOF
)
break
;
break
;
}
}
fp
=
New
(
RTFFont
);
fp
=
New
(
RTFFont
);
if
(
fp
==
NULL
)
if
(
fp
==
NULL
)
ERR
(
"%s: cannot allocate font entry"
,
fn
);
ERR
(
"%s: cannot allocate font entry
\n
"
,
fn
);
fp
->
rtfNextFont
=
info
->
fontList
;
fp
->
rtfNextFont
=
info
->
fontList
;
info
->
fontList
=
fp
;
info
->
fontList
=
fp
;
...
@@ -991,7 +991,7 @@ static void ReadFontTbl(RTF_Info *info)
...
@@ -991,7 +991,7 @@ static void ReadFontTbl(RTF_Info *info)
*
bp
=
'\0'
;
*
bp
=
'\0'
;
fp
->
rtfFName
=
RTFStrSave
(
buf
);
fp
->
rtfFName
=
RTFStrSave
(
buf
);
if
(
fp
->
rtfFName
==
NULL
)
if
(
fp
->
rtfFName
==
NULL
)
ERR
(
"%s: cannot allocate font name"
,
fn
);
ERR
(
"%s: cannot allocate font name
\n
"
,
fn
);
/* already have next token; don't read one */
/* already have next token; don't read one */
/* at bottom of loop */
/* at bottom of loop */
continue
;
continue
;
...
@@ -1012,7 +1012,7 @@ static void ReadFontTbl(RTF_Info *info)
...
@@ -1012,7 +1012,7 @@ static void ReadFontTbl(RTF_Info *info)
{
{
RTFGetToken
(
info
);
RTFGetToken
(
info
);
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
ERR
(
"%s: missing
\"
}
\"
"
,
fn
);
ERR
(
"%s: missing
\"
}
\"
\n
"
,
fn
);
if
(
info
->
rtfClass
==
rtfEOF
)
if
(
info
->
rtfClass
==
rtfEOF
)
break
;
break
;
}
}
...
@@ -1026,7 +1026,7 @@ static void ReadFontTbl(RTF_Info *info)
...
@@ -1026,7 +1026,7 @@ static void ReadFontTbl(RTF_Info *info)
}
}
}
}
if
(
fp
->
rtfFNum
==
-
1
)
if
(
fp
->
rtfFNum
==
-
1
)
ERR
(
"%s: missing font number"
,
fn
);
ERR
(
"%s: missing font number
\n
"
,
fn
);
/*
/*
* Could check other pieces of structure here, too, I suppose.
* Could check other pieces of structure here, too, I suppose.
*/
*/
...
@@ -1068,7 +1068,7 @@ static void ReadColorTbl(RTF_Info *info)
...
@@ -1068,7 +1068,7 @@ static void ReadColorTbl(RTF_Info *info)
break
;
break
;
cp
=
New
(
RTFColor
);
cp
=
New
(
RTFColor
);
if
(
cp
==
NULL
)
if
(
cp
==
NULL
)
ERR
(
"%s: cannot allocate color entry"
,
fn
);
ERR
(
"%s: cannot allocate color entry
\n
"
,
fn
);
cp
->
rtfCNum
=
cnum
++
;
cp
->
rtfCNum
=
cnum
++
;
cp
->
rtfCRed
=
cp
->
rtfCGreen
=
cp
->
rtfCBlue
=
-
1
;
cp
->
rtfCRed
=
cp
->
rtfCGreen
=
cp
->
rtfCBlue
=
-
1
;
cp
->
rtfNextColor
=
info
->
colorList
;
cp
->
rtfNextColor
=
info
->
colorList
;
...
@@ -1086,7 +1086,7 @@ static void ReadColorTbl(RTF_Info *info)
...
@@ -1086,7 +1086,7 @@ static void ReadColorTbl(RTF_Info *info)
if
(
info
->
rtfClass
==
rtfEOF
)
if
(
info
->
rtfClass
==
rtfEOF
)
break
;
break
;
if
(
!
RTFCheckCM
(
info
,
rtfText
,
';'
))
if
(
!
RTFCheckCM
(
info
,
rtfText
,
';'
))
ERR
(
"%s: malformed entry"
,
fn
);
ERR
(
"%s: malformed entry
\n
"
,
fn
);
}
}
RTFRouteToken
(
info
);
/* feed "}" back to router */
RTFRouteToken
(
info
);
/* feed "}" back to router */
}
}
...
@@ -1116,7 +1116,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1116,7 +1116,7 @@ static void ReadStyleSheet(RTF_Info *info)
break
;
break
;
sp
=
New
(
RTFStyle
);
sp
=
New
(
RTFStyle
);
if
(
sp
==
NULL
)
if
(
sp
==
NULL
)
ERR
(
"%s: cannot allocate stylesheet entry"
,
fn
);
ERR
(
"%s: cannot allocate stylesheet entry
\n
"
,
fn
);
sp
->
rtfSName
=
NULL
;
sp
->
rtfSName
=
NULL
;
sp
->
rtfSNum
=
-
1
;
sp
->
rtfSNum
=
-
1
;
sp
->
rtfSType
=
rtfParStyle
;
sp
->
rtfSType
=
rtfParStyle
;
...
@@ -1128,7 +1128,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1128,7 +1128,7 @@ static void ReadStyleSheet(RTF_Info *info)
sp
->
rtfExpanding
=
0
;
sp
->
rtfExpanding
=
0
;
info
->
styleList
=
sp
;
info
->
styleList
=
sp
;
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
ERR
(
"%s: missing
\"
{
\"
"
,
fn
);
ERR
(
"%s: missing
\"
{
\"
\n
"
,
fn
);
real_style
=
TRUE
;
real_style
=
TRUE
;
for
(;;)
for
(;;)
{
{
...
@@ -1140,7 +1140,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1140,7 +1140,7 @@ static void ReadStyleSheet(RTF_Info *info)
{
{
if
(
RTFCheckMM
(
info
,
rtfSpecialChar
,
rtfOptDest
))
{
if
(
RTFCheckMM
(
info
,
rtfSpecialChar
,
rtfOptDest
))
{
RTFGetToken
(
info
);
RTFGetToken
(
info
);
ERR
(
"%s: skipping optional destination"
,
fn
);
ERR
(
"%s: skipping optional destination
\n
"
,
fn
);
RTFSkipGroup
(
info
);
RTFSkipGroup
(
info
);
info
->
rtfClass
=
rtfGroup
;
info
->
rtfClass
=
rtfGroup
;
info
->
rtfMajor
=
rtfEndGroup
;
info
->
rtfMajor
=
rtfEndGroup
;
...
@@ -1182,14 +1182,14 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1182,14 +1182,14 @@ static void ReadStyleSheet(RTF_Info *info)
}
}
sep
=
New
(
RTFStyleElt
);
sep
=
New
(
RTFStyleElt
);
if
(
sep
==
NULL
)
if
(
sep
==
NULL
)
ERR
(
"%s: cannot allocate style element"
,
fn
);
ERR
(
"%s: cannot allocate style element
\n
"
,
fn
);
sep
->
rtfSEClass
=
info
->
rtfClass
;
sep
->
rtfSEClass
=
info
->
rtfClass
;
sep
->
rtfSEMajor
=
info
->
rtfMajor
;
sep
->
rtfSEMajor
=
info
->
rtfMajor
;
sep
->
rtfSEMinor
=
info
->
rtfMinor
;
sep
->
rtfSEMinor
=
info
->
rtfMinor
;
sep
->
rtfSEParam
=
info
->
rtfParam
;
sep
->
rtfSEParam
=
info
->
rtfParam
;
sep
->
rtfSEText
=
RTFStrSave
(
info
->
rtfTextBuf
);
sep
->
rtfSEText
=
RTFStrSave
(
info
->
rtfTextBuf
);
if
(
sep
->
rtfSEText
==
NULL
)
if
(
sep
->
rtfSEText
==
NULL
)
ERR
(
"%s: cannot allocate style element text"
,
fn
);
ERR
(
"%s: cannot allocate style element text
\n
"
,
fn
);
if
(
sepLast
==
NULL
)
if
(
sepLast
==
NULL
)
sp
->
rtfSSEList
=
sep
;
/* first element */
sp
->
rtfSSEList
=
sep
;
/* first element */
else
/* add to end */
else
/* add to end */
...
@@ -1203,7 +1203,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1203,7 +1203,7 @@ static void ReadStyleSheet(RTF_Info *info)
* This passes over "{\*\keycode ... }, among
* This passes over "{\*\keycode ... }, among
* other things. A temporary (perhaps) hack.
* other things. A temporary (perhaps) hack.
*/
*/
ERR
(
"%s: skipping begin"
,
fn
);
ERR
(
"%s: skipping begin
\n
"
,
fn
);
RTFSkipGroup
(
info
);
RTFSkipGroup
(
info
);
continue
;
continue
;
}
}
...
@@ -1224,7 +1224,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1224,7 +1224,7 @@ static void ReadStyleSheet(RTF_Info *info)
*
bp
=
'\0'
;
*
bp
=
'\0'
;
sp
->
rtfSName
=
RTFStrSave
(
buf
);
sp
->
rtfSName
=
RTFStrSave
(
buf
);
if
(
sp
->
rtfSName
==
NULL
)
if
(
sp
->
rtfSName
==
NULL
)
ERR
(
"%s: cannot allocate style name"
,
fn
);
ERR
(
"%s: cannot allocate style name
\n
"
,
fn
);
}
}
else
/* unrecognized */
else
/* unrecognized */
{
{
...
@@ -1236,7 +1236,7 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1236,7 +1236,7 @@ static void ReadStyleSheet(RTF_Info *info)
if
(
real_style
)
{
if
(
real_style
)
{
RTFGetToken
(
info
);
RTFGetToken
(
info
);
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
if
(
!
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
ERR
(
"%s: missing
\"
}
\"
"
,
fn
);
ERR
(
"%s: missing
\"
}
\"
\n
"
,
fn
);
/*
/*
* Check over the style structure. A name is a must.
* Check over the style structure. A name is a must.
* If no style number was specified, check whether it's the
* If no style number was specified, check whether it's the
...
@@ -1248,12 +1248,12 @@ static void ReadStyleSheet(RTF_Info *info)
...
@@ -1248,12 +1248,12 @@ static void ReadStyleSheet(RTF_Info *info)
* Some German RTF writers use "Standard" instead of "Normal".
* Some German RTF writers use "Standard" instead of "Normal".
*/
*/
if
(
sp
->
rtfSName
==
NULL
)
if
(
sp
->
rtfSName
==
NULL
)
ERR
(
"%s: missing style name"
,
fn
);
ERR
(
"%s: missing style name
\n
"
,
fn
);
if
(
sp
->
rtfSNum
<
0
)
if
(
sp
->
rtfSNum
<
0
)
{
{
if
(
strncmp
(
buf
,
"Normal"
,
6
)
!=
0
if
(
strncmp
(
buf
,
"Normal"
,
6
)
!=
0
&&
strncmp
(
buf
,
"Standard"
,
8
)
!=
0
)
&&
strncmp
(
buf
,
"Standard"
,
8
)
!=
0
)
ERR
(
"%s: missing style number"
,
fn
);
ERR
(
"%s: missing style number
\n
"
,
fn
);
sp
->
rtfSNum
=
rtfNormalStyleNum
;
sp
->
rtfSNum
=
rtfNormalStyleNum
;
}
}
if
(
sp
->
rtfSNextPar
==
-
1
)
/* if \snext not given, */
if
(
sp
->
rtfSNextPar
==
-
1
)
/* if \snext not given, */
...
@@ -1359,7 +1359,7 @@ void RTFExpandStyle(RTF_Info *info, int n)
...
@@ -1359,7 +1359,7 @@ void RTFExpandStyle(RTF_Info *info, int n)
if
(
s
==
NULL
)
if
(
s
==
NULL
)
return
;
return
;
if
(
s
->
rtfExpanding
!=
0
)
if
(
s
->
rtfExpanding
!=
0
)
ERR
(
"Style expansion loop, style %d"
,
n
);
ERR
(
"Style expansion loop, style %d
\n
"
,
n
);
s
->
rtfExpanding
=
1
;
/* set expansion flag for loop detection */
s
->
rtfExpanding
=
1
;
/* set expansion flag for loop detection */
/*
/*
* Expand "based-on" style (unless it's the same as the current
* Expand "based-on" style (unless it's the same as the current
...
...
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