mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Fix error in probeCommand()
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6410 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
582fbfb278
commit
ac392d21ad
1 changed files with 8 additions and 6 deletions
|
@ -23,9 +23,9 @@
|
|||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "ctype.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include "Parsers/rtfScanner.h"
|
||||
#include "Parsers/rtfGrammer.tab.h"
|
||||
|
||||
|
@ -162,7 +162,9 @@ BOOL probeCommand(RTFscannerCtxt *lctxt)
|
|||
{
|
||||
int c = lexGetchar(lctxt);
|
||||
lexUngetchar(lctxt, c);
|
||||
return isalpha(c);
|
||||
if (isalpha(c))
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
// <N> According to spec a cmdLength of 32 is respected
|
||||
|
@ -239,7 +241,7 @@ GSLexError readText(RTFscannerCtxt *lctxt, YYSTYPE *lvalp)
|
|||
}
|
||||
if (c == '\\') // see <p>
|
||||
{
|
||||
if (probeCommand(lctxt))
|
||||
if (probeCommand(lctxt) == YES)
|
||||
{
|
||||
lexUngetchar(lctxt, c);
|
||||
break;
|
||||
|
@ -275,7 +277,7 @@ int GSRTFlex(YYSTYPE *lvalp, YYLTYPE *llocp, RTFscannerCtxt *lctxt) /* provide v
|
|||
case '}': token = '}';
|
||||
break;
|
||||
case '\\':
|
||||
if (probeCommand(lctxt))
|
||||
if (probeCommand(lctxt) == YES)
|
||||
{
|
||||
readCommand(lctxt, lvalp, &token);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue