home *** CD-ROM | disk | FTP | other *** search
- *** 1.13 1991/09/24 17:16:49
- --- Changelog 1992/01/14 19:34:26
- ***************
- *** 225,227 ****
- --- 225,256 ----
- handle char code > 127. make sure they are not sign extended
- while copying into intin, by cast'ing to (unsigned char), in
- v_gtext() and v_justified() and vqt_extent(). thanks Markus.
- +
- + ------------------------------- Patchlevel 19------------------------
- +
- + vdibind.h, mincl, vdifsm.c:: ++jrb
- + sync with ataris new release of fsmgdos
- +
- + vdibind.h, vdibez.c:: ++jrb
- + new file. bindings for bezier curves.
- +
- + vdibind.h vdiqgdos.c:: ++jrb
- + vq_vgdos(): return unsigned long. fix proto and inline def in
- + vdibind.h too
- +
- + vdifsm.c, vdibind.h:: michal
- + michal corrected and added missing bindings. Thnaks very
- + much.
- +
- + vdibez.c, vdibind.h, mincl:: michal
- + michal corrected almost the whole file.
- +
- + vdictrl1.c:: markus nick
- + fix to v_opnvwk() bindings. was'mt passing old value of handle.
- + thanks markus.
- +
- + MUCH THANKS to Michal Jaegermann who has been very carefully
- + correcting and baby sitting these bindings. He has made very
- + significant contributions, and lively discussions and comments.
- +
- + ------------------------------- Patchlevel 20------------------------
- *** 1.6 1991/09/06 02:10:31
- --- mincl 1992/01/14 19:34:31
- ***************
- *** 59,67 ****
- vsc_expo.o v_meta_e.o v_write_.o vm_pages.o vm_coord.o \
- vm_filen.o v_escape.o
-
- ! VDIFSM = v_shtext.o vst_arbp.o vqt_adva.o vqt_devi.o v_saveca.o \
- v_loadca.o v_flushc.o vst_sets.o vst_skew.o vqt_get_.o \
- ! vqt_cach.o
-
- VDIGDP = v_bar.o v_arc.o v_piesli.o v_circle.o v_ellarc.o \
- v_ellpie.o v_ellips.o v_rbox.o v_rfbox.o v_justif.o
- --- 59,68 ----
- vsc_expo.o v_meta_e.o v_write_.o vm_pages.o vm_coord.o \
- vm_filen.o v_escape.o
-
- ! VDIFSM = vqt_fext.o v_ftext.o v_killou.o v_getout.o vst_scra.o vst_erro.o \
- ! v_shtext.o vst_arbp.o vqt_adva.o vqt_devi.o v_saveca.o \
- v_loadca.o v_flushc.o vst_sets.o vst_skew.o vqt_get_.o \
- ! vqt_cach.o v_getbit.o
-
- VDIGDP = v_bar.o v_arc.o v_piesli.o v_circle.o v_ellarc.o \
- v_ellpie.o v_ellips.o v_rbox.o v_rfbox.o v_justif.o
- ***************
- *** 82,92 ****
-
- VDIRAS = vro_cpyf.o vrt_cpyf.o vr_trnfm.o v_get_pi.o
-
- AESALL = $(AESAPPL) $(AESCRAP) $(AESEVNT) $(AESFORMS) $(AESFSEL) $(AESGRAF) \
- $(AESHELL) $(AESMENU) $(AESOBJ) $(AESRC) $(AESRSRC) $(AESWIN)
-
- VDIALL = $(VDIATRIB) $(VDICTRL1) $(VDICTRL2) $(VDIESC) $(VDIESC1) $(VDIFSM) \
- ! $(VDIGDP) $(VDIINP) $(VDIINQ) $(VDIOUT) $(VDIQGDOS) $(VDIRAS)
-
-
- COMOBJ = common.o ident.o
- --- 83,97 ----
-
- VDIRAS = vro_cpyf.o vrt_cpyf.o vr_trnfm.o v_get_pi.o
-
- + # Use first line for VDIBEZ when !defined(ALTERNATE) else use second line:
- + # VDIBEZ = v_set_ap.o v_bez_on.o v_bez_of.o v_bez.o v_bez_fi.o v_bez_qu.o
- + VDIBEZ = v_set_ap.o v_bez_co.o v_bez.o v_bez_fi.o v_bez_qu.o
- +
- AESALL = $(AESAPPL) $(AESCRAP) $(AESEVNT) $(AESFORMS) $(AESFSEL) $(AESGRAF) \
- $(AESHELL) $(AESMENU) $(AESOBJ) $(AESRC) $(AESRSRC) $(AESWIN)
-
- VDIALL = $(VDIATRIB) $(VDICTRL1) $(VDICTRL2) $(VDIESC) $(VDIESC1) $(VDIFSM) \
- ! $(VDIGDP) $(VDIINP) $(VDIINQ) $(VDIOUT) $(VDIQGDOS) $(VDIRAS) $(VDIBEZ)
-
-
- COMOBJ = common.o ident.o
- ***************
- *** 182,187 ****
- --- 187,195 ----
-
- $(VDIRAS): %.o: vdiras.c
- $(CC) $(CFLAGS) -DL_$* -c vdiras.c -o $@
- +
- + $(VDIBEZ): %.o: vdibez.c
- + $(CC) $(CFLAGS) -DL_$* -c vdibez.c -o $@
-
-
- .PHONY: install clean realclean
- *** 1.8 1991/09/06 01:54:31
- --- vdibind.h 1992/01/14 19:34:31
- ***************
- *** 270,276 ****
- #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
- #define vq_vgdos() \
- ({ \
- ! register long ret __asm__("d0"); \
- __asm__ volatile \
- (" \
- movq #-2,d0; \
- --- 270,276 ----
- #if ((defined(__GNUC__)) && (!defined(__NO_INLINE__)))
- #define vq_vgdos() \
- ({ \
- ! register unsigned long ret __asm__("d0"); \
- __asm__ volatile \
- (" \
- movq #-2,d0; \
- ***************
- *** 282,296 ****
- ret; \
- })
- #else
- ! __EXTERN long vq_gdos __PROTO((void));
- #endif /* __GNUC__ | !__NO_INLINE__ */
-
- /* FSM gdos bindings */
-
- /*
- * v_gtext with optional shadow attribute
- */
- ! __EXTERN void v_shtext __PROTO(( int wsid, int x, int y, char *text,
- int color, int xshadow, int yshadow ));
-
- /*
- --- 282,345 ----
- ret; \
- })
- #else
- ! __EXTERN unsigned long vq_gdos __PROTO((void));
- #endif /* __GNUC__ | !__NO_INLINE__ */
-
- /* FSM gdos bindings */
-
- + /* ---------------------------------------------------------------------------
- + * Retrieve placement information for FSM generated characters
- + * Information is placed in infoarray of 52 ints.
- + * Borrow a soothsayer from DRI or Atari to find its meaning.
- + *
- + * This is a temporary bindings since one genius decided
- + * that some entries in infoarray will represent real numbers.
- + * You may fully expect that that this representation of reals is
- + * absolutely different from what your compiler is using.
- + * Count your lucky stars if at least sizeof(double) == 2 * sizeof(int).
- + * Or maybe sizeof(double) is supposed to be sizeof(float)?
- + */
- + __EXTERN void v_getbitmap_info __PROTO((int handle, int ch, int infoarray[]));
- +
- + /*
- + * Inquire text extent, accounting for FSM text placement
- + */
- + __EXTERN void vqt_f_extent __PROTO((int handle, const char *str, int extent[]));
- +
- + /*
- + * Draw FSM text (accounts for fractional advances in rotated text)
- + */
- + __EXTERN void v_ftext __PROTO((int handle, int x, int y, const char *str));
- +
- + /*
- + * Release memory associated with outline component generated by v_getoutline()
- + */
- + __EXTERN void v_killoutline __PROTO((int handle, void *component));
- +
- + /*
- + * Generate an outline for character ch, and return the address of the outline.
- + */
- + __EXTERN void v_getoutline __PROTO((int handle, int ch, void **component));
- +
- + /*
- + * Set scratch buffer allocation mode.
- + * mode=0: (default) account for FSM fonts when allocating scratch buffers
- + * mode=1: account only for BM fonts
- + * mode=2: allocate no scratch buffer
- + */
- + __EXTERN void vst_scratch __PROTO((int handle, int mode));
- +
- + /*
- + * Set FSM error mode.
- + * mode=1: (default) errors go to screen.
- + * mode=0: errors reported in error variable `errorvar'.
- + */
- + __EXTERN void vst_error __PROTO((int handle, int mode, int *errorvar));
- +
- /*
- * v_gtext with optional shadow attribute
- */
- ! __EXTERN void v_shtext __PROTO(( int wsid, int x, int y, const char *text,
- int color, int xshadow, int yshadow ));
-
- /*
- ***************
- *** 348,353 ****
- --- 397,429 ----
- */
- __EXTERN void vqt_cachesize __PROTO(( int handle, int which_cache,
- size_t *size ));
- +
- + /*
- + * bezier curves stuff
- + */
- + __EXTERN void v_set_app_buff __PROTO((void **buf_p, int size));
- +
- + __EXTERN int v_bez __PROTO((int handle, int count,
- + int *xyarr, char *bezarr,
- + int extent[4], int *npts, int *nmvs));
- + __EXTERN int v_bez_fill __PROTO((int handle, int count,
- + int *xyarr, char *bezarr,
- + int extent[4], int *npts, int *nmvs));
- + __EXTERN int v_bez_qual __PROTO((int handle, int percent, int *actual));
- +
- + #ifdef ALTERNATE
- +
- + /* Use these #defines if you _really_ want to stick to DRI conventions */
- +
- + __EXTERN int v_bez_con __PROTO((int handle, int onoff));
- + #define v_bez_on(x) (int)v_bez_con((x), 1)
- + #define v_bez_off(x) (void)v_bez_con((x), 0)
- +
- + #else
- + __EXTERN int v_bez_on __PROTO((int handle));
- + __EXTERN void v_bez_off __PROTO((int handle));
- + #endif /* ALTERNATE */
- +
- #if defined(__cplusplus)
- }
- #endif
- *** 1.6 1991/09/06 02:10:31
- --- vdictrl1.c 1992/01/14 19:34:32
- ***************
- *** 93,99 ****
- *iptr++ = *work_in++;
- } while (work_in < end);
-
- ! __vdi__(VDI_CONTRL_ENCODE(100, 0, 11, 0), 0);
-
- wptr = work_out;
- end = wptr + 45;
- --- 93,99 ----
- *iptr++ = *work_in++;
- } while (work_in < end);
-
- ! __vdi__(VDI_CONTRL_ENCODE(100, 0, 11, 0), *handle);
-
- wptr = work_out;
- end = wptr + 45;
- ***************
- *** 110,116 ****
- _vdiparams[1] = &work_in[0];
- _vdiparams[3] = &work_out[0];
- _vdiparams[4] = &work_out[45];
- ! __vdi__(VDI_CONTRL_ENCODE(100, 0, 11, 0), 0);
- _vdiparams[1] = (void *)&_intin[0];
- _vdiparams[3] = (void *)&_intout[0];
- _vdiparams[4] = (void *)&_ptsout[0];
- --- 110,116 ----
- _vdiparams[1] = &work_in[0];
- _vdiparams[3] = &work_out[0];
- _vdiparams[4] = &work_out[45];
- ! __vdi__(VDI_CONTRL_ENCODE(100, 0, 11, 0), *handle);
- _vdiparams[1] = (void *)&_intin[0];
- _vdiparams[3] = (void *)&_intout[0];
- _vdiparams[4] = (void *)&_ptsout[0];
- *** 1.4 1991/09/06 02:10:31
- --- vdifsm.c 1992/01/14 19:34:32
- ***************
- *** 4,9 ****
- --- 4,10 ----
- * but it changed quite a bit (among other things it appears to work).
- * v_shtext survived verbatim from the original.
- */
- +
- #include "common.h"
- #ifndef _COMPILER_H
- # include <compiler.h>
- ***************
- *** 16,21 ****
- --- 17,29 ----
-
- #ifdef __DEF_ALL__
-
- + #define L_v_getbit
- + #define L_vqt_fext
- + #define L_v_ftext
- + #define L_v_killou
- + #define L_v_getout
- + #define L_vst_scra
- + #define L_vst_erro
- #define L_v_shtext
- #define L_vst_arbp
- #define L_vqt_adva
- ***************
- *** 30,35 ****
- --- 38,213 ----
-
- #endif /* __DEF_ALL__ */
-
- + #ifdef L_v_getbit
- +
- + /* ---------------------------------------------------------------------------
- + * Retrieve placement information for FSM generated characters
- + * Information is placed in infoarray of 52 ints.
- + * Borrow a soothsayer from DRI or Atari to find its meaning.
- + *
- + * This is a temporary bindings since one genius decided
- + * that some entries in infoarray will represent real numbers.
- + * You may fully expect that that this representation of reals is
- + * absolutely different from what your compiler is using.
- + * Count your lucky stars if at least sizeof(double) == 2 * sizeof(int).
- + * Or maybe sizeof(double) is supposed to be sizeof(float)?
- + */
- + void
- + v_getbitmap_info(int handle, int ch, int infoarray[52])
- + {
- + short *ptr = _intin;
- +
- + *ptr++ = ch;
- + *(int **)ptr = &infoarray[0];
- +
- + __vdi__(VDI_CONTRL_ENCODE(239, 0, 3, 0), handle);
- +
- + #ifndef __MSHORT__
- + /* Repack returned information from an array of shorts into an
- + array of ints */
- + { /* dummy block to contain new declarations */
- + short *s_ptr = (short *)(&infoarray[0]) + 52;
- + short *bot = (short *)(&infoarray[0]) + 4;
- + int *i_ptr = (&infoarray[0]) + 52;
- +
- + do {
- + s_ptr -= 2; /* copy y-offset */
- + *(--i_ptr) = *(int *)s_ptr;
- + *(--i_ptr) = 0;
- +
- + s_ptr -= 2; /* copy x-offset */
- + *(--i_ptr) = *(int *)s_ptr;
- + *(--i_ptr) = 0;
- +
- + *(--i_ptr) = *(--s_ptr); /* bitmap height */
- + *(--i_ptr) = *(--s_ptr); /* bitmap width */
- + } while (s_ptr > bot);
- +
- + *(--i_ptr) = *(--s_ptr); /* remainder y-advance */
- + *(--i_ptr) = *(--s_ptr); /* y-advance */
- + *(--i_ptr) = *(--s_ptr); /* remainder x-advance */
- + *i_ptr = *s_ptr; /* x-advance */
- + }
- + #endif /* __MSHORT__ */
- + }
- +
- + #endif /* L_v_getbit */
- +
- + #ifdef L_vqt_fext
- +
- + /* ---------------------------------------------------------------------------
- + * Inquire text extent, accounting for FSM text placement
- + */
- + void
- + vqt_f_extent(int handle, const char *str, int extent[8])
- + {
- + unsigned char ch;
- + short *ptr;
- + int *ept, *end;
- +
- + ptr = _intin;
- + while ( ch = *str++)
- + *ptr++ = ch;
- + *ptr = 0;
- + __vdi__(VDI_CONTRL_ENCODE(240, 0, (int)(ptr - _intin), 0), handle);
- +
- + ptr = _ptsout;
- + ept = extent;
- + end = ept + 8;
- + do {
- + *ept++ = *ptr++;
- + } while (ept < end);
- + }
- +
- + #endif /* L_vqt_fext */
- +
- +
- + #ifdef L_v_ftext
- +
- + /* ---------------------------------------------------------------------------
- + * Draw FSM text (accounts for fractional advances in rotated text)
- + */
- + void
- + v_ftext(int handle, int x, int y, const char *str)
- + {
- + unsigned char ch;
- + short *ptr = _intin;
- +
- + _ptsin[0] = x;
- + _ptsin[1] = y;
- + while ( ch = (unsigned const char) *str++)
- + *ptr++ = ch;
- + *ptr = 0;
- +
- + __vdi__(VDI_CONTRL_ENCODE(241, 1, (int)(ptr - _intin), 0), handle);
- + }
- +
- + #endif /* L_v_ftext */
- +
- +
- + #ifdef L_v_killou
- + /* ---------------------------------------------------------------------------
- + * Release memory associated with outline component generated by v_getoutline()
- + */
- + void
- + v_killoutline(int handle, void *component)
- + {
- + *(void **)&_intin[0] = component;
- + __vdi__(VDI_CONTRL_ENCODE(242, 0, 2, 0), handle);
- + }
- + #endif /* L_v_killou */
- +
- +
- + #ifdef L_v_getout
- + /* ---------------------------------------------------------------------------
- + * Generate an outline for character ch, and return the address of the outline.
- + */
- + void
- + v_getoutline(int handle, int ch, void **component)
- + {
- + _intin[0] = ch;
- + *(void ***)&_intin[1] = component;
- + __vdi__(VDI_CONTRL_ENCODE(243, 0, 3, 0), handle);
- + }
- +
- + #endif /* L_v_getout */
- +
- +
- + #ifdef L_vst_scra
- + /* ---------------------------------------------------------------------------
- + * Set scratch buffer allocation mode.
- + * This buffes is used when creating special effects on fonts.
- + * mode=0: (default) account for FSM fonts when allocating scratch buffers
- + * mode=1: account only for BM fonts; no special effects for outlines
- + * mode=2: allocate no scratch buffer; no special effects at all
- + */
- + void
- + vst_scratch(int handle, int mode)
- + {
- + _intin[0] = mode;
- + __vdi__(VDI_CONTRL_ENCODE(244, 0, 1, 0), handle);
- + }
- +
- + #endif /* L_vst_scra */
- +
- +
- + #ifdef L_vst_erro
- +
- + /* ---------------------------------------------------------------------------
- + * Set FSM error mode.
- + * mode=1: (default) errors go to screen.
- + * mode=0: errors reported in error variable `errorvar'.
- + */
- + void
- + vst_error(int handle, int mode, int *errorvar)
- + {
- + _intin[0] = mode;
- + *(int **)&_intin[1] = errorvar;
- + __vdi__(VDI_CONTRL_ENCODE(245, 0, 3, 0), handle);
- + }
- +
- + #endif /* L_vst_erro */
- +
-
- #ifdef L_v_shtext
-
- ***************
- *** 43,64 ****
- v_shtext( int wsid,
- int x,
- int y,
- ! char * text,
- int color,
- int xshadow,
- int yshadow )
- {
- ! __EXTERN void v_gtext __PROTO((int, int, int, const char *));
- ! __EXTERN void vst_color __PROTO((int, int));
-
- if( xshadow || yshadow )
- {
- ! v_gtext( wsid, x+xshadow*2, y+yshadow*2, text );
- ! vst_color( wsid, 0 );
- ! v_gtext( wsid, x+xshadow, y+yshadow, text );
- ! vst_color( wsid, color );
- }
- ! v_gtext( wsid, x, y, text );
- }
- #endif /* L_v_shtext */
-
- --- 221,242 ----
- v_shtext( int wsid,
- int x,
- int y,
- ! const char * text,
- int color,
- int xshadow,
- int yshadow )
- {
- ! __EXTERN void v_ftext __PROTO((int, int, int, const char *));
- ! __EXTERN int vst_color __PROTO((int, int));
-
- if( xshadow || yshadow )
- {
- ! v_ftext( wsid, x+xshadow*2, y+yshadow*2, text );
- ! (void) vst_color( wsid, 0 );
- ! v_ftext( wsid, x+xshadow, y+yshadow, text );
- ! (void) vst_color( wsid, color );
- }
- ! v_ftext( wsid, x, y, text );
- }
- #endif /* L_v_shtext */
-
- ***************
- *** 66,72 ****
- #ifdef L_vst_arbp
-
- /* ----------------------------------------------------------------------
- ! * Set character cell height by arbitrary points.
- */
- int
- vst_arbpt( int handle,
- --- 244,253 ----
- #ifdef L_vst_arbp
-
- /* ----------------------------------------------------------------------
- ! * Set character cell height to arbitrary value.
- ! * Height is given in printer points (more or less) and it does not
- ! * have to be listed in extend.sys.
- ! * Only for FSM outline fonts.
- */
- int
- vst_arbpt( int handle,
- ***************
- *** 93,98 ****
- --- 274,280 ----
-
- /* ----------------------------------------------------------------------
- * Inquire FSM text advance placement vector.
- + * Remainders xrem and yrem are modulo 16384 (2^14, 1 << 14)
- */
- void
- vqt_advance( int handle, int ch, int *xadv, int *yadv, int *xrem, int *yrem)
- ***************
- *** 112,117 ****
- --- 294,306 ----
-
- /* ----------------------------------------------------------------------
- * Inquire device status information.
- + *
- + * Watch out! Name is returned as a COUNTED string in 8+3 format,
- + * without separator, all in an upper case. Missing character
- + * positions are filled with blanks.
- + * (At least this was the case for some versions of FSMGDOS.
- + * Who knows what will happen next. This is NOT documented.
- + * Check before you jump!)
- */
- void
- vqt_devinfo( int handle, int device, int *isdev, char *drivername )
- ***************
- *** 185,191 ****
- #ifdef L_vst_sets
-
- /* ----------------------------------------------------------------------
- ! * Set character cell width by arbitrary points.
- */
- int
- vst_setsize( int handle,
- --- 374,383 ----
- #ifdef L_vst_sets
-
- /* ----------------------------------------------------------------------
- ! * Set character cell width (set size) to arbitrary value.
- ! * Width is given in printer points (more or less).
- ! * Only for FSM outline fonts.
- ! * Effects are cancelled by calls to vst_point, vst_arbpt or vst_height.
- */
- int
- vst_setsize( int handle,
- ***************
- *** 195,206 ****
- int *wcell,
- int *hcell )
- {
- _intin[0] = point;
- __vdi__(VDI_CONTRL_ENCODE(252, 0, 1, 0), handle);
- ! *wchar = _ptsout[0];
- ! *hchar = _ptsout[1];
- ! *wcell = _ptsout[2];
- ! *hcell = _ptsout[3];
-
- return _intout[0];
- }
- --- 387,401 ----
- int *wcell,
- int *hcell )
- {
- + short *outp = &_ptsout[0];
- +
- _intin[0] = point;
- __vdi__(VDI_CONTRL_ENCODE(252, 0, 1, 0), handle);
- !
- ! *wchar = *outp++;
- ! *hchar = *outp++;
- ! *wcell = *outp++;
- ! *hcell = *outp;
-
- return _intout[0];
- }
- ***************
- *** 210,215 ****
- --- 405,411 ----
-
- /* ----------------------------------------------------------------------
- * Set FSM skew.
- + * Skew in tenths of degrees. Valid values between -900 and 900.
- */
- int
- vst_skew( int handle, int skew )
- ***************
- *** 231,237 ****
- {
- __vdi__(VDI_CONTRL_ENCODE(254, 0, 0, 0), handle);
- *gascii = *(void **)&_intout[0];
- ! *style = *(void **)&_intout[2];
- }
- #endif /* L_vqt_get_ */
-
- --- 427,433 ----
- {
- __vdi__(VDI_CONTRL_ENCODE(254, 0, 0, 0), handle);
- *gascii = *(void **)&_intout[0];
- ! *style = *(void **)&_intout[2];
- }
- #endif /* L_vqt_get_ */
-
- *** 1.4 1991/09/06 02:10:31
- --- vdiqgdos.c 1992/01/14 19:34:33
- ***************
- *** 58,66 ****
- * 0x5F46534DL '_FSM' gdos
- * 0x5F464E54L '_FNT' gdos
- */
- ! long vq_vgdos(void)
- {
- ! register long ret __asm__("d0");
- __asm__ volatile ("
- movq #-2,d0
- trap #2"
- --- 58,66 ----
- * 0x5F46534DL '_FSM' gdos
- * 0x5F464E54L '_FNT' gdos
- */
- ! unsigned long vq_vgdos(void)
- {
- ! register unsigned long ret __asm__("d0");
- __asm__ volatile ("
- movq #-2,d0
- trap #2"
-