ftp.nice.ch/pub/next/connectivity/news/NewsBase.3.02.s.tar.gz#/NewsBase302.source/MMEdit/rtf2.h

This is rtf2.h in view mode; [Download] [Up]

/*
 rtf2.h of 

 Rtf2: a facility to convert RTF files to files compatible with the ATK format.

 Rtf2 is copyright (c) 1991 by the Massachusetts Institute of 
 Technology.

 RTF is a product of the Microsoft Corporation.

 Permission to use, copy, modify, and distribute this software and
 its documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice and the name of the author(s)
 appear in all copies; that both that copyright notice, the name of
 the author(s) and this permission notice appear in supporting
 documentation; and that the name of the Massachusetts Institute of
 Technology not be used in advertising or publicity pertaining to
 distribution of the software without specific, written prior
 permission.  The Massachusetts Institute of Technology makes no
 representations about the suitability of this software for any purpose.
 It is provided "as is" without express or implied warranty.
 
 Rtf2 was written entirely by Jeremy Paul Kirby, jpkirby@ATHENA.MIT.EDU

 $Header: /usr2/multimedia/RCS/MMEdit//rtf2.h,v 3.1 93/01/04 11:18:58 suzuki Exp $
*/


#import <streams/streams.h>

/* PROGRAM DEFINITIONS */
#define VERSION "1.0"

/* CHARACTER SET DEFINITIONS */
#define ANSI 0
#define MAC 1
#define PC 2


/* CHARACTER FLAGS FOR RTF2 COMMANDS IN TRANSFILE  */
#define COMMAND_LIST "@!#$^"

#define TRUE 1
#define FALSE 0
#define TMP_SIZE 255


/* VALUES OF tofind for ParseText() */
/*   Must be greater than 255, save EOF   */
#define POP_JOB 4297

/* FOR USE AS BIT SETTINGS FOR mode: */
#define WORD 0
#define COMMAND 1
#define RTFCOMMAND 0
#define EZCOMMAND 2
#define PARAMETERIZED 0
#define NAKED 4
#define USEDELS 0
#define SUPPRESSDELS 8
#define ANYTHINGELSE 0
#define QUOTEDCHAR 16

/* SEARCH PATH FOR FindNode()   */
#define RTFCOLUMN 1
#define EZCOLUMN 2


/* VALUES FOR transform IN ParseText()  */
#define CAPS 2
#define LOWERCASE 1
#define NORMAL 0


/* ACTION CODES FOR ParseText()  */
#define PRINTTOFILE 0
#define PRINTTOSTRING 1  /* RESERVED FOR FUTURE USE */
#define NOP 2

#define DEFAULT 0
#define ANDY 1
#define ANDYSANS 2
#define ANDYTYPE 3
#define ANDYSYMBOL 4
#define NOFONT 255

#define ATTRIB_SIZE 18
#define FUNCTION_SIZE 24

typedef struct rtf2_TableStruct
{
  char *rtfword;
  int mode;
  union
    {
      char *word;
      int (*fun)();
      char quote;
    } ez;
  struct rtf2_TableStruct *next;
} *rtf2_TABLE;

typedef struct rtf2_ValuesStruct
{
  char *name;
  char *value;
  struct rtf2_ValuesStruct *next;
} *rtf2_VALUES;

typedef struct FileStackStruct
{
//  FILE *ptr;
  NXStream  *ptr;
  long int line;
  struct FileStackStruct *next;
} *FILESTACK;

typedef struct rtf2_FontStruct
{
  int number;
  int ind;
  struct rtf2_FontStruct *next;
} *rtf2_FONT;

struct rtf2_func_words
{
   char *word;
   int (*fname)();
};
typedef int (*rtf2_FP)();

char *me, *RTFchars, *calloc(), *malloc();

int Token, MasterToken, errno, TextDSVersion;
int PopFile(), RTFverceiling, CharSet, Levels, Levels1, FontSize;
int flag, indented, fnote, tabs;
double LeftMargin, RightMargin;
long int CurrLine;

NXStream  *fin, *fout, *ftrans, *ferr;

struct mem_file_desc  **Adpp;
char *Boundary;

void PushFile();

char sentence[10000];
char sentence1[10000];
char oldsent[10000];
char old2sent[1000];
char old3sent[1000];
int bold_flag;
int italic_flag;
int supers_flag;
int subs_flag;
int center_flag;
int fleft_flag;
int fright_flag;
int underl_flag;

int fon;
int multip;
int Ismultip;
int fontp;
int Objcount;

int he;

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.