1999-12-16 22:56:45 +00:00
|
|
|
/* rtcScanner.h
|
|
|
|
|
|
|
|
Copyright (C) 1999 Free Software Foundation, Inc.
|
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
Author: Stefan Boehringer (stefan.boehringer@uni-bochum.de)
|
1999-12-16 22:56:45 +00:00
|
|
|
Date: Dec 1999
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1999-12-16 22:56:45 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
1999-12-16 22:56:45 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2007-10-29 21:16:17 +00:00
|
|
|
Lesser General Public License for more details.
|
1999-12-16 22:56:45 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1999-12-16 22:56:45 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
1999-12-16 22:56:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef rtfScanner_h_INCLUDE
|
|
|
|
#define rtfScanner_h_INCLUDE
|
|
|
|
|
|
|
|
#include <objc/objc.h>
|
|
|
|
|
|
|
|
#if !defined(YES)
|
|
|
|
typedef char BOOL;
|
|
|
|
enum { NO, YES };
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum { NoError, LEXoutOfMemory, LEXsyntaxError } GSLexError;
|
|
|
|
|
|
|
|
typedef struct _RTFscannerCtxt {
|
|
|
|
int (*lgetchar)(void *);
|
2000-04-23 22:28:46 +00:00
|
|
|
char pushbackBuffer[4]; // gaurantee 4 chars of pushback
|
1999-12-16 22:56:45 +00:00
|
|
|
int pushbackCount;
|
|
|
|
int streamPosition;
|
|
|
|
int streamLineNumber;
|
|
|
|
void *customContext;
|
|
|
|
} RTFscannerCtxt;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
BOOL isEmpty;
|
|
|
|
int parameter;
|
|
|
|
int token;
|
|
|
|
const char *name;
|
|
|
|
} RTFcmd;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
GSRTFfamilyNil, GSRTFfamilyRoman, GSRTFfamilySwiss,
|
|
|
|
GSRTFfamilyModern, GSRTFfamilyScript, GSRTFfamilyDecor,
|
|
|
|
GSRTFfamilyTech
|
|
|
|
} RTFfontFamily;
|
|
|
|
|
|
|
|
|
|
|
|
void lexInitContext(RTFscannerCtxt *lctxt, void *customContext, int (*getcharFunction)());
|
|
|
|
|
2000-06-16 17:03:56 +00:00
|
|
|
/* external symbols from the grammer */
|
|
|
|
/*int GSRTFparse(void *ctxt, RTFscannerCtxt *lctxt);*/
|
|
|
|
int GSRTFparse(void *ctxt, void *lctxt);
|
|
|
|
|
1999-12-16 22:56:45 +00:00
|
|
|
#endif
|
2000-06-16 17:03:56 +00:00
|
|
|
|