/* ============================================= = MODULE: SLATE.H = = VERSION: 2.2.8 = = = = LOGON: Definitions & Limits = = = = SYSTEM: SLATELIB = = SYSVERS: 2.2.10 = = CREATED: 26AUG86 = = UPDATED: 06JAN93 = = = = (c) 1986-93 = = BY: The Symmetry Group = ============================================= FUNCTION: Include file for the SLATE Universal Printer Driver System. HISTORY: VERS DATE BY NOTES 1.00.X 26 Aug 86 CVP Created. 1.10.X 18 Feb 88 CVP Added support for PARALLEL, SERIAL, FILE, and SPOOL printers (changed the DEV and FONT structures). Consolidate Printer Interface Routines. Add support for UNLOAD Font. Add SLATE Open flag. Add SPOOL and s_sdata. 2.00.X 17 Oct 88 CVP Total rewrite. 2.0.0a 24 Feb 89 CVP Combine with SL_FUNC.H 2.0.0C 03 Apr 89 CVP -Add Move Up to VERT -Remove VUP and VDOWN from FINE -Remove FINE from PDBUF and add only the functions necessary. Dummy out extra space. 2.0.0D 15 May 89 CVP -Add cast to sl_vlset & sl_vlget. 23 Jun 89 CVP -Update HORZ -Add SL_ABRT() 2.0.0 11 Jul 89 CVP -Include stdtyp.h 2.0.1 11 Aug 89 CVP -Fix bug in sl_epget macro 2.0.4 31 Oct 89 CVP -Unterminated comment -Change char to uchar in XLATE, OVER, and KERN and parameters in xl_xla, sl_kern, and sl_over. 2.0.7 21 Feb 90 CVP -Correct Serial Data (Parity). 2.1.0 28 Sep 89 CVP -Add Graphics Mode 2.1.0B 15 May 90 CVP -Add Link Controls 2.1.2 26 Jul 90 CVP -Add sl__hmin, hmax, vnin, vmax and remove sl__hblk, vblk. -Add Register Centered. -Set sl_plen and sl_pwid in sl_plset() and sl_pwset(). 31 Jul 90 CVP -Add Underline Setup pointer. -Additional Font Spacing and Style -Additional Block Print Type. -Additional Bin Select Types. 2.1.3 31 Aug 90 CVP -Add GDBUF.csel (Color Select). 2.1.3B 15 Oct 90 CVP -Change name to sl_pfld(). -Add Code to String Lookup. -Add code to string macros. 2.1.4 13 Nov 90 CVP -Move FXBUF typedef to sfile.h. -Change SBUF to SLBUF. -Change String Buffer Macros. 2.2.0A 21 Nov 90 CVP -Scale Font extensions. 20 Dec 90 CVP -Add Font Metrics data to Printer Detail. -Add Setup Strings. -Add SELFILE, SELEND, LIT, & LITCHR to the PDBUF specification. 08 Mar 91 CVP -Remove most default load functions (Width, Download, etc) and use Load Functions. -Add sl_hngt(), sl_hmget(), sl_vnget(), sl_vmget() macros. 12 Apr 91 CVP -Add Duplex Globals. -Add additional graphics bit ordering. 2.2.0B 11 May 91 CVP -Correct sl_sdget(). 2.2.0C 10 Jun 91 CVP -Change GDBUF->pixorder. 03 Jul 91 CVP -Change XLATE, OVER, and KERN. -Add SCONV typedef. 2.2.0E 17 Aug 91 CVP -Download table public. 03 Sep 91 CVP -Use new Prototype Macros. 2.2.2 07 Nov 91 CVP -Add "Form Feed" field to PDBUF. 2.2.3 20 Jan 92 CVP -Add sl_gdbuf.ctype==4 scan. 2.2.5 06 Mar 92 CVP -Remove unused prototype. 2.2.6 11 Mar 92 CVP -Print Image Queue to SMEM Buffer. -Consolidate all images to SMEM Buffer. -Create Macros for obsolete Image functions. -Add sl_dxset() prototype. -Allow negative Paper Sources. -Define sl_drtbl (omitted earlier); 2.2.6B 01 May 92 CVP -Add second Palette Table to IMTBL. 2.2.6C 29 Jul 92 CVP -Modify prototyping. 2.2.7 07 Dec 92 CVP -Add SH_BEGIN & SH_END. -Add parameters to all global and typedef function pointers. 2.2.8 06 Jan 93 CVP -Add IMTBL.imrst. -Add sl_tsset(). -Change sl_fwbuf to ushort. -Add Genus support. -Add MetaGraphics support. -Add Barcode support. -Add Prescale factor for scaling TrueType. 19 Feb 93 CVP -Add su_gdbuf.multi. EJECT SECTION "Include Files"*/ #include "stdtyp.h" /*Standard Types*/ SH_HBEGIN /*EJECT SECTION "Limits & Sizes" [STATIC] TYPE NAME; COMMENT */ #define NENV 10 /*Number of Environments*/ #define NFONT 30 /*Number of Fonts*/ #define NOVER 128 /*Number of Overstrike Characters*/ #define NKERN 256 /*Number of Kern Pairs*/ #define DSBLEN 128 /*Device String Buffer Length*/ #define DSHLEN 4 /*Device String Handles*/ #define PSBLEN 256 /*Printer String Buffer Length*/ #define PSHLEN 35 /*Printer String Handles*/ #define FSBLEN 128 /*Font String Buffer Length*/ #define FSHLEN 12 /*Font String Handles*/ #define GSBLEN 256 /*Graphics String Buffer Length*/ #define GSHLEN 9 /*Graphics String Handles*/ #define DLLEN 32 /*Download Table Length*/ #define NFDTBL 12 /*Number of Font Detail Tbl Entries*/ #define NCSET 5 /*Number of Character Set Codes*/ #define NSIM 10 /*Number of SIM Images*/ #define NVID 10 /*Number of VID Images*/ #define NFILL 10 /*Number of FILL Images*/ #define NPIMAGE 10 /*Number of Print Images*/ #define NBPIMAGE 25 /*Number of Print Images (Block Print)*/ #define NPATTERN 10 /*Number of Patterns*/ #define NCOLOR 10 /*Number of Color Tables*/ #define NCP 4 /*Number of Color Planes*/ #define PBLEN 64 /*Printer Output Buffer Length*/ /*EJECT SECTION "Special TYPEDEFS" [EXTERN] TYPE NAME; COMMENT */ /*** This is a duplicate from SUTIL ***/ #ifndef SCFLG #define SCFLG 1 typedef struct /*String/Code Lookup Table*/ {long start; /*Starting Number or return code*/ long end; /*Ending Number 0 for end of table*/ char *string; /*String NULL to use number*/ }SCTBL; #endif /*EJECT SECTION "Printer Database TYPEDEFS - System & Details" [EXTERN] TYPE NAME; COMMENT */ #ifndef S_NOTDEF /*** No Type Definitions? ***/ typedef struct /*Slate System Data Buffer*/ {ushort vers; /*PDB File Format Version*/ char system[20]; /*System Name*/ }SLBUF; typedef struct /*Setup String/Search Path*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ ushort code; /*String Code*/ char string[80]; /*Setup String/Search Path*/ }TSBUF; typedef struct /*Horizontal Data*/ {ushort type; /*Horizontal Positioning Type 0 Move Right Relative 1 Abs Right from Offset 2 Absolute from Offset 3 Absolute from Base*/ ushort cmd; /*Horizontal Command String*/ long cunit; /*Horizontal Command Unit*/ ushort cmax; /*Horizontal Command Max Units*/ ushort crcmd; /*Carrage Return Command String*/ }HORZ; typedef struct /*Vertical Position*/ {ushort type; /*Vertical Positioning Type 0 Relative Down 1 Rel Down/Up (in pg) 2 Relative Down/Up 3 Abs Down from Offset 4 Absolute from Offset 5 Absolute from Base*/ ushort cmd; /*Vertical Command String*/ long cunit; /*Vertical Command Unit*/ ushort cmax; /*Vertical Command Max Units*/ ushort ucmd; /*Vertical Up Command String*/ long ucunit; /*Vertical Up Command Unit*/ ushort ucmax; /*Vertical Up Command Max Units*/ long ulimit; /*Vertical Up Limit*/ }VERT; typedef struct /*Fine Positioning Data*/ {ushort type; /*Horizontal Leading Type 0 Use Positioning 1 Use Continuous Leading 2 Use Character Leading 3 Use HMI */ long dlead; /*Default Leading*/ ushort cmd; /*Horizontal Leading Command String*/ long cunit; /*Horz Lead Command Unit*/ ushort cmax; /*Horx Lead Command Max Units*/ long pre; /*Pre Font Horz Adjust*/ long post; /*Post Font Horz Adjust*/ long voff; /*Character Vert Offset*/ }FINE; /*EJECT SECTION "Printer Database TYPEDEFS - Devices" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Device Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort code; /*Device Code*/ char func[20]; /*Function/Comment*/ /*** Printer Data ***/ char mfg[20]; /*Printer Mfg*/ char type[20]; /*Printer Type*/ }DBUF; typedef struct /*Device Detail Buffer*/ {/*** Printer Connection ***/ ushort ctype; /*Connection Type 0 Parallel via BIOS 1 Serial via BIOS 2 Device/File via DOS 3 PRINT Spool via DOS 4 Novel Network via NETWARE 5 Network via NETBIOS */ ushort port; /*Parallel/Serial/Printer#*/ ushort name; /*File/Device Name*/ ushort sel; /*Select String Index*/ /*see below for selfile & selend*/ ushort desel; /*Deselect String Index*/ ushort sbaud; /*Baud Rate 0 110 1 150 2 300 3 600 4 1200 5 2400 6 4800 7 9600 */ ushort slen; /*Serial Word Length 0 7 bits 1 8 bits */ ushort sstop; /*Serial Stop Bits 0 1 bits 1 2 bits */ ushort spar; /*Serial Parity 0 None 1 Odd 2 None 3 Even */ /*** Paper Setup ***/ long voff; /*Vertical Offset*/ long hoff; /*Horz Offset*/ long plen; /*Page Length*/ long pwid; /*Page Width*/ /*** Default Setup ***/ long tmar; /*Top Margin*/ long bmar; /*Bottom Margin*/ long lmar; /*Left Margin*/ long rmar; /*Right Margin*/ long height; /*Line Spacing*/ ushort font; /*Default Font*/ ushort delay; /*Timeout Delay*/ short sources; /*Paper Sources -2 - Manual Feed w Prompt -1 - Manual Feed 0 - Cont/Fixed Bins 1 - 1 Bin/Tray 2 - 2 Bins/Trays 3 - 3 Bins/Trays 4 - 4 Bins/Trays*/ ushort cart1; /*Cartridge Code 0 - No Cartridge <0 - Last 5 digits of code >0 - Two ASCII Characters (FFFF Any Cartridge)*/ ushort cart2; /*Cartridge Code 0 - No Cartridge <0 - Last 5 digits of code >0 - Two ASCII Characters */ ushort ribbon; /*Printer Ribbon 0 - Black (White) 1 - Black/Red (White) 2 - Red Green Blue (Video) 3 - Cyan Yellow Magenta (Process) 4 - CYM Black (Process)*/ }DDBUF; /*EJECT SECTION "Printer Database TYPEDEFS - Printers" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Printer Manufacturer Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ char mfg[20]; /*Printer Manufacturer*/ }PMBUF; typedef struct /*Printer Type Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Lengtn*/ char type[20]; /*Printer Type*/ char note[20]; /*Notes*/ char data[16]; /*Data Source*/ char test[6]; /*Test Status*/ }PTBUF; typedef struct /*Printer Data Buffer*/ {ushort sel; /*Printer Select*/ ushort desel; /*Printer Deselect*/ ushort uon; /*Underline On String*/ ushort uoff; /*Underline Off String*/ /*Horizontal*/ long hbase; /*Absolute Position Base*/ long hblank; /*Unprintable Space from Edge*/ long hprint; /*Printable Space from Blank*/ /*Vertical*/ long vbase; /*Absolute Position Base*/ long vblank; /*Unprintable Space from Top*/ long vprint; /*Printable Space from Blank*/ long flen; /*Form Length*/ /*Positioning*/ HORZ horz; /*Printer Horz Data*/ VERT vert; /*Printer Vert Data*/ /*Leading (FINE)*/ ushort ltype; /*Horizontal Leading Type 0 Use Positioning 1 Use Continuous Leading 2 Use Character Leading 3 Use HMI */ ushort lcmd; /*Horizontal Leading Command String*/ long lcunit; /*Horz Lead Command Unit*/ ushort lcmax; /*Horz Lead Command Max Units*/ ushort fvreg; /*Form Vertical Registration 0 Register from Top 1 Register from Bottom 2 Register Centered*/ long fwid; /*Form Width*/ ushort fhreg; /*Form Horz Registration 0 Register from Left 1 Register from Right 2 Register Cectered*/ /*Paper Control*/ ushort ptype; /*Paper Source Select 0 None 1 Opt Eject & Load from Source 2 Eject & Load from Source 3 Opt Load from Source, Print & Eject 4 Load from Source, Print & Eject 5 Opt Select (Load) 6 Select (Load)*/ ushort source[5]; /*Paper Source Strings (0=reset)*/ ushort copies; /*Number of copies*/ ushort pmax; /*Paper Command Max Copies*/ /*Print Color Control*/ ushort color[8]; /*Print Color*/ /*Print Block Control*/ ushort btype; /*Print Block type 0 None 1 At Top Left (no pos chg), send Vert, Horz, Density 2 Top Left-VERT[dens], Bottom Right-HORZ*/ long bunit; /*Size Unit*/ ushort bmax; /*Size Max Units*/ ushort bvert; /*Vertical Size String*/ ushort bhorz; /*Horizontal Size String*/ ushort bdens; /*Density*/ ushort x1; /*Unused*/ ushort form; /*Form Length Command*/ long funit; /*Form Length Unit*/ ushort fmax; /*Form Length Max Units*/ ushort vdotm; /*Vertical Dot Spacing (mult)*/ ushort vdotd; /*Vertical Dot Spacing (divide)*/ ushort hdotm; /*Horizontal Dot Spacing (mult)*/ ushort hdotd; /*Horizontal Dot Spacing (divide)*/ ushort ftype; /*Font Language Type 0 Unknown 1 PCL (1 byte Font Code) 2 PCL (2 byte Font Code) 3 PostScript 4 TrueType*/ long smin; /*Minimum Scale Size*/ long smax; /*Maximum Scale Size 0 Not Scalable*/ ushort selfile; /*Select File to load Index*/ ushort selend; /*Select End String Index*/ ushort lit; /*Literalizing String*/ ushort litchr; /*Characters to literalize*/ /*Duplex Control*/ ushort dpxsel; /*Duplex Select*/ ushort dpxdesel; /*Duplex Deselect*/ ushort dfvreg; /*Duplex Front Vertical Registration 0 Register from Top 1 Register from Bottom 2 Register Centered*/ ushort dfhreg; /*Duplex Front Horz Registration 0 Register from Left 1 Register from Right 2 Register Centered*/ ushort dbvreg; /*Duplex Back Vertical Registration 0 Register from Top 1 Register from Bottom 2 Register Centered*/ ushort dbhreg; /*Duplex Back Horz Registration 0 Register from Left 1 Register from Right 2 Register Centered*/ ushort ffeed; /*Form Feed Cmd String*/ }PDBUF; /*EJECT SECTION "Printer Database TYPEDEFS - Fonts" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Font Copy Buffer*/ /*Fonts to be copied from other*/ /*Printers. */ {char mfg[20]; /*Printer Mfg*/ char type[20]; /*Printer Type*/ ushort sfont; /*Starting Font*/ ushort efont; /*Ending Font*/ }FCBUF; typedef struct /*Font Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort code; /*Font Code*/ ushort oren; /*Orentation 0 - Portrait 1 - Landscape*/ short space; /*Spacing -10- Ultra Expanded (Proportional) -9 - Extra Expanded (Proportional) -8 - Ultra Comp (Proportional) -7 - Extra Comp (Proportional) -6 - Compressed (Proportional) -5 - Condensed (Proportional) -4 - Expanded (Proportional) -3 - Proportional -2 - 5cpi -1 - 8cpi 0 - 10cpi 1 - 12cpi 2 - 15cpi 3 - 16cpi 4 - 17cpi 5 - 20cpi 6 - 22cpi 7 - 25cpi 8 - 27cpi*/ ushort style; /*Printing Style 0 Upright (roman) 1 Italic 2 Slant 3 Superscript 4 Subscript 5 Outline 6 Shadow 7 Shadow/Outline*/ short weight; /*Stroke Weight (see sl_fdata.c) -7 Ultra Thin -5 Thin -3 Light 0 Medium 3 Bold 5 Black 7 Ultra Black*/ ushort face; /*Typeface (see sl_fdata.c)*/ ushort size; /*Type Size*/ ushort cset; /*Characeter Set (see sl_fdata.c) 0 7 Bit ASCII 1 IBM Set 1 2 IBM Set 2 3 Epson Std 4 HP Roman 8 5 PS Standard 6 Windows 25 Special*/ ushort req; /*Required Capabilities 020H - Font Download Required 040H - Font Width Required 080H - Font Translate Required 100H - Font Overstrike Required 2000H - Font Scaling Required*/ short cart; /*Cartridge Code 0 - Resident 1 - Default Cartridge (OK if no cartridge) <0 - Last 5 digits of code >0 - Two ASCII Characters */ }FBUF; typedef struct /*Font Detail Buffer*/ {long wunit; /*Width Unit*/ long height; /*Font Height*/ long depth; /*Font Depth*/ ushort sel; /*Select String Index*/ ushort desel; /*Deselect String Index*/ }FDBUF; typedef uchar FWBUF; /*Character Width Table*/ typedef ushort NFWBUF; /*New Character Width Table*/ typedef struct /*Translate Control*/ {uchar rchr; /*Replacement Character*/ }XLATE; typedef struct /*Overstrike Control*/ {uchar tchr; /*Test Character*/ uchar ochr; /*Overstrike Character*/ tiny hoff; /*Horizontal Offset (%)*/ tiny voff; /*Vertical Offset (%)*/ }OVER; typedef struct /*Kerning Control*/ {uchar chr1; /*First Character*/ uchar chr2; /*Second Character*/ tiny kern; /*Kern Adjustment (% em)*/ }KERN; typedef struct /*Download Control*/ {ushort start; /*Start String*/ ushort end; /*End String*/ ushort file; /*File & Path String*/ ushort unload; /*Unload String*/ ushort type; /*Download Type 0 - Delayed Load 1 - Load Immediate 2 - Permanent Download*/ ushort ftype; /*File Type 0 - Direct Copy 1 - PS Binary*/ }LOAD; typedef struct /*Scaling Control*/ {ushort type; /*Scale Type 0 - Round at 0.5 1 - Round above 0.5 2 - Truncate 3 - HP Fixed Pitch 4 - HP TrueType*/ long mscale; /*Design Units/Dot (Multiply)*/ long dscale; /*Design Units/Dot (Divide)*/ long smin; /*Min Size (sp)*/ long smax; /*Max Size (sp)*/ long unit; /*Select Unit (sp)*/ ushort height; /*Height (design units)*/ ushort depth; /*Depth (design units)*/ ushort width; /*Width (design units) 0 with width table*/ long dot; /*Dot Width (sp)*/ short dlead; /*Default Leading (d'n units*/ short pre; /*Pre Font Horz Adjust (d'n units*/ short post; /*Post Font Horz Adjust (d'n units*/ short voff; /*Character Vert Offset (d'n units*/ short sadj; /*Size adjustment (from 100%)*/ long mpre; /*Prescale (Multiply)*/ long dpre; /*Prescale (Divide)*/ }FEBUF; typedef ushort FABUF; /*Scalable Character Width Table*/ /*EJECT SECTION "Printer Database TYPEDEFS - Char Conversion Table" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Character Set Conversion*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort tset; /*Translated Char Set*/ ushort aset; /*Actual Char Set*/ ushort qual; /*Conversion Quality*/ }SCONV; /*EJECT SECTION "Printer Database TYPEDEFS - Graphic Modes" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Graphic Mode Copy Buffer*/ /*Graphs to be copied from other*/ /*Printers. */ {char mfg[20]; /*Printer Mfg*/ char type[20]; /*Printer Type*/ ushort sgraph; /*Starting Graph*/ ushort egraph; /*Ending Graph*/ }GCBUF; typedef struct /*Graphic Mode Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort code; /*Graph Code*/ ushort hres; /*Horizontal Resolution (dpi)*/ ushort vres; /*Vertical Resolution (dpi)*/ }GBUF; typedef struct /*Graphic Mode Detail Buffer*/ {long hpix; /*Horizontal Pixel Spacing*/ long vpix; /*Vertical Pixel Spacing*/ ushort sel; /*Select String SSTR Handle*/ ushort desel; /*Deselect String SSTR Handle*/ ushort set; /*Set (Used as add)*/ ushort start; /*Start Row Transfer SSTR Hld*/ ushort end; /*End Row Transfer SSTR Hdl*/ ushort repeat; /*Send Repeat Data SSTR Hdl*/ ushort type; /*Scan & Transfer Type 0 - Print Character (Start) 1 - Print Block (+Start) 2 - Row/Col Start(cols)-Data-End 3 - Row/Col Start(bytes)-Data-End 4 - Row/Col Start-Data-End 5 - Row Start(pkts)-Data-End 6 - Row Start(bytes)-Data-End 7 - Row Start-Data-End 8 - Col Start(pkts)-Data-End 9 - Col Start(bytes)-Data-End 10 - Col Start-Data-End*/ ushort adj; /*Adjacent Pixels 0 - Adjacent Pixels Allowed 1 - Horz Adj Pixels not Allowed*/ ushort inter; /*Interlace*/ ushort pixpkt; /*Pixels per Packet (Column)*/ ushort bytepkt; /*Bytes per Packet (Column)*/ ushort bitbyte; /*Bits per Byte 0-7 Bits/Byte 10H Hex Output Flag*/ ushort pixord; /*Pixel Order in Byte 0 - LSB = Bot/Right 1 - LSB = Top/Left 2 - MSB = Bot/Right 3 - MSB = Top/Left*/ ushort byteord; /*Byte Order 0 - First Byte = Top/Left 1 - Last Byte = Top/Left*/ ushort intens; /*Intensity Bits*/ ushort intord; /*Intensity Order 0 - Darkest = Largest 1 - Lightest = Largest*/ ushort color; /*Colors 0 - (Use Device Ribbon) 1 - Black/Red (White) 1 - Red Green Blue (Video) 2 - Cyan Yellow Magenta (Process) 3 - CYM Black (Process)*/ ushort ctype; /*Color Type 0 - None 1 - Multi Pass Set Color 2 - Multi Pass Rotate Color Y->B 3 - Color Pixel 4 - Multi Pass Rotate Color B->Y*/ long voff; /*Vertical Offset to Top Pixel*/ ushort csel; /*Color Select SSTR Handle*/ ushort multi; /*Multiple Images 0 - All OK 1 - B/W OK 2 - Color OK*/ }GDBUF; /*EJECT SECTION "Data Storage Structures & TYPEDEFS" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Environment Structure*/ {long tmar; /*Top Margin (sp)*/ long bmar; /*Botton Margin (sp)*/ long lmar; /*Left Margin (sp)*/ long rmar; /*Right Margin (sp)*/ long height; /*Vertical Line Height (sp)*/ ushort umode; /*Underline Mode 0 no underline 1 underline printing char 2 underline continuous 3 strike through printing char 4 strike through continuous 5 UL & ST printing char 6 UL & ST continuous*/ long parm[10]; /*Extra User Parameters*/ long htab; /*Horizontal Tab Spacing*/ ushort color; /*Current Color*/ ushort kern; /*Kern Amount (%)*/ }EBUF; typedef struct /*Font Storage Ctrl*/ {short code; /*Storage Code 0 Empty 1 1000 Put Fonts -1 -1000 Push Fonts 1001 2000 Put Env Fonts -1001 -2000 Push Env Fonts -2001 -3000 Unload Fonts*/ ushort fcode; /*Font Code*/ ushort dmptr; /*Pointer*/ ushort status; /*Status*/ }FTBL; typedef struct /*Environment Storage Ctrl*/ {short code; /*Storage Code 0 Empty 1001 2000 Put Env -1001 -2000 Push Env*/ ushort dmptr; /*Pointer*/ ushort status; /*Status*/ }ETBL; typedef struct /*Font Detail Storage Control*/ {void* buf; /*Buffer*/ ushort len; /*Length*/ }FDTBL; typedef struct /*Printer Subroutine Table*/ {SH_PUBF(short, *open)(SH_ARG1(ushort)); /*Open Subroutine*/ SH_PUBF(short, *close)(SH_ARG1(void)); /*Close Subroutine*/ SH_PUBF(short, *out)(SH_ARG1(char)); /*Character Out Subroutine*/ SH_PUBF(short, *flush)(SH_ARG1(void)); /*Flush Buffer*/ }PTBL; /*EJECT SECTION "Printer Database TYPEDEFS - Conversion Tables" [EXTERN] TYPE NAME; COMMENT */ typedef struct /*Pattern Storage Ctrl*/ {short code; /*Storage Code 0 Empty*/ ushort hdl; /*SMEM Handle*/ ushort type; /*Pattern Type 0 Pattern 1 Dot Screen 2 Horz Line Screen 3 Vert Line Screen 4 Special Screen*/ ushort intens; /*Pattern Input Intensity (bits)*/ ushort color; /*Pattern Input Color planes*/ ushort width; /*Pattern Width (pixels)*/ ushort height; /*Pattern Height (pixels)*/ }PATTBL; typedef struct /*Pattern Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort code; /*Pattern Code*/ ushort type; /*Pattern Type 0 Pattern 1 Dot Screen 2 Horz Line Screen 3 Vert Line Screen 4 Special Screen*/ ushort intens; /*Intensity Bits*/ ushort color; /*Color Planes*/ }PATBUF; typedef struct /*Pattern Detail Buffer*/ {ushort wid; /*Width*/ ushort ht; /*Height*/ }PATDBUF; typedef struct /*Color Buffer*/ {ushort elem; /*Element*/ long dpos; /*Data Block Position*/ long dlen; /*Block Length*/ /*** Descriptive Data ***/ ushort code; /*Color Table Code*/ ushort imcolor; /*Image Color Type 0 - Black (White) 1 - Black/Red (White) 2 - Red Green Blue (Video) 3 - Cyan Yellow Magenta (Process) 4 - CYM Black (Process) 5 - YelRedBlueBlack*/ ushort imcp; /*Image Color Planes*/ ushort prncolor; /*Printer Color Type 0 - Black (White) 1 - Black/Red (White) 2 - Red Green Blue (Video) 3 - Cyan Yellow Magenta (Process) 4 - CYM Black (Process) 5 - YelRedBlueBlack*/ ushort prncp; /*Printer Color Planes*/ ushort type; /*Conversion Type 0 - Normal 1 - Undercolor Removal*/ }COLBUF; typedef struct /*Color Detail Buffer*/ {ushort color; /*Print Color for Scan*/ /*Percentages required for each input color plane*/ short pct0; /*Color Plane 0 (Red)*/ short pct1; /*Color Plane 1 (Green)*/ short pct2; /*Color Plane 2 (Blue)*/ short pct3; /*Color Plane 3 (Other)*/ }COLDBUF; /*EJECT SECTION "Image Storage Structures & TYPEDEFS" [EXTERN] TYPE NAME; COMMENT */ typedef union /*Parameter Union*/ {long lng; /*Long Value*/ ushort ushrt; /*Ushort Value*/ short shrt; /*Ushort Value*/ utiny utny; /*Utiny Value*/ tiny tny; /*Tiny Value*/ ushort *dushrt; /*Data Pointer*/ SH_PUBF(void, *fvoid)(); /*Function Pointer*/ SH_PUBF(ushort, *fushrt)(); /*Function Pointer*/ SH_PUBF(short, *fshrt)(); /*Function Pointer*/ }PARM; typedef struct /*Image Storage Table*/ {short code; /*Storage Code 0 Empty*/ ushort type; /*Image Type 0 - Not Used 1 - SIM 2 - VID 3 - FILL 4-255 -Reserved 256- Developer Defined*/ ushort width; /*Sub Image Width (pixels)*/ ushort height; /*Sub Image Height (pixels)*/ ushort hoff; /*Sub Image Horz Offset (pixels)*/ ushort voff; /*Sub Image Vert Offset (pixels)*/ ushort iwidth; /*Total Image Width (pixels)*/ ushort iheight; /*Total Image Height (pixels)*/ ushort intens; /*Image Intensity (bits)*/ ushort color; /*Image Color planes*/ ushort palette; /*Palette Code*/ ushort palbit; /*Palette Code Bits*/ ushort rht; /*Aspect Ratio Height*/ ushort rwid; /*Aspect Ratio, Width*/ /*An array of pixels rht high by */ /*rwid wide should be a printed as*/ /*a square. */ ushort ucnt; /*Use Count*/ SH_PUBF(short, *imget)(SH_ARG1(void)); /*Get Image Function*/ SH_PUBF(void, *imrst)(SH_ARG1(void)); /*Restore Image Function*/ SH_PUBF(void, *imdel)(SH_ARG1(void)); /*Delete Image Function*/ SH_PUBF(void, *piget)(SH_ARG1(ushort) SH_ARG(ushort)); /*Get Pixel Function*/ SH_PUBF(void, *piput)(SH_ARG1(ushort) SH_ARG(ushort)); /*Put Pixel Function*/ PARM parm0; /*Image Specific Parameter*/ PARM parm1; /*Image Specific Parameter*/ PARM parm2; /*Image Specific Parameter*/ PARM parm3; /*Image Specific Parameter*/ PARM parm4; /*Image Specific Parameter*/ }IMTBL; #endif /*EJECT SECTION "SUBROUTINES" [EXTERN] TYPE NAME; COMMENT */ #ifndef S_NOFUNC /*** No Function Definitions? ***/ SH_EXTF(void, sl_ulset)(SH_ARG1(ushort)); SH_EXTF(ushort, sl_ulget)(SH_ARG1(void)); SH_EXTF(void, sl_fssel)(SH_ARG1(void)); SH_EXTF(long, sl_fscl)(SH_ARG1(long)); SH_EXTF(void, sl_wsel)(SH_ARG1(void)); SH_EXTF(ushort, sl__wstd)(SH_ARG1(char)); SH_EXTF(void, sl_ksel)(SH_ARG1(void)); SH_EXTF(void, sl_kset)(SH_ARG1(ushort)); SH_EXTF(void, sl_hlsel)(SH_ARG1(void)); SH_EXTF(long, sl_hlset)(SH_ARG1(long)); SH_EXTF(long, sl_hlget)(SH_ARG1(char)); SH_EXTF(long, sl_hldum)(SH_ARG1(void)); SH_EXTF(void, sl_osel)(SH_ARG1(void)); SH_EXTF(void, sl_xsel)(SH_ARG1(void)); SH_EXTF(void, sl_scsel)(SH_ARG1(void)); SH_EXTF(short, sl_scset)(SH_ARG1(ushort)); SH_EXTF(void, sl_dlsel)(SH_ARG1(void)); SH_EXTF(void, sl_ful)(SH_ARG1(void)); SH_EXTF(void, sl_tmdef)(SH_ARGF1(void)); SH_EXTF(void, sl_bmdef)(SH_ARGF1(void)); SH_EXTF(void, sl_lmdef)(SH_ARGF1(void)); SH_EXTF(void, sl_rmdef)(SH_ARGF1(void)); SH_EXTF(short, sl_open)(SH_ARG1(ushort)); SH_EXTF(short, sl_close)(SH_ARG1(void)); SH_EXTF(short, sl_abort)(SH_ARG1(void)); SH_EXTF(short, sl_bprn)(SH_ARG1(long) SH_ARG(long) SH_ARG(ushort)); SH_EXTF(long, sl_sprn)(SH_ARG1(char*)); SH_EXTF(void, sl_fprn)(SH_ARG1(char*) SH_VARG); SH_EXTF(long, sl_cprn)(SH_ARG1(char)); SH_EXTF(long, sl__cmov)(SH_ARG1(char)); SH_EXTF(long, sl_stst)(SH_ARG1(char*)); SH_EXTF(long, sl_ctst)(SH_ARG1(char)); SH_EXTF(short, sl_dlod)(SH_ARG1(ushort)); SH_EXTF(short, sl__dupd)(SH_ARG1(void)); SH_EXTF(short, sl_fdlod)(SH_ARG1(void)); SH_EXTF(short, sl_ndlod)(SH_ARG1(void)); SH_EXTF(short, sl_pdlod)(SH_ARG1(void)); SH_EXTF(short, sl_plod)(SH_ARG1(char*) SH_ARG(char*)); SH_EXTF(short, sl__pupd)(SH_ARG1(void)); SH_EXTF(short, sl_fplod)(SH_ARG1(void)); SH_EXTF(short, sl_nplod)(SH_ARG1(void)); SH_EXTF(short, sl_pplod)(SH_ARG1(void)); SH_EXTF(short, sl_flod)(SH_ARG1(ushort)); SH_EXTF(short, sl__fupd)(SH_ARG1(void)); SH_EXTF(bool, sl__fok)(SH_ARG1(void)); SH_EXTF(short, sl_mflod)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(short) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(short) SH_ARG(ushort)); SH_EXTF(short, sl_fflod)(SH_ARG1(void)); SH_EXTF(short, sl_nflod)(SH_ARG1(void)); SH_EXTF(short, sl_pflod)(SH_ARG1(void)); SH_EXTF(short, sl_eput)(SH_ARG1(ushort)); SH_EXTF(short, sl_eget)(SH_ARG1(ushort)); SH_EXTF(short, sl_epsh)(SH_ARG1(void)); SH_EXTF(short, sl_epop)(SH_ARG1(void)); SH_EXTF(short, sl__eput)(SH_ARG1(short)); SH_EXTF(short, sl__eget)(SH_ARG1(short)); SH_EXTF(void, sl__edfl)(SH_ARG1(void)); SH_EXTF(short, sl_fput)(SH_ARG1(ushort)); SH_EXTF(short, sl_fget)(SH_ARG1(ushort)); SH_EXTF(short, sl_fpsh)(SH_ARG1(void)); SH_EXTF(short, sl_fpop)(SH_ARG1(void)); SH_EXTF(short, sl__fput)(SH_ARG1(short)); SH_EXTF(short, sl__fget)(SH_ARG1(short)); SH_EXTF(void, sl__fdfl)(SH_ARG1(void)); SH_EXTF(long, sl_higet)(SH_ARG1(void)); SH_EXTF(long, sl_viget)(SH_ARG1(void)); SH_EXTF(void, sl_npset)(SH_ARG1(void)); SH_EXTF(void, sl_lpset)(SH_ARG1(void)); SH_EXTF(void, sl_nlset)(SH_ARG1(void)); SH_EXTF(long, sl_hsget)(SH_ARG1(void)); SH_EXTF(long, sl_vsget)(SH_ARG1(void)); SH_EXTF(void, sl_hstst)(SH_ARG1(long)); SH_EXTF(void, sl_vstst)(SH_ARG1(long)); SH_EXTF(void, sl_hsprn)(SH_ARG1(long)); SH_EXTF(void, sl_tmset)(SH_ARG1(long)); SH_EXTF(void, sl_lmset)(SH_ARG1(long)); SH_EXTF(long, sl_atosp)(SH_ARG1(char*)); SH_EXTF(long, sl_ftosp)(SH_ARG1(double) SH_ARG(ushort)); SH_EXTF(void, sl__esel)(SH_ARG1(void)); SH_EXTF(void, sl__fsel)(SH_ARG1(void)); SH_EXTF(void, sl__psel)(SH_ARG1(void)); SH_EXTF(void, sl__dsel)(SH_ARG1(void)); SH_EXTF(void, sl__ddsl)(SH_ARG1(void)); SH_EXTF(void, sl__pdsl)(SH_ARG1(void)); SH_EXTF(void, sl__fdsl)(SH_ARG1(void)); SH_EXTF(void, sl__edsl)(SH_ARG1(void)); SH_EXTF(short, sl_cpset)(SH_ARG1(ushort)); SH_EXTF(short, sl_crset)(SH_ARG1(ushort)); SH_EXTF(short, sl_srset)(SH_ARG1(ushort)); SH_EXTF(short, sl_dxset)(SH_ARG1(ushort)); SH_EXTF(long, sl__smot)(SH_ARG1(char*) SH_ARG(long) SH_ARG(ushort) SH_ARG(long)); SH_EXTF(long, sl__cmot)(SH_ARG1(ushort) SH_ARG(long) SH_ARG(ushort) SH_ARG(long)); SH_EXTF(void, sl__ssot)(SH_ARG1(char*) SH_ARG(ushort)); SH_EXTF(void, sl__csot)(SH_ARG1(ushort) SH_ARG(ushort)); SH_EXTF(void, sl__popn)(SH_ARG1(void)); SH_EXTF(void, sl__pcls)(SH_ARG1(void)); SH_EXTF(void, sl__pout)(SH_ARG1(char)); SH_EXTF(void, sl__pfsh)(SH_ARG1(void)); SH_EXTF(short, sl__lopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__lcls)(SH_ARG1(void)); SH_EXTF(short, sl__lout)(SH_ARG1(char)); SH_EXTF(short, sl__sopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__scls)(SH_ARG1(void)); SH_EXTF(short, sl__sout)(SH_ARG1(char)); SH_EXTF(short, sl__fopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__fcls)(SH_ARG1(void)); SH_EXTF(short, sl__fout)(SH_ARG1(char)); SH_EXTF(short, sl__ffsh)(SH_ARG1(void)); SH_EXTF(short, sl__oopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__ocls)(SH_ARG1(void)); SH_EXTF(short, sl__oout)(SH_ARG1(char)); SH_EXTF(short, sl__wopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__wcls)(SH_ARG1(void)); SH_EXTF(short, sl__wout)(SH_ARG1(char)); SH_EXTF(short, sl__nopn)(SH_ARG1(ushort)); SH_EXTF(short, sl__ncls)(SH_ARG1(void)); SH_EXTF(short, sl__nout)(SH_ARG1(char)); SH_EXTF(void, sl__pint)(SH_ARG1(void)); SH_EXTF(void, sl__pret)(SH_ARG1(void)); SH_EXTF(short, sl__ntst)(SH_ARG1(void)); SH_EXTF(long, sl__htst)(SH_ARG1(long)); SH_EXTF(long, sl__vtst)(SH_ARG1(long)); SH_EXTF(void, sl__pset)(SH_ARG1(void)); SH_EXTF(void, sl__rdum)(SH_ARG1(void)); SH_EXTF(short, sl__edum)(SH_ARG1(void)); SH_EXTF(long, sl__ldum)(SH_ARG1(void)); SH_EXTF(char*, sl_tsget)(SH_ARG1(ushort)); SH_EXTF(void, sl_tsset)(SH_ARG1(ushort) SH_ARG(char*)); /*** SLATEAUX ***/ SH_EXTF(void, sl_cctos)(SH_ARG1(short) SH_ARG(char*)); SH_EXTF(short, sl_stocc)(SH_ARG1(char*)); SH_EXTF(short, sl_sstop)(SH_ARG1(ushort*) SH_ARG(char*) SH_ARG(ushort)); SH_EXTF(short, sl_ptoss)(SH_ARG1(char*) SH_ARG(ushort*) SH_ARG(ushort)); SH_EXTF(ushort, sl_cwget)(SH_ARG1(char) SH_ARG(ushort)); /*** SLATEGPH ***/ SH_EXTF(void, sl_gsel)(SH_ARG1(void)); SH_EXTF(void, sl_bgsel)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl__bprn)(SH_ARG1(long) SH_ARG(long) SH_ARG(ushort)); SH_EXTF(short, sl_mglod)(SH_ARG1(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_fglod)(SH_ARG1(void)); SH_EXTF(short, sl_nglod)(SH_ARG1(void)); SH_EXTF(short, sl_pglod)(SH_ARG1(void)); SH_EXTF(short, sl_glod)(SH_ARG1(ushort)); SH_EXTF(short, sl__gupd)(SH_ARG1(void)); SH_EXTF(short, sl_imprn)(SH_ARG1(long) SH_ARG(long) SH_ARG(ushort)); SH_EXTF(void, sl_imtst)(SH_ARG1(long*) SH_ARG(long*) SH_ARG(ushort)); SH_EXTF(void, sl_imfls)(SH_ARG1(void)); SH_EXTF(void, sl_piscn)(SH_ARG1(void)); SH_EXTF(short, sl_imcre)(SH_ARG1(ushort)); SH_EXTF(short, sl_imsub)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_imget)(SH_ARG1(ushort)); SH_EXTF(void, sl_imrst)(SH_ARG1(void)); SH_EXTF(void, sl_imput)(SH_ARG1(void)); SH_EXTF(void, sl_imdel)(SH_ARG1(void)); SH_EXTF(void, sl_imclr)(SH_ARG1(void)); SH_EXTF(void, sl_imdmp)(SH_ARG1(void)); SH_EXTF(void, sl_psset)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(bool) SH_ARG(ushort)); SH_EXTF(void, sl_pxscl)(SH_ARG1(void)); SH_EXTF(void, sl_hvset)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(void, sl_hvscl)(SH_ARG1(ushort*) SH_ARG(ushort*)); SH_EXTF(short, sl_pcxrd)(SH_ARG1(ushort) SH_ARG(char*) SH_VARG); SH_EXTF(short, sl_tifrd)(SH_ARG1(ushort) SH_ARG(char*) SH_VARG); SH_EXTF(short, sl_siwr)(SH_ARG1(char*)); SH_EXTF(short, sl_sird)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_sicre)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_vicre)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(void, sl_vimst)(SH_ARG1(ushort)); SH_EXTF(short, sl_ficre)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_mgcre)(SH_ARG1(ushort)); SH_EXTF(void, sl_mgmst)(SH_ARG1(ushort)); SH_EXTF(short, sl_gucre)(SH_ARG1(ushort)); SH_EXTF(void, sl_gumst)(SH_ARG1(ushort)); SH_EXTF(short, sl_b39)(SH_ARG1(ushort) SH_ARG(char*) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_b39x)(SH_ARG1(ushort) SH_ARG(char*) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_bi25)(SH_ARG1(ushort) SH_ARG(char*) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_bcoda)(SH_ARG1(ushort) SH_ARG(char*) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_b93)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_b93x)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_b128)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bpnet)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bpfim)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bupca)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bupce)(SH_ARG1(ushort) SH_ARG(char*) SH_ARG(char*)); SH_EXTF(short, sl_bean)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bupc2)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_bupc5)(SH_ARG1(ushort) SH_ARG(char*)); SH_EXTF(short, sl_pacre)(SH_ARG1(ushort)); SH_EXTF(short, sl_paget)(SH_ARG1(ushort)); SH_EXTF(void, sl_paput)(SH_ARG1(void)); SH_EXTF(void, sl_padel)(SH_ARG1(void)); SH_EXTF(void, sl_paclr)(SH_ARG1(void)); SH_EXTF(void, sl_ppget)(SH_ARG1(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_pfld)(SH_ARG1(void)); SH_EXTF(short, sl_pnlod)(SH_ARG1(void)); SH_EXTF(short, sl_pmlod)(SH_ARG1(ushort) SH_ARG(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_palod)(SH_ARG1(ushort)); SH_EXTF(void, sl_ctdel)(SH_ARG1(void)); SH_EXTF(short, sl_ctset)(SH_ARG1(ushort) SH_ARG(ushort)); SH_EXTF(void, sl_pcget)(SH_ARG1(void)); SH_EXTF(short, sl_cflod)(SH_ARG1(void)); SH_EXTF(short, sl_cnlod)(SH_ARG1(void)); SH_EXTF(short, sl_cmlod)(SH_ARG1(ushort) SH_ARG(ushort)); SH_EXTF(short, sl_clod)(SH_ARG1(ushort)); SH_EXTF(void, sl__gsel)(SH_ARG1(void)); SH_EXTF(void, sl__gdsl)(SH_ARG1(void)); SH_EXTF(ushort, sl_ptcre)(SH_ARG1(void)); SH_EXTF(void, sl_ptdel)(SH_ARG1(void)); SH_EXTF(void, sl_ptcnv)(SH_ARG1(ushort)); SH_EXTF(void, sl_ptst)(SH_ARG1(utiny*)); SH_EXTF(void, sl_ptdmp)(SH_ARG1(void)); /*EJECT SECTION "SUBROUTINES - Implemented as Macros" [EXTERN] TYPE NAME; COMMENT */ #define sl_sdset(p) (sl_ndb=(p)) #define sl_sdget() (sl_pdb) #define sl_snget() (sl_sbuf.system) #define sl_dcget() (sl_dbuf.code) #define sl_dnget() (sl_dbuf.func) #define sl_dmget() (sl_ddbuf.ctype) #define sl_dmset(p) (sl_ddbuf.ctype=(p)) #define sl_dpget() (sl_ddbuf.port) #define sl_dpset(p) (sl_ddbuf.port=(p)) #define sl_dfget() (sl_dname) #define sl_dfset(p) (sl_dname=(p)) #define sl_dtget() (sl_ddbuf.delay) #define sl_dtset(p) (sl_ddbuf.delay=(p)) #define sl_sbget() (sl_ddbuf.sbaud) #define sl_sbset(p) (sl_ddbuf.sbaud=(p)) #define sl_slget() (sl_ddbuf.slen) #define sl_slset(p) (sl_ddbuf.slen=(p)) #define sl_ssget() (sl_ddbuf.sstop) #define sl_ssset(p) (sl_ddbuf.sstop=(p)) #define sl_spget() (sl_ddbuf.spar) #define sl_spset(p) (sl_ddbuf.spar=(p)) #define sl_dhget() (sl_ddbuf.hoff) #define sl_dhset(p) (sl_ddbuf.hoff=(p)) #define sl_dvget() (sl_ddbuf.voff) #define sl_dvset(p) (sl_ddbuf.voff=(p)) #define sl_dbset(p) (sl_dban=(p)) #define sl_dnset(p) (sl_dform=(p)) #define sl_d1get() (sl_ddbuf.cart1) #define sl_d1set(p) (sl_ddbuf.cart1=(p)) #define sl_d2get() (sl_ddbuf.cart2) #define sl_d2set(p) (sl_ddbuf.cart2=(p)) #define sl_dsget() (sl_ddbuf.sources) #define sl_dsset(p) (sl_ddbuf.sources=(p)) #define sl_drget() (sl_ddbuf.ribbon) #define sl_drset(p) (sl_ddbuf.ribbon=(p)) #define sl_pwset(p) (sl_pwid=(p)) #define sl_pwget() (sl_pwid) #define sl_plset(p) (sl_plen=(p)) #define sl_plget() (sl_plen) #define sl_pmget() (sl_pmbuf.mfg) #define sl_ptget() (sl_ptbuf.type) #define sl_fcget() (sl_fbuf.code) #define sl_foget() (sl_fbuf.oren) #define sl_fsget() (sl_fbuf.space) #define sl_fyget() (sl_fbuf.style) #define sl_fwget() (sl_fbuf.weight) #define sl_ffget() (sl_fbuf.face) #define sl_fzget() (sl_fbuf.size) #define sl_fhget() (sl_fbuf.cset) /* sl_tmset() is a function */ #define sl_tmget() (sl_ebuf.tmar) #define sl_bmset(p) (sl_ebuf.bmar=(p)) #define sl_bmget() (sl_ebuf.bmar) /* sl_lmset() is a function */ #define sl_lmget() (sl_ebuf.lmar) #define sl_rmset(p) (sl_ebuf.rmar=(p)) #define sl_rmget() (sl_ebuf.rmar) #define sl_hpset(p) (sl_hpos=(p)) #define sl_hpget() (sl_hpos) #define sl_vpset(p) (sl_vpos=(p)) #define sl_vpget() (sl_vpos) #define sl_ulgt() (sl__ulim) #define sl_hnget() (sl__hmin) #define sl_hmget() (sl__hmax) #define sl_vnget() (sl__vmin) #define sl_vmget() (sl__vmax) #define sl_lhset(p) (sl_ebuf.height=(p)) #define sl_lhget() (sl_ebuf.height) #define sl_vlset(p) (sl_ebuf.height=(p)+((long)sl_fbuf.size*65536L)) #define sl_vlget() (sl_ebuf.height-((long)sl_fbuf.size*65536L)) #define sl_htset(p) (sl_ebuf.htab=(p)) #define sl_htget() sl_ebuf.htab #define sl_haset(p) (sl_hadj=(p)) #define sl_haget() sl_hadj #define sl_vaset(p) (sl_vadj=(p)) #define sl_vaget() sl_vadj #define sl_pnset(p) (sl_page=(p)) #define sl_pnget() sl_page #define sl_lnset(p) (sl_line=(p)) #define sl_lnget() sl_line #define sl_epset(p1, p2) (sl_ebuf.parm[(p1)]=(p2)) #define sl_epget(p) sl_ebuf.parm[(p)] #define sl_crget() (sl_ebuf.color) /* sl_crset() is a function */ #define sl_itosp(p) ((p) * 4736L) #define sl_ptosp(p) (4736287L/(p)) #define sl_ttosp(p) ((p) * 65536L) #define sl_pacgt() (sl_patbl.code) #define sl_patgt() (sl_patbl.type) #define sl_paigt() (sl_patbl.intens) #define sl_palgt() (sl_patbl.color) #define sl_ctcgt() (sl_colb.code) #define sl_citgt() (sl_colb.imcolor) #define sl_cptgt() (sl_colb.prncolor) #define sl_isget() (sl_imtbl.type) #define sl_icget() (sl_imtbl.code) #define sl_ihget() (sl_imtbl.height) #define sl_iwget() (sl_imtbl.width) #define sl_iiget() (sl_imtbl.intens) #define sl_iclgt() (sl_imtbl.color) #define sl_ibget() (sl_imtbl.palbit) #define sl_ihrgt() (sl_imtbl.rht) #define sl_iwrgt() (sl_imtbl.rwid) #define sl_iuget() (sl_imtbl.ucnt) #define sl_impgt(p1, p2) (*sl_imtbl.piget)((p1), (p2)) #define sl_imppt(p1, p2) (*sl_imtbl.piput)((p1), (p2)) #define sl_gcget() (sl_gbuf.code) #define sl_gvget() (sl_gbuf.vres) #define sl_ghget() (sl_gbuf.hres) #define sl_vxget() (sl_gdbuf.vpix) #define sl_hxget() (sl_gdbuf.hpix) #define sl_giget() (sl_gdbuf.intens) #define sl_grget() (sl_gdbuf.color) #define sl_gmget() (sl_gdbuf.multi) /*** Obsolete Image Functions ***/ #define sl_siupd sl_imupd #define sl_sidel sl_imdel #define sl_siget sl_imget #define sl_siclr sl_imclr #define sl_sipgt(p1, p2) (*sl_imtbl.piget)((p1), (p2)) #define sl_sippt(p1, p2) (*sl_imtbl.piput)((p1), (p2)) #define sl_viupd sl_imupd #define sl_videl sl_imdel #define sl_vigt sl_imget #define sl_viclr sl_imclr #define sl_vipgt(p1, p2) (*sl_imtbl.piget)((p1), (p2)) #define sl_vippt(p1, p2) (*sl_imtbl.piput)((p1), (p2)) #define sl_fiupd sl_imupd #define sl_fidel sl_imdel #define sl_figet sl_imget #define sl_ficlr sl_imclr #define sl_fipgt(p1, p2) (*sl_imtbl.piget)((p1), (p2)) /*** Convert Codes to Strings ***/ #define sl_dmsst(p) (sl_dmset(su_stoc((p), sl_dmtbl))) #define sl_dmsgt() (su_ctos(sl_ddbuf.ctype, sl_dmtbl)) #define sl_sbsst(p) (sl_sbset(su_stoc((p), sl_sbtbl))) #define sl_sbsgt() (su_ctos(sl_ddbuf.sbaud, sl_sbtbl)) #define sl_slsst(p) (sl_slset(su_stoc((p), sl_sltbl))) #define sl_slsgt() (su_ctos(sl_ddbuf.slen, sl_sltbl)) #define sl_sssst(p) (sl_ssset(su_stoc((p), sl_sstbl))) #define sl_sssgt() (su_ctos(sl_ddbuf.sstop, sl_sstbl)) #define sl_spsst(p) (sl_spset(su_stoc((p), sl_sptbl))) #define sl_spsgt() (su_ctos(sl_ddbuf.spar, sl_sptbl)) #define sl_drsst(p) (sl_drset(su_stoc((p), sl_drtbl))) #define sl_drsgt() (su_ctos(sl_ddbuf.ribbon, sl_drtbl)) #define sl_fosgt() (su_ctos(sl_fbuf.oren, sl_fotbl)) #define sl_fhsgt() (su_ctos(sl_fbuf.cset, sl_fhtbl)) #define sl_fssgt() (su_ctos(sl_fbuf.space, sl_fstbl)) #define sl_fysgt() (su_ctos(sl_fbuf.style, sl_fytbl)) #define sl_fwsgt() (su_ctos(sl_fbuf.weight, sl_fwtbl)) #define sl_ffsgt() (su_ctos(sl_fbuf.face, sl_fftbl)) #define sl_grsgt() (su_ctos(sl_gdbuf.color, sl_tctbl)) #define sl_pasgt() (su_ctos(sl_patbl.type, sl_tptbl)) #define sl_cisgt() (su_ctos(sl_colb.imcolor, sl_tctbl)) #define sl_cpsgt() (su_ctos(sl_colb.prncolor, sl_tctbl)) #endif /*EJECT SECTION "Error Codes" [STATIC] TYPE NAME; COMMENT */ /* Negative values are Errors and positive values are warnings */ /* Errors usually indicate a failed operation or other */ /* abnormality that will require some special action. */ /* Warnings indicate that the spcified action was modified, but */ /* that it took place. Usually, no additional action is neceasary */ #define SL_OK 0 /*No Error*/ #define SL_ENALW -1 /*Error, Operation not allowed*/ #define SL_WDB 1 /*Warning, Printer Database not found*/ #define SL_WDEV 2 /*Warning, Device not found*/ #define SL_WDDATA 3 /*Warning, Device Data Missing*/ #define SL_WPRN 4 /*Warning, Printer not found*/ #define SL_WPDATA 5 /*Warning, Printer Data Missing*/ #define SL_WFONT 6 /*Warning, Font not found*/ #define SL_WMATCH 7 /*Warning, Closest Match Font used*/ #define SL_WFDATA 8 /*Warning, Font Data Missing*/ #define SL_WENV 9 /*Warning, Environment not Found*/ #define SL_WMEM 10 /*Warning, Out of Dynamic Memory*/ #define SL_WTBL 11 /*Warning, Out of Table Space*/ #define SL_WDEF 12 /*Warning, Operation Not Defined*/ #define SL_WMOD 13 /*Warning, Operation Modified*/ #define SL_WGPH 14 /*Warning, Graphic Mode not found*/ #define SL_WMGPH 15 /*Warning, Closest Match Graphic Mode used*/ #define SL_WGDATA 16 /*Warning, Graphic Mode Data Missing*/ #define SL_WFILE 17 /*Warning, File Error*/ #define SL_WPAT 18 /*Warning, Pattern Missing*/ #define SL_WMPAT 19 /*Warning, Best Match Pattern Used*/ #define SL_WPADATA 20 /*Warning, Pattern Data Missing*/ #define SL_WCT 21 /*Warning, Color Table Missing*/ #define SL_WMCT 22 /*Warning, Best Match Color Table Used*/ #define SL_WCDATA 23 /*Warning, Color Table Data Missing*/ /*EJECT SECTION "Option Link Pointers" [EXTERN] TYPE NAME; COMMENT */ /* The following are only used internally. */ /* They are not accessed directly by */ /* application code. Thus they are not */ /* prototyped. */ #ifndef S_NOGLOB /*** No Globals? ***/ /*** Global Pointers ***/ SH_EXTF( void, *sl__cptr)(); /*Pointer - Clear Pointer Chain*/ /*** Margin Pointers ***/ SH_EXTF( void, *sl__cend)(); /*Pointer - End Char Mode Printing*/ /*** Margin Pointers ***/ SH_EXTF( void, *sl__tmar)(); /*Pointer - Print Top Margin*/ SH_EXTF( void, *sl__bmar)(); /*Pointer - Print Bottom Margin*/ SH_EXTF( void, *sl__lmar)(); /*Pointer - Print Left Margin*/ SH_EXTF( void, *sl__rmar)(); /*Pointer - Print Right Margin*/ /*** Download Pointers ***/ SH_EXTF( void, *sl__fdl)(); /*Pointer - Download Font*/ SH_EXTF( void, *sl__ful)(); /*Pointer - Unload Font*/ SH_EXTF( short, *sl__llod)(); /*Pointer - Load Download Data*/ /*** Underline Pointers ***/ SH_EXTF( void, *sl__ul)(); /*Pointer - Underline*/ /*** Width Pointers ***/ SH_EXTF( ushort, *sl__wget)(); /*Pointer - Get Character Width*/ SH_EXTF( void, *sl__wlod)(); /*Pointer - Load Width Data*/ /*** Font Scale Pointers ***/ SH_EXTF( void, *sl__slod)(); /*Pointer - Load Font Scale Data*/ SH_EXTF( long, *sl__fscl)(); /*Pointer - Scale Current Font*/ /*** Leading Pointers ***/ SH_EXTF( long, *sl__hlst)(); /*Pointer - Set Horz Leading*/ SH_EXTF( long, *sl__hlgt)(); /*Pointer - Get Horz Leading*/ SH_EXTF( void, *sl__hl)(); /*Pointer - HL, Adjust Position*/ /*** Kerning Pointers ***/ SH_EXTF( long, *sl__kget)(); /*Pointer - Get Kerning*/ SH_EXTF( void, *sl__klod)(); /*Pointer - Load Kerning Data*/ /*** Overstrike Pointers ***/ SH_EXTF( void, *sl__os)(); /*Pointer - Overstrike*/ SH_EXTF( void, *sl__olod)(); /*Pointer - Load Overstrike Data*/ /*** Translate Pointers ***/ SH_EXTF( char, *sl__xout)(); /*Pointer - Translate Character*/ SH_EXTF( void, *sl__xlod)(); /*Pointer - Load Translate Data*/ /*** Char Set Convert Pointers ***/ SH_EXTF( short, *sl__sc)(); /*Pointer - Char Set Convert*/ /*** Graphic/SLATELIB Link Pointers ***/ SH_EXTF( short, *sl__glod)(); /*Pointer - Load First Graphics Mode*/ SH_EXTF( void, *sl__gds)(); /*Pointer - Deselect Graphics Mode*/ SH_EXTF( void, *sl__pscn)(); /*Pointer - Scan Print Image Table*/ SH_EXTF( short, *sl__bpem)(); /*Pointer - Print Block Emulation*/ /*EJECT SECTION "Globals" [EXTERN] TYPE NAME; COMMENT */ /* Unless otherwise noted, the following are defined */ /* in the routines that use them. */ /*** System Globals ***/ extern short sl_error; /*Error Code from Last Operation*/ extern ushort sl_mode; /*Current Slate System Operating Mode 00H - Closed 10H - Open, Empty 11H - Open, Stored 20H - Printing, Setup 21H - Printing, Body 22H - Printing, Heading 23H - Printing, Footing 24H - Printing, Left Margin 25H - Printing, Right Margin 26H - Printing, Last Page 29H - Printing, Image 2EH - Printing, Overstrike 2FH - Printing, Overstrike (Underline)*/ extern ushort sl_dbopn; /*Database Open Status 001H - Database Open 002H - Device Open 004H - Printer Open 008H - Font Open 010H - Graphics Mode Open*/ extern ushort sl_enab; /*SLATE Enabled Functions 0010H - Fine Vertical Enabled 0020H - Font Download Enabled 0040H - Font Width Enabled 0080H - Font Translate Enabled 0100H - Font Overstrike Enabled 0200H - Font Kern Enabled 0400H - Underline Enabled 0800H - Leading Enabled 1000H - Graphics Enabled 2000H - Font Scaling Enabled 4000H - Char Set Conv Enabled*/ /*** Printer Database Globals ***/ extern char sl_pdb[]; /*SLATE PDB File Name*/ extern SLBUF sl_sbuf; /*System Data Buffer*/ /*** Device Globals ***/ extern ushort sl_dstat; /*Device Status 001H - Loaded 002H - Selected 004H - Deselected*/ extern DBUF sl_dbuf; /*Device Buffer*/ extern DDBUF sl_ddbuf; /*Device Detail Buffer*/ extern char *sl_dname; /*Device File Name Pointer*/ extern char *sl_dban; /*Device File Banner Pointer*/ extern ushort sl_dform; /*Device File Form Number*/ /*** Printer Globals ***/ extern ushort sl_pstat; /*Printer Status 001H - Loaded 002H - Selected 004H - Deselected*/ extern PMBUF sl_pmbuf; /*Printer Mfg Directory Buffer*/ extern PTBUF sl_ptbuf; /*Printer Type Directory Buffer*/ extern PDBUF sl_pdbuf; /*Printer Data Buffer*/ /*** Font Copy Globals ***/ extern FCBUF sl_fcbuf; /*Font Copy Buffer*/ /*** Font Globals ***/ extern ushort sl_fstat; /*Font Status 001H - Loaded 002H - Selected 004H - Deselected 008H - Downloaded 010H - (flag to) Unload*/ extern FTBL sl_ftbl[]; /*Font Storage Table*/ extern char sl_fsbuf[]; /*Font String Buffer*/ extern ushort sl_ftbln; /*Length of SL_FTBL*/ extern short sl_fstk; /*Font Stack Index*/ extern FDTBL sl_fdtbl[]; /*Font Detail Storage Control 0 Font 1 Font Detail 2 Font Strings 3 Horizontal 4 Vertical 5 Fine 6 Width 7 Translate 8 Overstrike 9 Load 10 Kern 11 Select Unit*/ extern FBUF sl_fbuf; /*Font Buffer*/ extern FDBUF sl_fdbuf; /*Font Detail Buffer*/ extern HORZ sl_fhbuf; /*Font Horizontal Buffer*/ extern VERT sl_fvbuf; /*Font Vertical Buffer*/ extern FINE sl_ffbuf; /*Font Fine Position Buffer*/ extern NFWBUF sl_fwbuf[]; /*Font Width Buffer*/ extern XLATE sl_ftbuf[]; /*Font Translate Buffer*/ extern OVER sl_fobuf[]; /*Font Overstrike Buffer*/ extern LOAD sl_flbuf; /*Font Download Buffer*/ extern KERN sl_fkbuf[]; /*Font Kern Buffer*/ extern HORZ *sl__hptr; /*Horizontal Data Pointer*/ extern FEBUF sl_febuf; /*Font Scaling Buffer*/ extern FABUF sl_fabuf[]; /*Font Scale Char Width Buffer*/ extern ushort sl_funit; /*Font Select Unit*/ extern long sl__fvem; /*Font Vertical Size (em)*/ extern long sl__fhem; /*Font Horizontal Size (em)*/ extern ushort sl__dltbl[]; /*Download Table*/ /*** Graphic Mode Globals ***/ extern ushort sl_gstat; /*Graphic Mode Status 001H - Loaded 002H - Selected 004H - Deselected*/ extern char sl_gsbuf[]; /*Graphic Mode String Buffer*/ extern GBUF sl_gbuf; /*Graphic Mode Buffer*/ extern GDBUF sl_gdbuf; /*Graphic Mode Detail Buffer*/ extern HORZ sl_ghbuf; /*Graphic Mode Horizontal Buffer*/ /*** Environment Globals ***/ extern ushort sl_estat; /*Environment Status 001H - Loaded 002H - Selected 004H - Deselected*/ extern ETBL sl_etbl[]; /*Environment Storage Table*/ extern ushort sl_etbln; /*Length of SL_ETBL*/ extern short sl_estk; /*Environment Stack Index*/ extern EBUF sl_ebuf; /*Environment Data*/ /*** Printing Control Globals ***/ extern long sl_plen; /*Page Length (sp)*/ extern long sl_pwid; /*Page Width (sp)*/ extern long sl_hadj; /*Horizontal Adjust*/ extern long sl_vadj; /*Vertical Adjust*/ extern ushort sl_page; /*Current Page*/ extern ushort sl_line; /*Current Line*/ extern char sl__pchr; /*Previous Character*/ extern long sl__hchr; /*Prev Char Horizontal Position*/ extern long sl__vchr; /*Prev Char Vertical Position*/ extern long sl__hold; /*Old Horizontal Position*/ extern long sl__vold; /*Old Vertical Position*/ extern long sl__fadj; /*Font Horz Adjust*/ extern long sl__padj; /*Current Print Character width movement adjustment*/ extern ushort sl__clr; /*Current Color*/ extern ushort sl__nsrc; /*New Paper Source*/ extern ushort sl__osrc; /*Old Paper Source*/ extern ushort sl__ndpx; /*New Duplex 0 - Simplex 1 - Duplex*/ extern ushort sl__odpx; /*Old Duplex 0 - Simplex 1 - Duplex*/ extern ushort sl__pdpx; /*Duplex Page (odd=front)*/ extern ushort sl__ncpy; /*New Number of Copies*/ extern ushort sl__ocpy; /*Old Number of Copies*/ extern long sl__ofln; /*Old (starting) Form Length*/ /*** Printer Output Interface ***/ extern char sl__pbuf[]; /*Print Output Buffer*/ extern ushort sl__plen; /*Print Buffer Length*/ extern PTBL sl__ptbl[]; /*Printer Subroutine Table*/ /*** Positioning Globals ***/ extern long sl_hpos; /*Desired Horizontal Position*/ extern long sl_vpos; /*Desired Vertical Position*/ extern long sl__hpos; /*Actual Horizontal Position*/ extern long sl__vpos; /*Actual Vertical Position*/ extern long sl__ulim; /*Up Movement Limit*/ extern long sl__hmin; /*Minimum Horizontal Position*/ extern long sl__hmax; /*Maximum Horizontal Position*/ extern long sl__vmin; /*Minimum Vertical Position*/ extern long sl__vmax; /*Maximum Vertical Position*/ extern long sl__hbse; /*Horizontal Base*/ extern long sl__vbse; /*Vertical Base*/ extern ushort sl__abln; /*Abort String Length*/ extern char* sl_ndb; /*New Printer Database Name*/ /*** Print Image Table Globals ***/ extern ushort sl_pihdl; /*Print Image Queue SMEM Handle*/ /*** Current Pixel Data ***/ extern utiny sl_pixel[]; /*Current Pixel Storage*/ extern ushort sl_pxcp; /*Current Pixel Color Planes*/ extern ushort sl_pxint; /*Current Pixel Intensity Bits*/ extern ushort sl_pxcol[]; /*Current Pixel Colors*/ /*** Current Image Data ***/ extern IMTBL sl_imtbl; /*Current Image Table*/ /*** Current Pattern Data ***/ extern PATBUF sl_patb; /*Pattern Buffer*/ extern PATDBUF sl_patdb; /*Pattern Detail*/ extern PATTBL sl_patbl; /*Current Pattern Table*/ /*** Current Color Table Data ***/ extern COLBUF sl_colb; /*Color Table Buffer*/ extern COLDBUF sl_coldb[]; /*Color Table Detail Buffer*/ /*** Other Tables Buffers ***/ extern TSBUF sl_tsbuf; /*Setup String Buffer*/ extern SCONV sl_scbuf; /*Char Set Convert Buffer*/ /*** Code to String Lookup Tables ***/ extern SCTBL sl_dmtbl[]; /*Device Connect Mode Table*/ extern SCTBL sl_sbtbl[]; /*Device Serial Baud Rate*/ extern SCTBL sl_sltbl[]; /*Device Serial Length*/ extern SCTBL sl_sstbl[]; /*Device Serial Stop Bits*/ extern SCTBL sl_satbl[]; /*Device DOS Append*/ extern SCTBL sl_sptbl[]; /*Device Serial Parity*/ extern SCTBL sl_drtbl[]; /*Device Sources*/ extern SCTBL sl_dstbl[]; /*Device Sources*/ extern SCTBL sl_fotbl[]; /*Orentation*/ extern SCTBL sl_fhtbl[]; /*Character Set*/ extern SCTBL sl_fstbl[]; /*Spacing*/ extern SCTBL sl_fytbl[]; /*Style*/ extern SCTBL sl_fwtbl[]; /*Weight*/ extern SCTBL sl_fftbl[]; /*Typeface*/ extern SCTBL sl_cltbl[]; /*Colors*/ extern SCTBL sl_tptbl[]; /*Tables - Pattern/Screen Types*/ extern SCTBL sl_tctbl[]; /*Tables - Color Type*/ extern SCTBL sl_tvtbl[]; /*Tables - Color Conversion Type*/ extern SCTBL sl_setbl[]; /* System Error Codes*/ extern SCTBL sl_smtbl[]; /* System Mode Codes*/ extern SCTBL sl_sitbl[]; /* System Image System Codes*/ #endif SH_HEND