Changeset 7258c6a in buchla-68k for vlib


Ignore:
Timestamp:
07/09/2017 04:45:34 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
8618599
Parents:
0292fbb
Message:

Use standard integer types.

Location:
vlib
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • vlib/cg2.c

    r0292fbb r7258c6a  
     1
    12/* Character generator table -- 12V by 8H */
    23
    3 int     cg_rows = 12;
    4 
    5 int     cgtable[12][256] = {
     4int16_t cg_rows = 12;
     5
     6int16_t cgtable[12][256] = {
    67
    78        {       /* Scan line 0 */
  • vlib/cg3.c

    r0292fbb r7258c6a  
    33/* Generated:  1989-11-16  15:40:14 */
    44
    5 /* int  cg_rows = 14; */
    6 
    7 int     cg3[14][256] = {
     5/* int16_t      cg_rows = 14; */
     6
     7int16_t cg3[14][256] = {
    88
    99        {       /* Scan line 0 */
  • vlib/glcinit.c

    r0292fbb r7258c6a  
    6363#include "glcdefs.h"
    6464
    65 unsigned        lcdbase;        /* LCD graphics base address */
    66 unsigned        lcdbit;         /* LCD graphics pixel bit mask */
    67 unsigned        lcdcol;         /* LCD text column */
    68 unsigned        lcdctl1;        /* LCD display control -- command */
    69 unsigned        lcdctl2;        /* LCD display control -- data */
    70 unsigned        lcdcurs;        /* LCD graphics pixel byte address */
    71 unsigned        lcdrow;         /* LCD text row */
    72 unsigned        lcdx;           /* LCD graphics x */
    73 unsigned        lcdy;           /* LCD graphics y */
     65uint16_t        lcdbase;        /* LCD graphics base address */
     66uint16_t        lcdbit;         /* LCD graphics pixel bit mask */
     67uint16_t        lcdcol;         /* LCD text column */
     68uint16_t        lcdctl1;        /* LCD display control -- command */
     69uint16_t        lcdctl2;        /* LCD display control -- data */
     70uint16_t        lcdcurs;        /* LCD graphics pixel byte address */
     71uint16_t        lcdrow;         /* LCD text row */
     72uint16_t        lcdx;           /* LCD graphics x */
     73uint16_t        lcdy;           /* LCD graphics y */
    7474
    7575/* GLC initialization values */
    7676
    77 char glc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 };
    78 char glc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 };
     77int8_t glc_is1[] = { 0x12, 0x05, 0x07, 0x54, 0x58, 0x3F, 0x55, 0x00 };
     78int8_t glc_is2[] = { 0x00, 0x00, 0x3F, 0x00, 0x20, 0x3F, 0x00, 0x00 };
    7979
    8080/*
     
    8989*/
    9090
    91 void GLCdisp(short dsp, short crs, short blk1, short blk2, short blk3)
    92 {
    93         register short val;
     91void GLCdisp(int16_t dsp, int16_t crs, int16_t blk1, int16_t blk2, int16_t blk3)
     92{
     93        register int16_t val;
    9494
    9595        val = ((blk3 & 3) << 6) | ((blk2 & 3) << 4) | ((blk1 & 3) << 2) |
     
    110110*/
    111111
    112 void GLCcurs(short crs)
     112void GLCcurs(int16_t crs)
    113113{
    114114        lcdctl2 = (crs & 3) | (lcdctl2 & ~3);
     
    131131void GLCinit(void)
    132132{
    133         register int    i;
    134         register long ic;
    135         register char *gp;
     133        register int16_t        i;
     134        register int32_t ic;
     135        register int8_t *gp;
    136136
    137137        lcdbase = G_PLANE2;     /* set defaults for graphics variables */
     
    205205*/
    206206
    207 unsigned GLCcrc(unsigned row, unsigned col)
    208 {
    209         unsigned curad;
     207uint16_t GLCcrc(uint16_t row, uint16_t col)
     208{
     209        uint16_t curad;
    210210
    211211        curad = col + (row * 85);       /* calculate cursor location */
     
    235235*/
    236236
    237 unsigned GLCcxy(unsigned x, unsigned y)
    238 {
    239         register unsigned curad, xby6;
     237uint16_t GLCcxy(uint16_t x, uint16_t y)
     238{
     239        register uint16_t curad, xby6;
    240240
    241241        /* calculate cursor address */
     
    277277*/
    278278
    279 void GLCwrts(char *s)
     279void GLCwrts(int8_t *s)
    280280{
    281281        LCD_WC = G_CRSMRT;      /* set cursor motion =  right */
     
    304304*/
    305305
    306 void GLCtext(unsigned row, unsigned col, char *s)
    307 {
    308         register unsigned curad;
     306void GLCtext(uint16_t row, uint16_t col, int8_t *s)
     307{
     308        register uint16_t curad;
    309309
    310310        curad = col + (row * 85);       /* calculate cursor address */
  • vlib/lseg.c

    r0292fbb r7258c6a  
    77*/
    88
    9 void    (*point)(short x, short y, short pen);
     9void    (*point)(int16_t x, int16_t y, int16_t pen);
    1010
    1111#define ABS(x)  ((x) < 0 ? (-(x)) : (x))
     
    4141*/
    4242
    43 void lseg(short x1, short y1, short x2, short y2, short t)
     43void lseg(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t t)
    4444{
    45         register short dx, dy, ptx, pty, p;
    46         short i, px, py;
     45        register int16_t dx, dy, ptx, pty, p;
     46        int16_t i, px, py;
    4747
    4848        p = x2 - (ptx = x1);
  • vlib/vbfill4.c

    r0292fbb r7258c6a  
    88*/
    99
    10 static short    fm[] = {        /* fill masks */
     10static int16_t  fm[] = {        /* fill masks */
    1111
    1212        0x000F,
     
    2929*/
    3030
    31 void vbfill4(unsigned *obj, short obwidth, short xmin, short ymin, short xmax, short ymax, unsigned color)
     31void vbfill4(uint16_t *obj, int16_t obwidth, int16_t xmin, int16_t ymin, int16_t xmax, int16_t ymax, uint16_t color)
    3232{
    33         short mw, nl, width;
    34 
    35         register unsigned *fwp, *wp;
    36 
    37         register unsigned lmask, rmask;
    38         register short i, j;
    39 
    40         fwp = obj + (long)(xmin >> 2) + ((long)ymin * obwidth);
     33        int16_t mw, nl, width;
     34
     35        register uint16_t *fwp, *wp;
     36
     37        register uint16_t lmask, rmask;
     38        register int16_t i, j;
     39
     40        fwp = obj + (int32_t)(xmin >> 2) + ((int32_t)ymin * obwidth);
    4141        width = xmax - xmin + 1;
    4242        nl = ymax - ymin + 1;
  • vlib/vclrs.c

    r0292fbb r7258c6a  
    1616*/
    1717
    18 extern  void    vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
     18extern  void    vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib);
    1919
    2020/*
     
    2424*/
    2525
    26 void vclrs(unsigned int obase[], int row, int col, int nc, int ch, int atr)
     26void vclrs(uint16_t obase[], int16_t row, int16_t col, int16_t nc, int16_t ch, int16_t atr)
    2727{
    2828        while (nc--)
  • vlib/vhinit.c

    r0292fbb r7258c6a  
    2222#define VREG(h,v)       ((h<<10)|v)
    2323
    24 extern  int     cgtable[][256];
    25 extern  int     cg_rows;
     24extern  int16_t cgtable[][256];
     25extern  int16_t cg_rows;
    2626
    2727struct octent   v_obtab[16];    /* object control table */
     
    2929struct octent   *v_curob;       /* current v_obtab pointer */
    3030
    31 int     v_nobj;                 /* current object number */
    32 int     v_obpri;                /* current object priority */
     31int16_t v_nobj;                 /* current object number */
     32int16_t v_obpri;                /* current object priority */
    3333
    3434/*
     
    3737/* initialized variables */
    3838
    39 int     vr_data[] = {
     39int16_t vr_data[] = {
    4040
    4141        0x825B,         /* R0  -- Mode word 0 */
  • vlib/vmput.c

    r0292fbb r7258c6a  
    1919*/
    2020
    21 typedef unsigned int    uint;
    22 
    23 extern  void    vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
     21extern  void    vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib);
    2422
    2523/*
     
    3028*/
    3129
    32 void vmput(uint *sbase, uint row, uint col, uint ma, char *ms[])
     30void vmput(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t ma, int8_t *ms[])
    3331{
    34         register uint c, tc, tr;
    35         char *cp;
     32        register uint16_t c, tc, tr;
     33        int8_t *cp;
    3634
    3735        tr = row;
     
    5856*/
    5957
    60 void vmputa(uint *sbase, uint row, uint col, uint *ma[], char *ms[])
     58void vmputa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *ma[], int8_t *ms[])
    6159{
    62         register uint c, tc, tr;
    63         uint *tm;
    64         char *cp;
     60        register uint16_t c, tc, tr;
     61        uint16_t *tm;
     62        int8_t *cp;
    6563
    6664        tr = row;
  • vlib/vobjfns.c

    r0292fbb r7258c6a  
    6060#include "vsddvars.h"
    6161
    62 extern  void    vbank(unsigned b);
    63 extern  void    objon(unsigned obj, unsigned line, unsigned num);
     62extern  void    vbank(uint16_t b);
     63extern  void    objon(uint16_t obj, uint16_t line, uint16_t num);
    6464extern  void    VIint(void);
    6565
    66 short           wsize;          /* object width calculated by SetObj() */
    67 short           vi_dis;         /* disable use of VIint */
    68 
    69 unsigned        vi_ctl;         /* object unblank control bits */
     66int16_t         wsize;          /* object width calculated by SetObj() */
     67int16_t         vi_dis;         /* disable use of VIint */
     68
     69uint16_t        vi_ctl;         /* object unblank control bits */
    7070
    7171/*
     
    7979*/
    8080
    81 void SelObj(int obj)
     81void SelObj(int16_t obj)
    8282{
    8383        register struct octent *op;
    84         register unsigned newbank;
     84        register uint16_t newbank;
    8585
    8686        op = &v_obtab[obj];
     
    109109*/
    110110
    111 void SetPri(int obj, int pri)
     111void SetPri(int16_t obj, int16_t pri)
    112112{
    113113        register struct octent *op;
     
    121121        v_odtab[pri][0] = op->odtw0 | V_BLA;    /* start object as blanked */
    122122        v_odtab[pri][1] = op->odtw1;
    123         v_odtab[pri][2] = ((long)op->obase >> 1) & 0xFFFF;
     123        v_odtab[pri][2] = ((int32_t)op->obase >> 1) & 0xFFFF;
    124124
    125125        objon(pri, op->objy, op->ysize);        /* enable access table bits */
     
    132132        vi_ctl |= (1 << pri);                   /* set unblank bit */
    133133
    134         if (*((long *)0x000064) NE &VIint)      /* make sure VI vector is set */
     134        if (*((int32_t *)0x000064) NE &VIint)   /* make sure VI vector is set */
    135135                BIOS(B_SETV, 25, VIint);
    136136
     
    149149*/
    150150
    151 void SetObj(int obj, int type, int bank, int xpix, int ypix, int x0, int y0, int flags, int pri, unsigned int *base)
     151void SetObj(int16_t obj, int16_t type, int16_t bank, int16_t xpix, int16_t ypix, int16_t x0, int16_t y0, int16_t flags, int16_t pri, uint16_t *base)
    152152{
    153153        register struct octent *op;
     
    252252*/
    253253
    254 void CpyObj(unsigned *from, unsigned *to, unsigned w, unsigned h, unsigned sw)
    255 {
    256         register unsigned *tp;
    257         register unsigned i, j;
     254void CpyObj(uint16_t *from, uint16_t *to, uint16_t w, uint16_t h, uint16_t sw)
     255{
     256        register uint16_t *tp;
     257        register uint16_t i, j;
    258258
    259259        for (i = h; i--; ) {
  • vlib/vputs.c

    r0292fbb r7258c6a  
    1414#include <stddefs.h>
    1515
    16 typedef unsigned int    uint;
    17 
    18 extern  void    vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
     16extern  void    vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib);
    1917
    2018/*
     
    2725*/
    2826
    29 void vputs(uint *sbase, uint row, uint col, uint attrib, char *str)
     27void vputs(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t attrib, int8_t *str)
    3028{
    31         uint    c;
     29        uint16_t        c;
    3230
    3331        while (c = *str++) {
     
    5755*/
    5856
    59 void vputsa(uint *sbase, uint row, uint col, uint *attrib, char *str)
     57void vputsa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *attrib, int8_t *str)
    6058{
    61         uint    c;
     59        uint16_t        c;
    6260
    6361        while (c = *str++) {
  • vlib/vputsv.c

    r0292fbb r7258c6a  
    1414#include "stddefs.h"
    1515
    16 typedef unsigned int    uint;
    17 
    18 extern  void    vputcv(unsigned *adr, unsigned row, unsigned col, unsigned char, unsigned atr, unsigned cols);
     16extern  void    vputcv(uint16_t *adr, uint16_t row, uint16_t col, uint8_t chr, uint16_t atr, uint16_t cols);
    1917
    2018/*
     
    2725*/
    2826
    29 void vputsv(uint *sbase, uint row, uint col, char *str, uint attrib, uint len)
     27void vputsv(uint16_t *sbase, uint16_t row, uint16_t col, int8_t *str, uint16_t attrib, uint16_t len)
    3028{
    31         uint    c;
     29        uint16_t        c;
    3230
    3331        while (c = *str++) {
     
    5856*/
    5957
    60 void vputsav(uint *sbase, uint row, uint col, char *str, uint *attrib, uint len)
     58void vputsav(uint16_t *sbase, uint16_t row, uint16_t col, int8_t *str, uint16_t *attrib, uint16_t len)
    6159{
    62         uint    c;
     60        uint16_t        c;
    6361
    6462        while (c = *str++) {
  • vlib/vsetpal.c

    r0292fbb r7258c6a  
    66*/
    77
    8 #define PALETTE         ((unsigned *)0x280000L)
     8#define PALETTE         ((uint16_t *)0x280000L)
    99
    10 short   dfltpal[16][3] = {
     10int16_t dfltpal[16][3] = {
    1111
    1212/*       R  G  B          color */
     
    4545*/
    4646
    47 void vsetpal(unsigned slot, unsigned red, unsigned grn, unsigned blu)
     47void vsetpal(uint16_t slot, uint16_t red, uint16_t grn, uint16_t blu)
    4848{
    49         register unsigned palval;
    50         unsigned *pal;
     49        register uint16_t palval;
     50        uint16_t *pal;
    5151
    5252        pal = PALETTE;
     
    7979*/
    8080
    81 void vsndpal(short pp[16][3])
     81void vsndpal(int16_t pp[16][3])
    8282{
    83         register short i;
     83        register int16_t i;
    8484
    8585        for (i = 0; i < 16; i++)
  • vlib/vspray4.c

    r0292fbb r7258c6a  
    99#include "vsddsw.h"
    1010
    11 static  char cl[81];
     11static  int8_t cl[81];
    1212
    1313/*
     
    3030*/
    3131
    32 void vspray4(unsigned *vobj, short vwid, short fg, short vb, short pitch, char *ml[])
     32void vspray4(uint16_t *vobj, int16_t vwid, int16_t fg, int16_t vb, int16_t pitch, int8_t *ml[])
    3333{
    34         register char *cp, *lp, c;
    35         register short j, k, row;
     34        register int8_t *cp, *lp, c;
     35        register int16_t j, k, row;
    3636
    3737        row = 0;
  • vlib/vtext.c

    r0292fbb r7258c6a  
    88*/
    99
    10 static int      msk[] = { 0xFF00, 0x00FF };
     10static int16_t  msk[] = { 0xFF00, 0x00FF };
    1111
    12 void vtext(unsigned *obj, unsigned nc, unsigned row, unsigned col, char *ip)
     12void vtext(uint16_t *obj, uint16_t nc, uint16_t row, uint16_t col, int8_t *ip)
    1313{
    14         register unsigned *op;
     14        register uint16_t *op;
    1515
    1616        while (*ip) {
     
    1818                op = obj + ((nc >> 1) * row) + (col >> 1);
    1919
    20                 *op = (*op & (unsigned)msk[col & 1]) |
     20                *op = (*op & (uint16_t)msk[col & 1]) |
    2121                      ((*ip++ & 0x00FF) << ((col & 1) ? 8 : 0));
    2222
  • vlib/vwputm.c

    r0292fbb r7258c6a  
    1818#include <vsdd.h>
    1919
    20 extern  void    vwputs(int *obase, int nw, int fg, int bg, int row, int col, char *str);
     20extern  void    vwputs(int16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *str);
    2121
    2222/*
     
    2626*/
    2727
    28 void vwputm(unsigned int *obase, int nw, int fg, int bg, int row, int col, char *ml[])
     28void vwputm(uint16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *ml[])
    2929{
    3030        while (*ml) {
Note: See TracChangeset for help on using the changeset viewer.