oppack.c File Reference

#include "frontier.h"
#include "standard.h"
#include "memory.h"
#include "font.h"
#include "quickdraw.h"
#include "strings.h"
#include "ops.h"
#include "op.h"
#include "opinternal.h"
#include "byteorder.h"

Include dependency graph for oppack.c:

Go to the source code of this file.

Data Structures

struct  tylinetableitem
struct  tyversion2diskheader
struct  tyoppackinfo

Defines

#define macplatform   'mac '
#define winplatform   'win '
#define opversionnumber   2
#define hibyte(x)   (x & 0xff00)

Typedefs

typedef tylinetableitemptrlinetable
typedef tylinetableitem ** hdllinetable
typedef tyoppackinfoptroppackinfo

Enumerations

enum  tylinetableitemflags {
  flexpanded = 0x8000, flopenwindow = 0x4000, appbit0 = 0x2000, appbit1 = 0x1000,
  fllocked = 0x0800, flcomment = 0x0400, flbreakpoint = 0x0200
}

Functions

static boolean outtablevisit (hdlheadrecord hnode, ptrvoid refcon)
static boolean opoutlinetotable (hdlheadrecord hnode, handlestream *packstream, long *ctbytes)
static boolean pushdiskchar (byte ch, handlestream *deststream)
static boolean outtextvisit (hdlheadrecord hnode, ptroppackinfo packinfo)
static boolean opoutlinetotext (hdlheadrecord hnode, handlestream *textstream, long *ctbytes)
boolean oppack (Handle *hpackedoutline)
boolean oppackoutline (hdloutlinerecord houtline, Handle *hpackedoutline)
static boolean intablevisit (hdlheadrecord hnode, ptrvoid refcon)
static boolean optabletooutline (handlestream *packstream, hdlheadrecord hsummit)
static void clearindentvalues (boolean flmusttabindent)
static boolean opgetlinetext (boolean flmapchars, handlestream *textstream, short *level, Handle *htext)
static boolean opunpacktexttooutline (long platform, handlestream *packstream, hdlheadrecord *hnode)
static boolean opunpackversion2 (handlestream *packstream)
boolean opunpack (Handle hpackedoutline, long *ixload, hdloutlinerecord *houtline)
boolean opunpackoutline (Handle hpackedoutline, hdloutlinerecord *houtline)
boolean optextscraptooutline (hdloutlinerecord houtline, Handle htext, hdlheadrecord *hnode)
static boolean outscrapvisit (hdlheadrecord hnode, ptrvoid refcon)
boolean opoutlinetotextstream (hdloutlinerecord houtline, boolean flomitcomments, handlestream *s)
boolean opoutlinetotextscrap (hdloutlinerecord houtline, boolean flomitcomments, Handle htext)
boolean opoutlinetonewtextscrap (hdloutlinerecord houtline, Handle *htext)

Variables

static short spacesforlevel
static short firstindent
static boolean fltabindent
static short outscraplevel = 0


Define Documentation

#define hibyte  )     (x & 0xff00)
 

Definition at line 98 of file oppack.c.

Referenced by opunpack().

#define macplatform   'mac '
 

Definition at line 69 of file oppack.c.

Referenced by opunpackversion2().

#define opversionnumber   2
 

Definition at line 96 of file oppack.c.

Referenced by oppack(), and opunpack().

#define winplatform   'win '
 

Definition at line 70 of file oppack.c.


Typedef Documentation

typedef struct tylinetableitem ** hdllinetable
 

typedef struct tylinetableitem * ptrlinetable
 

typedef struct tyoppackinfo * ptroppackinfo
 


Enumeration Type Documentation

enum tylinetableitemflags
 

Enumerator:
flexpanded 
flopenwindow 
appbit0 
appbit1 
fllocked 
flcomment 
flbreakpoint 

Definition at line 48 of file oppack.c.


Function Documentation

static void clearindentvalues boolean  flmusttabindent  )  [static]
 

Definition at line 720 of file oppack.c.

Referenced by optextscraptooutline(), and opunpacktexttooutline().

static boolean intablevisit hdlheadrecord  hnode,
ptrvoid  refcon
[static]
 

Definition at line 640 of file oppack.c.

References appbit0, appbit1, athandlestreameof(), tylinetableitem::flags, flbreakpoint, flcomment, flexpanded, tyheadrecord::flexpanded, fllocked, flopenwindow, tyheadrecord::headlinkleft, tyheadrecord::headlinkup, hnode, tylinetableitem::lenrefcon, newclearhandle(), readhandlestream(), and sizeof().

Referenced by optabletooutline().

Here is the call graph for this function:

static boolean opgetlinetext boolean  flmapchars,
handlestream textstream,
short level,
Handle htext
[static]
 

Definition at line 730 of file oppack.c.

References athandlestreameof(), chlinefeed, chnul, chreturn, chspace, chtab, closehandlestream(), ct, disposehandle(), divround(), handlestream::eof, fl, lenbigstring, max, min, newhandle(), openhandlestream(), pushdiskchar(), short, skiphandlestreamchars(), and writehandlestreamchar().

Referenced by optextscraptooutline(), and opunpacktexttooutline().

Here is the call graph for this function:

boolean opoutlinetonewtextscrap hdloutlinerecord  houtline,
Handle htext
 

Definition at line 1355 of file oppack.c.

References disposehandle(), newgrowinghandle(), nil, and opoutlinetotextscrap().

Referenced by meexportscrap(), opexportscrap(), and tableexportscrap().

Here is the call graph for this function:

static boolean opoutlinetotable hdlheadrecord  hnode,
handlestream packstream,
long ctbytes
[static]
 

Definition at line 221 of file oppack.c.

References handlestream::eof, hnode, opsiblingvisiter(), outtablevisit(), and tyoppackinfo::packstream.

Referenced by oppack().

Here is the call graph for this function:

static boolean opoutlinetotext hdlheadrecord  hnode,
handlestream textstream,
long ctbytes
[static]
 

Definition at line 419 of file oppack.c.

References tyoppackinfo::flpackcomments, hnode, opsiblingvisiter(), outtextvisit(), and tyoppackinfo::packstream.

Referenced by oppack().

Here is the call graph for this function:

boolean opoutlinetotextscrap hdloutlinerecord  houtline,
boolean  flomitcomments,
Handle  htext
 

Definition at line 1336 of file oppack.c.

References closehandlestream(), fl, openhandlestream(), and opoutlinetotextstream().

Referenced by menuverbpacktotext(), metextualizerefconroutine(), opoutlinetonewtextscrap(), and opverbpacktotext().

Here is the call graph for this function:

boolean opoutlinetotextstream hdloutlinerecord  houtline,
boolean  flomitcomments,
handlestream s
 

Definition at line 1307 of file oppack.c.

References fl, tyoppackinfo::flpackcomments, oppopoutline(), oppushoutline(), opsiblingvisiter(), opwriteeditbuffer(), outscrapvisit(), and tyoppackinfo::packstream.

Referenced by opgetlangtext(), and opoutlinetotextscrap().

Here is the call graph for this function:

boolean oppack Handle hpackedoutline  ) 
 

Definition at line 453 of file oppack.c.

References BIGSTRING, clearbytes(), closehandlestream(), diskgetfontname(), disposehandle(), handlestream::eof, h, memlongtodiskwords, moveleft(), newgrowinghandle(), nil, openhandlestream(), opgetnodeline(), opoutlinetotable(), opoutlinetotext(), oppopallhoists(), oprestorehoists(), opversionnumber, opwriteeditbuffer(), outlinedata, handlestream::pos, recttodiskrect(), and writehandlestream().

Referenced by mepackmenustructure(), oppacklist(), oppackoutline(), opwinsavefile(), and packrecord().

Here is the call graph for this function:

boolean oppackoutline hdloutlinerecord  houtline,
Handle hpackedoutline
 

Definition at line 626 of file oppack.c.

References fl, oppack(), oppopoutline(), and oppushoutline().

Referenced by mepackscriptvisit(), mesaveoutline(), opexportscrap(), opverbpackoutline(), scriptexportscrap(), and tableexportscrap().

Here is the call graph for this function:

static boolean optabletooutline handlestream packstream,
hdlheadrecord  hsummit
[static]
 

Definition at line 700 of file oppack.c.

References intablevisit(), opsiblingvisiter(), and tyoppackinfo::packstream.

Referenced by opunpackversion2().

Here is the call graph for this function:

boolean optextscraptooutline hdloutlinerecord  houtline,
Handle  htext,
hdlheadrecord hnode
 

Definition at line 1176 of file oppack.c.

References clearindentvalues(), closehandlestream(), down, fl, hnewnode, hnode, htree, left, nil, opdepositnewheadline(), opdisposestructure(), opendinternalchange(), openhandlestream(), opgetlinetext(), opnewstructure(), oprepeatedbump(), opstartinternalchange(), and right.

Referenced by opinitcallbacks(), and scripttexttooutlineroutine().

Here is the call graph for this function:

boolean opunpack Handle  hpackedoutline,
long ixload,
hdloutlinerecord houtline
 

Definition at line 1083 of file oppack.c.

References BIGSTRING, closehandlestream(), fl, hibyte, idbadopversionnumber, newoutlinerecord(), nil, opdisposeoutline(), openhandlestream(), oppopoutline(), oppushoutline(), opunpackversion2(), opversionnumber, handlestream::pos, readhandlestream(), shellerrormessage(), shellinternalerror, STR_bad_outline_version_number, and testheapspace().

Referenced by meloadoutline(), meloadscriptoutline(), meunpackmenustructure(), meunpackscriptvisit(), opunpackoutline(), opverbinmemory(), opverbmemoryunpack(), opwinloadfile(), tableunpackformats(), and unpackrecord().

Here is the call graph for this function:

boolean opunpackoutline Handle  hpackedoutline,
hdloutlinerecord houtline
 

Definition at line 1168 of file oppack.c.

References opunpack().

Referenced by opscraphook(), opunpacklist(), scriptscraphook(), and tablescraphook().

Here is the call graph for this function:

static boolean opunpacktexttooutline long  platform,
handlestream packstream,
hdlheadrecord hnode
[static]
 

Definition at line 872 of file oppack.c.

References clearindentvalues(), down, fl, h, hnewnode, hnode, left, nil, opdepositnewheadline(), opdisposestructure(), opendinternalchange(), opgetlinetext(), opnewstructure(), oprepeatedbump(), opstartinternalchange(), and right.

Referenced by opunpackversion2().

Here is the call graph for this function:

static boolean opunpackversion2 handlestream packstream  )  [static]
 

Definition at line 942 of file oppack.c.

References blackcolor, boolean, config, tyconfigrecord::defaultfont, tyconfigrecord::defaultsize, diskgetfontnum(), diskrecttorect(), diskwordstomemlong, handlestream::eof, fl, flatdown, isemptystring, tyoutlinerecord::linespacing, macplatform, oprepeatedbump(), opsetctexpanded(), opsetexpandedbits(), opsetsummit(), optabletooutline(), opunpacktexttooutline(), outlinedata, popport(), popstyle(), handlestream::pos, pushscratchport(), pushstyle(), readhandlestream(), sizeof(), and whitecolor.

Referenced by opunpack().

Here is the call graph for this function:

static boolean outscrapvisit hdlheadrecord  hnode,
ptrvoid  refcon
[static]
 

Definition at line 1269 of file oppack.c.

References assert, closehandlestream(), h, hnode, nil, openhandlestream(), outlinedata, and outtextvisit().

Referenced by opoutlinetotextstream().

Here is the call graph for this function:

static boolean outtablevisit hdlheadrecord  hnode,
ptrvoid  refcon
[static]
 

Definition at line 162 of file oppack.c.

References appbit0, appbit1, clearbytes(), flbreakpoint, flcomment, flexpanded, fllocked, flopenwindow, gethandlesize(), hnode, sizeof(), writehandlestream(), and writehandlestreamhandle().

Referenced by opoutlinetotable().

Here is the call graph for this function:

static boolean outtextvisit hdlheadrecord  hnode,
ptroppackinfo  packinfo
[static]
 

Definition at line 376 of file oppack.c.

References bigstring, chreturn, chtab, error, filledstring(), hnode, opnestedincomment(), writehandlestreamchar(), writehandlestreamhandle(), and writehandlestreamstring().

Referenced by opoutlinetotext(), and outscrapvisit().

Here is the call graph for this function:

static boolean pushdiskchar byte  ch,
handlestream deststream
[static]
 

Definition at line 250 of file oppack.c.

References bsellipses, writehandlestreamchar(), and writehandlestreamstring().

Referenced by opgetlinetext().

Here is the call graph for this function:


Variable Documentation

short firstindent [static]
 

Definition at line 716 of file oppack.c.

boolean fltabindent [static]
 

Definition at line 718 of file oppack.c.

short outscraplevel = 0 [static]
 

Definition at line 1266 of file oppack.c.

short spacesforlevel [static]
 

Definition at line 714 of file oppack.c.


Generated on Thu Jun 8 10:11:36 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6