Redefined GSRTFlex() without location parameter. Some cleanup

against compiler warnings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15070 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2002-11-24 01:07:31 +00:00
parent 21a6dd0751
commit 020e0fed3f

View file

@ -25,6 +25,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <ctype.h> #include <ctype.h>
#include "rtfScanner.h" #include "rtfScanner.h"
#include "rtfGrammer.tab.h" #include "rtfGrammer.tab.h"
@ -157,86 +158,86 @@ int findStringFromKeywordArray(const char *string, const LexKeyword *array,
// <!> must be sorted // <!> must be sorted
LexKeyword RTFcommands[] = LexKeyword RTFcommands[] =
{ {
"ansi", token(RTFansi), {"ansi", token(RTFansi)},
"b", token(RTFbold), {"b", token(RTFbold)},
"blue", token(RTFblue), {"blue", token(RTFblue)},
"bullet", token(RTFbullet), {"bullet", token(RTFbullet)},
"cb", token(RTFcolorbg), {"cb", token(RTFcolorbg)},
"cell", token(RTFcell), {"cell", token(RTFcell)},
"cf", token(RTFcolorfg), {"cf", token(RTFcolorfg)},
"colortbl", token(RTFcolortable), {"colortbl", token(RTFcolortable)},
"cpg", token(RTFcpg), {"cpg", token(RTFcpg)},
"dn", token(RTFsubscript), {"dn", token(RTFsubscript)},
"emdash", token(RTFemdash), {"emdash", token(RTFemdash)},
"emspace", token(RTFemspace), {"emspace", token(RTFemspace)},
"endash", token(RTFendash), {"endash", token(RTFendash)},
"enspace", token(RTFenspace), {"enspace", token(RTFenspace)},
"f", token(RTFfont), {"f", token(RTFfont)},
"fcharset", token(RTFfcharset), {"fcharset", token(RTFfcharset)},
"fdecor", token(RTFfamilyDecor), {"fdecor", token(RTFfamilyDecor)},
"fi", token(RTFfirstLineIndent), {"fi", token(RTFfirstLineIndent)},
"fmodern", token(RTFfamilyModern), {"fmodern", token(RTFfamilyModern)},
"fnil", token(RTFfamilyNil), {"fnil", token(RTFfamilyNil)},
"fonttbl", token(RTFfontListStart), {"fonttbl", token(RTFfontListStart)},
/* All footers are mapped on one entry */ /* All footers are mapped on one entry */
"footer", token(RTFfooter), {"footer", token(RTFfooter)},
"footerf", token(RTFfooter), {"footerf", token(RTFfooter)},
"footerl", token(RTFfooter), {"footerl", token(RTFfooter)},
"footerr", token(RTFfooter), {"footerr", token(RTFfooter)},
"footnote", token(RTFfootnote), {"footnote", token(RTFfootnote)},
"fprq", token(RTFfprq), {"fprq", token(RTFfprq)},
"froman", token(RTFfamilyRoman), {"froman", token(RTFfamilyRoman)},
"fs", token(RTFfontSize), {"fs", token(RTFfontSize)},
"fscript", token(RTFfamilyScript), {"fscript", token(RTFfamilyScript)},
"fswiss", token(RTFfamilySwiss), {"fswiss", token(RTFfamilySwiss)},
"ftech", token(RTFfamilyTech), {"ftech", token(RTFfamilyTech)},
"green", token(RTFgreen), {"green", token(RTFgreen)},
/* All headers are mapped on one entry */ /* All headers are mapped on one entry */
"header", token(RTFheader), {"header", token(RTFheader)},
"headerf", token(RTFheader), {"headerf", token(RTFheader)},
"headerl", token(RTFheader), {"headerl", token(RTFheader)},
"headerr", token(RTFheader), {"headerr", token(RTFheader)},
"i", token(RTFitalic), {"i", token(RTFitalic)},
"info", token(RTFinfo), {"info", token(RTFinfo)},
"ldblquote", token(RTFldblquote), {"ldblquote", token(RTFldblquote)},
"li", token(RTFleftIndent), {"li", token(RTFleftIndent)},
"lquote", token(RTFlquote), {"lquote", token(RTFlquote)},
"mac", token(RTFmac), {"mac", token(RTFmac)},
"margb", token(RTFmarginButtom), {"margb", token(RTFmarginButtom)},
"margl", token(RTFmarginLeft), {"margl", token(RTFmarginLeft)},
"margr", token(RTFmarginRight), {"margr", token(RTFmarginRight)},
"margt", token(RTFmarginTop), {"margt", token(RTFmarginTop)},
"paperh", token(RTFpaperHeight), {"paperh", token(RTFpaperHeight)},
"paperw", token(RTFpaperWidth), {"paperw", token(RTFpaperWidth)},
"par", token(RTFparagraph), {"par", token(RTFparagraph)},
"pard", token(RTFdefaultParagraph), {"pard", token(RTFdefaultParagraph)},
"pc", token(RTFpc), {"pc", token(RTFpc)},
"pca", token(RTFpca), {"pca", token(RTFpca)},
"pict", token(RTFpict), {"pict", token(RTFpict)},
"plain", token(RTFplain), {"plain", token(RTFplain)},
"qc", token(RTFalignCenter), {"qc", token(RTFalignCenter)},
"qj", token(RTFalignJustified), {"qj", token(RTFalignJustified)},
"ql", token(RTFalignLeft), {"ql", token(RTFalignLeft)},
"qr", token(RTFalignRight), {"qr", token(RTFalignRight)},
"rdblquote", token(RTFrdblquote), {"rdblquote", token(RTFrdblquote)},
"red", token(RTFred), {"red", token(RTFred)},
"ri", token(RTFrightIndent), {"ri", token(RTFrightIndent)},
"row", token(RTFrow), {"row", token(RTFrow)},
"rquote", token(RTFrquote), {"rquote", token(RTFrquote)},
"rtf", token(RTFstart), {"rtf", token(RTFstart)},
"s", token(RTFstyle), {"s", token(RTFstyle)},
"sa", token(RTFspaceAbove), {"sa", token(RTFspaceAbove)},
"sl", token(RTFlineSpace), {"sl", token(RTFlineSpace)},
"stylesheet",token(RTFstylesheet), {"stylesheet",token(RTFstylesheet)},
"tab", token(RTFtabulator), {"tab", token(RTFtabulator)},
"tx", token(RTFtabstop), {"tx", token(RTFtabstop)},
/* All underline are mapped on one entry */ /* All underline are mapped on one entry */
"ul", token(RTFunderline), {"ul", token(RTFunderline)},
"uld", token(RTFunderline), {"uld", token(RTFunderline)},
"uldb", token(RTFunderline), {"uldb", token(RTFunderline)},
"ulnone", token(RTFunderlineStop), {"ulnone", token(RTFunderlineStop)},
"ulw", token(RTFunderline), {"ulw", token(RTFunderline)},
"up", token(RTFsuperscript) {"up", token(RTFsuperscript)}
}; };
BOOL probeCommand (RTFscannerCtxt *lctxt) BOOL probeCommand (RTFscannerCtxt *lctxt)
@ -385,13 +386,13 @@ static int gethex(RTFscannerCtxt *lctxt)
return c; return c;
} }
int GSRTFlex (YYSTYPE *lvalp, YYLTYPE *llocp, int GSRTFlex (YYSTYPE *lvalp, //YYLTYPE *llocp,
RTFscannerCtxt *lctxt) /* provide value and position in the params */ RTFscannerCtxt *lctxt) /* provide value and position in the params */
{ {
int c; int c;
int token = 0; int token = 0;
char *cv; char *cv;
do do
{ {
c = lexGetchar(lctxt); c = lexGetchar(lctxt);
@ -480,6 +481,7 @@ int GSRTFlex (YYSTYPE *lvalp, YYLTYPE *llocp,
return token; return token;
default: default:
// fall through // fall through
break;
} }
} }
// else fall through to default: read text <A> // else fall through to default: read text <A>