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
577ea0cb
Commit
577ea0cb
authored
Jul 08, 2002
by
Duane Clark
Committed by
Alexandre Julliard
Jul 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add richedit support for a plain text stream.
parent
52ab395c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
5 deletions
+21
-5
reader.c
dlls/richedit/reader.c
+15
-3
richedit.c
dlls/richedit/richedit.c
+1
-0
rtf.h
dlls/richedit/rtf.h
+1
-0
text-writer.c
dlls/richedit/text-writer.c
+4
-2
No files found.
dlls/richedit/reader.c
View file @
577ea0cb
...
...
@@ -123,6 +123,7 @@ int rtfClass;
int
rtfMajor
;
int
rtfMinor
;
int
rtfParam
;
int
rtfFormat
;
char
*
rtfTextBuf
=
(
char
*
)
NULL
;
int
rtfTextLen
;
...
...
@@ -540,9 +541,8 @@ RTFFuncPtr p;
(
*
p
)
();
/* give read hook a look at token */
/* Silently discard newlines, carriage returns, nulls. */
if
(
!
(
rtfClass
==
rtfText
&&
(
rtfMajor
==
'\n'
||
rtfMajor
==
'\r'
||
rtfMajor
==
'\0'
)))
if
(
!
(
rtfClass
==
rtfText
&&
rtfFormat
!=
SF_TEXT
&&
(
rtfMajor
==
'\r'
||
rtfMajor
==
'\n'
||
rtfMajor
==
'\0'
)))
break
;
}
return
(
rtfClass
);
...
...
@@ -604,6 +604,18 @@ RTFFont *fp;
TRACE
(
"
\n
"
);
if
(
rtfFormat
==
SF_TEXT
)
{
rtfMajor
=
GetChar
();
rtfMinor
=
rtfSC_nothing
;
rtfParam
=
rtfNoParam
;
rtfTextBuf
[
rtfTextLen
=
0
]
=
'\0'
;
if
(
rtfMajor
==
EOF
)
rtfClass
=
rtfEOF
;
else
rtfClass
=
rtfText
;
return
;
}
/* first check for pushed token from RTFUngetToken() */
if
(
pushedClass
>=
0
)
...
...
dlls/richedit/richedit.c
View file @
577ea0cb
...
...
@@ -175,6 +175,7 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
/* setup the RTF parser */
RTFSetEditStream
((
EDITSTREAM
*
)
lParam
);
rtfFormat
=
wParam
&
(
SF_TEXT
|
SF_RTF
);
WriterInit
();
RTFInit
();
BeginFile
();
...
...
dlls/richedit/rtf.h
View file @
577ea0cb
...
...
@@ -432,6 +432,7 @@ extern int rtfClass; /* token class */
extern
int
rtfMajor
;
/* token major number */
extern
int
rtfMinor
;
/* token minor number */
extern
int
rtfParam
;
/* control symbol parameter */
extern
int
rtfFormat
;
/* either SF_RTF or SF_TEXT */
# ifdef THINK_C
# define rtfNoParam (-32768)
/* 16-bit max. neg. value */
...
...
dlls/richedit/text-writer.c
View file @
577ea0cb
...
...
@@ -124,8 +124,10 @@ TextClass ()
char
buf
[
rtfBufSiz
];
TRACE
(
"
\n
"
);
if
(
rtfMinor
!=
rtfSC_nothing
)
if
(
rtfFormat
==
SF_TEXT
)
PutLitChar
(
rtfMajor
);
else
if
(
rtfMinor
!=
rtfSC_nothing
)
PutStdChar
(
rtfMinor
);
else
{
...
...
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