256 lines
5.1 KiB
Plaintext
256 lines
5.1 KiB
Plaintext
/* Generated by Ctran from scrlay.cat */
|
|||
|
|
#define SCRLAY_G
|
||
|
|
#ifndef OLIB_G
|
||
|
|
#include <olib.g>
|
||
|
|
#endif
|
||
|
|
#ifndef P_GRAF_H
|
||
|
|
#include <p_graf.h>
|
||
|
|
#endif
|
||
|
|
/* Class Numbers */
|
||
|
|
#define C_SCRLAY 0
|
||
|
|
#define C_PRNLAY 1
|
||
|
|
/* Method Numbers */
|
||
|
|
#define O_SL_FORMAT_LINE 9
|
||
|
|
#define O_SL_POS_TO_XL 5
|
||
|
|
#define O_SL_SCROLL 10
|
||
|
|
#define O_SL_PARA_CHANGED 14
|
||
|
|
#define O_SL_RESCALE 15
|
||
|
|
#define O_SL_LINE_ENDS 4
|
||
|
|
#define O_SL_SET 2
|
||
|
|
#define O_SL_SET_LINES 13
|
||
|
|
#define O_SL_INIT 1
|
||
|
|
#define O_SL_PRINT_POS 17
|
||
|
|
#define O_SL_VIEW 11
|
||
|
|
#define O_SL_BEGIN_READ 7
|
||
|
|
#define O_SL_SENSE 3
|
||
|
|
#define O_SL_READ 8
|
||
|
|
#define O_SL_PRINT_READ 16
|
||
|
|
#define O_SL_XL_TO_POS 6
|
||
|
|
#define O_SL_DISCARD_LAYOUT 12
|
||
|
|
/* Constants for scrlay */
|
||
|
|
#define SCRLAY_SYM_HARD_HYPHEN 7
|
||
|
|
#define SCRLAY_SYM_SOFT_HYPHEN 14
|
||
|
|
#define SCRLAY_SYM_HARD_SPACE 15
|
||
|
|
#define SCRLAY_SYM_SHOW_SPACE 8
|
||
|
|
#define SCRLAY_SHOW_TABS 0x01
|
||
|
|
#define SCRLAY_SHOW_SPACES 0x02
|
||
|
|
#define SCRLAY_SHOW_CRS 0x04
|
||
|
|
#define SCRLAY_SHOW_HYPHENS 0x08
|
||
|
|
#define SCRLAY_SHOW_LFS 0x10
|
||
|
|
#define SCRLAY_WIDOW_ORPHAN 0x20
|
||
|
|
#define SCRLAY_ALIGN_LEFT 0
|
||
|
|
#define SCRLAY_ALIGN_RIGHT 1
|
||
|
|
#define SCRLAY_ALIGN_CENTRE 2
|
||
|
|
#define SCRLAY_ALIGN_JUSTIFY 3
|
||
|
|
#define SCRLAY_REPEAT_TAB 3
|
||
|
|
#define SCRLAY_NTABS_MAX 8
|
||
|
|
#define SCRLAY_SCAN_POS 0
|
||
|
|
#define SCRLAY_SCAN_XY 1
|
||
|
|
#define SCRLAY_SCAN_LINE 2
|
||
|
|
#define SCRLAY_SPACING_KEEP_NEXT 0x01
|
||
|
|
#define SCRLAY_SPACING_KEEP_TOGETHER 0x02
|
||
|
|
#define SCRLAY_SPACING_NEW_PAGE 0x04
|
||
|
|
#define SCRLAY_TBOX_TAB 0x8000
|
||
|
|
#define SCRLAY_TBOX_TAB_USED 0x4000
|
||
|
|
#define SCRLAY_TBOX_TAB_LEFT 0x2000
|
||
|
|
#define SCRLAY_TBOX_NO_STYLE 0x1000
|
||
|
|
#define SCRLAY_TBOX_MASK_LEN 0xff
|
||
|
|
/* Types for scrlay */
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int x;
|
||
|
|
unsigned short int type;
|
||
|
|
} SCRLAY_TABSTOP;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int ntab;
|
||
|
|
SCRLAY_TABSTOP tab[SCRLAY_NTABS_MAX];
|
||
|
|
} SCRLAY_TABS;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int left;
|
||
|
|
unsigned short int right;
|
||
|
|
unsigned short int indent;
|
||
|
|
unsigned short int align;
|
||
|
|
} SCRLAY_MARGINS;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int line;
|
||
|
|
unsigned short int above;
|
||
|
|
unsigned short int below;
|
||
|
|
unsigned short int flags;
|
||
|
|
} SCRLAY_SPACING;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int fid;
|
||
|
|
unsigned short int style;
|
||
|
|
unsigned short int height;
|
||
|
|
} SCRLAY_FONT;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int pos;
|
||
|
|
short int printer;
|
||
|
|
char *buf;
|
||
|
|
short int blen;
|
||
|
|
} SCRLAY_SENSECHARS;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_MARGINS *margins;
|
||
|
|
SCRLAY_TABS *tabs;
|
||
|
|
SCRLAY_SPACING *spacing;
|
||
|
|
} SCRLAY_PDATA;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_FONT font;
|
||
|
|
unsigned short int align;
|
||
|
|
char *buf;
|
||
|
|
short int blen;
|
||
|
|
} SCRLAY_PLABEL;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int len;
|
||
|
|
void *content;
|
||
|
|
short int sensechars;
|
||
|
|
short int sensepdata;
|
||
|
|
short int senseplabel;
|
||
|
|
short int toparst;
|
||
|
|
short int enqpage;
|
||
|
|
} SCRLAY_DOC;
|
||
|
|
typedef struct que_tbox
|
||
|
|
{
|
||
|
|
struct scrlay_tbox *next;
|
||
|
|
struct scrlay_tbox *prev;
|
||
|
|
} QUE_TBOX;
|
||
|
|
typedef struct scrlay_tbox
|
||
|
|
{
|
||
|
|
QUE_TBOX hd;
|
||
|
|
short int width;
|
||
|
|
unsigned short int tlen;
|
||
|
|
} SCRLAY_TBOX;
|
||
|
|
typedef struct que_line
|
||
|
|
{
|
||
|
|
struct scrlay_line *next;
|
||
|
|
struct scrlay_line *prev;
|
||
|
|
} QUE_LINE;
|
||
|
|
typedef struct scrlay_line
|
||
|
|
{
|
||
|
|
QUE_LINE hd;
|
||
|
|
QUE_TBOX tboxs;
|
||
|
|
short int indent;
|
||
|
|
unsigned short int len;
|
||
|
|
unsigned char islast;
|
||
|
|
unsigned char new_page;
|
||
|
|
} SCRLAY_LINE;
|
||
|
|
typedef struct que_para
|
||
|
|
{
|
||
|
|
struct scrlay_para *next;
|
||
|
|
struct scrlay_para *prev;
|
||
|
|
} QUE_PARA;
|
||
|
|
typedef struct scrlay_para
|
||
|
|
{
|
||
|
|
QUE_PARA hd;
|
||
|
|
QUE_LINE lines;
|
||
|
|
} SCRLAY_PARA;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned short int pos;
|
||
|
|
short int line;
|
||
|
|
short int x;
|
||
|
|
} SCRLAY_PLX;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
short int scan;
|
||
|
|
SCRLAY_PLX test;
|
||
|
|
SCRLAY_PLX pbeg;
|
||
|
|
SCRLAY_PLX lbeg;
|
||
|
|
SCRLAY_PLX tbeg;
|
||
|
|
SCRLAY_TBOX *pt;
|
||
|
|
SCRLAY_LINE *pl;
|
||
|
|
SCRLAY_PARA *pp;
|
||
|
|
} SCRLAY_SCAN;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_PLABEL *label;
|
||
|
|
SCRLAY_FONT f;
|
||
|
|
unsigned short int width;
|
||
|
|
unsigned short int indent;
|
||
|
|
unsigned char blen;
|
||
|
|
unsigned char isfirst;
|
||
|
|
unsigned char islast;
|
||
|
|
unsigned char new_page;
|
||
|
|
} SCRLAY_READ;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_PARA *pp;
|
||
|
|
SCRLAY_LINE *pl;
|
||
|
|
SCRLAY_TBOX *pt;
|
||
|
|
unsigned short int pos;
|
||
|
|
} SCRLAY_RD;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_PARA *pp;
|
||
|
|
unsigned short int pos;
|
||
|
|
short int line;
|
||
|
|
unsigned short int pend;
|
||
|
|
short int lend;
|
||
|
|
} SCRLAY_FMT;
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
unsigned char options;
|
||
|
|
unsigned char printer;
|
||
|
|
SCRLAY_PDATA pd;
|
||
|
|
SCRLAY_FONT *font;
|
||
|
|
unsigned char *fwtab;
|
||
|
|
unsigned short int scrpwidth;
|
||
|
|
SCRLAY_FONT *sfont;
|
||
|
|
} SCRLAY_STYLE;
|
||
|
|
/* Property of scrlay */
|
||
|
|
typedef struct {
|
||
|
|
QUE_PARA paras;
|
||
|
|
SCRLAY_PLX first;
|
||
|
|
unsigned char nomemory;
|
||
|
|
unsigned char adjust;
|
||
|
|
SCRLAY_SCAN *scan;
|
||
|
|
SCRLAY_RD rd;
|
||
|
|
SCRLAY_FMT fmt;
|
||
|
|
SCRLAY_DOC doc;
|
||
|
|
short int slines;
|
||
|
|
short int spadjust;
|
||
|
|
SCRLAY_STYLE st;
|
||
|
|
} PRS_SCRLAY;
|
||
|
|
typedef struct pr_scrlay
|
||
|
|
{
|
||
|
|
PRS_ROOT root;
|
||
|
|
PRS_SCRLAY scrlay;
|
||
|
|
} PR_SCRLAY;
|
||
|
|
/* Types for prnlay */
|
||
|
|
typedef struct
|
||
|
|
{
|
||
|
|
SCRLAY_PLABEL s;
|
||
|
|
unsigned char *wid;
|
||
|
|
unsigned short int margin;
|
||
|
|
unsigned short int gutter;
|
||
|
|
} PRNLAY_PLABEL;
|
||
|
|
/* Property of prnlay */
|
||
|
|
typedef struct {
|
||
|
|
short int tbxlen;
|
||
|
|
short int senselen;
|
||
|
|
char *sensebuf;
|
||
|
|
unsigned short int pos;
|
||
|
|
short int line;
|
||
|
|
short int nlines;
|
||
|
|
short int below;
|
||
|
|
short int excess;
|
||
|
|
short int ngaps;
|
||
|
|
short int ngap;
|
||
|
|
short int used;
|
||
|
|
SCRLAY_TBOX *ptab;
|
||
|
|
short int plabel;
|
||
|
|
} PRS_PRNLAY;
|
||
|
|
typedef struct pr_prnlay
|
||
|
|
{
|
||
|
|
PRS_ROOT root;
|
||
|
|
PRS_SCRLAY scrlay;
|
||
|
|
PRS_PRNLAY prnlay;
|
||
|
|
} PR_PRNLAY;
|