Changeset 7258c6a in buchla-68k for include


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:
include
Files:
45 edited

Legend:

Unmodified
Added
Removed
  • include/asgdsp.h

    r0292fbb r7258c6a  
    1010struct  asgent  {       /* assignment table library entry structure */
    1111
    12         short   a_mop;                  /* MIDI output port */
    13         short   a_tun;                  /* tuning table number */
     12        int16_t a_mop;                  /* MIDI output port */
     13        int16_t a_tun;                  /* tuning table number */
    1414
    15         short   a_aux;                  /* auxiliary control state */
    16         short   a_intn;                 /* intensity */
    17         short   a_rate;                 /* rate */
    18         short   a_dpth;                 /* depth */
     15        int16_t a_aux;                  /* auxiliary control state */
     16        int16_t a_intn;                 /* intensity */
     17        int16_t a_rate;                 /* rate */
     18        int16_t a_dpth;                 /* depth */
    1919
    20         short   a_i2grp[12];            /* instrument to group table */
    21         short   a_gpdyn[12];            /* group dynamics table */
     20        int16_t a_i2grp[12];            /* instrument to group table */
     21        int16_t a_gpdyn[12];            /* group dynamics table */
    2222
    23         short   a_v2grp[12];            /* voice to group table */
    24         short   a_mctln[4];             /* MIDI controller number table */
    25         short   a_g2prt[12][2];         /* group to port and channel table */
    26         short   a_k2grp[88];            /* port 1 key to group assigment table */
     23        int16_t a_v2grp[12];            /* voice to group table */
     24        int16_t a_mctln[4];             /* MIDI controller number table */
     25        int16_t a_g2prt[12][2];         /* group to port and channel table */
     26        int16_t a_k2grp[88];            /* port 1 key to group assigment table */
    2727
    28         char    a_name[16];             /* assignment table name */
     28        int8_t  a_name[16];             /* assignment table name */
    2929};
    3030
  • include/biosdefs.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  long    trap13(short fun, ...);
    9 extern  long    trap14(short fun, ...);
     8extern  int32_t trap13(int16_t fun, ...);
     9extern  int32_t trap14(int16_t fun, ...);
    1010
    1111#define BIOS    trap13
     
    6565struct bpb {                    /* BIOS parameter block returned by B_GBPB */
    6666
    67         unsigned short  recsiz;         /* physical sector size in bytes */
    68         unsigned short  clsiz;          /* cluster size in sectors */
    69         unsigned short  clsizb;         /* cluster size in bytes */
    70         unsigned short  rdlen;          /* root directory length in sectors */
    71         unsigned short  fsiz;           /* FAT size in sectors */
    72         unsigned short  fatrec;         /* sector number of 1st sector of 2nd FAT */
    73         unsigned short  datrec;         /* sector number of 1st data sector */
    74         unsigned short  numcl;          /* number of data clusters on disk */
    75         unsigned short  bflags;         /* flags */
    76         unsigned short  ntracks;        /* number of tracks */
    77         unsigned short  nsides;         /* number of sides (heads) */
    78         unsigned short  dspc;           /* sectors per cylinder */
    79         unsigned short  dspt;           /* sectors per track */
    80         unsigned short  hidden;         /* number of hidden files */
    81         char    serno[3];               /* disk serial number */
    82         char    nada;                   /* --- filler - nothing here --- */
     67        uint16_t        recsiz;         /* physical sector size in bytes */
     68        uint16_t        clsiz;          /* cluster size in sectors */
     69        uint16_t        clsizb;         /* cluster size in bytes */
     70        uint16_t        rdlen;          /* root directory length in sectors */
     71        uint16_t        fsiz;           /* FAT size in sectors */
     72        uint16_t        fatrec;         /* sector number of 1st sector of 2nd FAT */
     73        uint16_t        datrec;         /* sector number of 1st data sector */
     74        uint16_t        numcl;          /* number of data clusters on disk */
     75        uint16_t        bflags;         /* flags */
     76        uint16_t        ntracks;        /* number of tracks */
     77        uint16_t        nsides;         /* number of sides (heads) */
     78        uint16_t        dspc;           /* sectors per cylinder */
     79        uint16_t        dspt;           /* sectors per track */
     80        uint16_t        hidden;         /* number of hidden files */
     81        int8_t  serno[3];               /* disk serial number */
     82        int8_t  nada;                   /* --- filler - nothing here --- */
    8383};
    8484
     
    9999struct dirent {                 /* Directory entry */
    100100
    101         char    fname[8];               /* file name */
    102         char    fext[3];                /* file extension */
    103         char    atrib;                  /* attribute byte */
    104         char    unused[10];             /* unused space */
    105         unsigned short  crtime;         /* 'LLHH' creation time */
    106         unsigned short  crdate;         /* 'LLHH' creation date */
    107         unsigned short  bclust;         /* 'LLHH' starting cluster number */
    108         long    flen;                   /* 'LLHH' file length */
     101        int8_t  fname[8];               /* file name */
     102        int8_t  fext[3];                /* file extension */
     103        int8_t  atrib;                  /* attribute byte */
     104        int8_t  unused[10];             /* unused space */
     105        uint16_t        crtime;         /* 'LLHH' creation time */
     106        uint16_t        crdate;         /* 'LLHH' creation date */
     107        uint16_t        bclust;         /* 'LLHH' starting cluster number */
     108        int32_t flen;                   /* 'LLHH' file length */
    109109};
    110110
     
    131131
    132132        struct  dirent  de;     /* directory entry image for file */
    133         unsigned short  modefl; /* fcb flags */
    134         unsigned short  clsec;  /* current sector in cluster */
    135         unsigned short  curcls; /* current cluster */
    136         unsigned short  offset; /* current offset into sector */
    137         long    curlsn;         /* current logical sector number in file */
    138         long    curdsn;         /* current logical sector number on disk */
    139         long    curlen;         /* current file length in bytes */
    140         long    asects;         /* allocated file length in sectors */
     133        uint16_t        modefl; /* fcb flags */
     134        uint16_t        clsec;  /* current sector in cluster */
     135        uint16_t        curcls; /* current cluster */
     136        uint16_t        offset; /* current offset into sector */
     137        int32_t curlsn;         /* current logical sector number in file */
     138        int32_t curdsn;         /* current logical sector number on disk */
     139        int32_t curlen;         /* current file length in bytes */
     140        int32_t asects;         /* allocated file length in sectors */
    141141};
    142142
  • include/cmeta.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  void    CMinit(char *ip);
    9 extern  int     CMstat(char *msg);
    10 extern  int     CMchr(char c);
    11 extern  int     CMuchr(char c);
    12 extern  int     CMstr(char *s);
    13 extern  int     CMustr(char *s);
    14 extern  int     CMlong(void);
    15 extern  int     CMdig(void);
    16 extern  int     CMlist(char *l[]);
    17 extern  int     CMulist(char *l[]);
     8extern  void    CMinit(int8_t *ip);
     9extern  int16_t CMstat(int8_t *msg);
     10extern  int16_t CMchr(int8_t c);
     11extern  int16_t CMuchr(int8_t c);
     12extern  int16_t CMstr(int8_t *s);
     13extern  int16_t CMustr(int8_t *s);
     14extern  int16_t CMlong(void);
     15extern  int16_t CMdig(void);
     16extern  int16_t CMlist(int8_t *l[]);
     17extern  int16_t CMulist(int8_t *l[]);
    1818
    19 extern  int     QQsw;
    20 extern  int     QQanch;
     19extern  int16_t QQsw;
     20extern  int16_t QQanch;
    2121
    22 extern  char    *QQin;
    23 extern  char    *QQip;
    24 extern  char    *QQop;
     22extern  int8_t  *QQin;
     23extern  int8_t  *QQip;
     24extern  int8_t  *QQop;
    2525
    26 extern  long    QQnum;
    27 extern  int     QQlnum;
    28 extern  char    QQchr;
    29 extern  char    QQdig;
     26extern  int32_t QQnum;
     27extern  int16_t QQlnum;
     28extern  int8_t  QQchr;
     29extern  int8_t  QQdig;
    3030
    31 extern  char    QQstr[];
     31extern  int8_t  QQstr[];
    3232
    3333#define CM_CHR(c)       CMchr(c)
  • include/configs.h

    r0292fbb r7258c6a  
    33/* Configuration 0 */
    44
    5 char    cfg_00[64][3] = {
     5int8_t  cfg_00[64][3] = {
    66
    77        {22, 18, 104},  /* 1 */
     
    6666/* Configuration 1 */
    6767
    68 char    cfg_01[64][3] = {
     68int8_t  cfg_01[64][3] = {
    6969
    7070        {22, 16, 104},  /* 1 */
     
    133133/* Configuration 2 */
    134134
    135 char    cfg_02[64][3] = {
     135int8_t  cfg_02[64][3] = {
    136136
    137137        {22, 36, 104},  /* 1 */
     
    197197/* Configuration 3 */
    198198
    199 char    cfg_03[64][3] = {
     199int8_t  cfg_03[64][3] = {
    200200
    201201        {20, 44, 43},   /* 1 */
     
    259259/* Configuration 4 */
    260260
    261 char    cfg_04[64][3] = {
     261int8_t  cfg_04[64][3] = {
    262262
    263263        {19, 65, 26},   /* 1 */
     
    312312/* Configuration 5 */
    313313
    314 char    cfg_05[64][3] = {
     314int8_t  cfg_05[64][3] = {
    315315
    316316        {19, 16, 42},   /* 1 */
     
    374374/* Configuration 6 */
    375375
    376 char    cfg_06[64][3] = {
     376int8_t  cfg_06[64][3] = {
    377377
    378378        {21, 65, 26},   /* 1 */
     
    425425/* Configuration 7 */
    426426
    427 char    cfg_07[64][3] = {
     427int8_t  cfg_07[64][3] = {
    428428
    429429        {22, 18, 104},  /* 1 */
     
    477477/* Configuration 8 */
    478478
    479 char    cfg_08[64][3] = {
     479int8_t  cfg_08[64][3] = {
    480480
    481481        {20, 66, 104},  /* 1 */
     
    535535/* Configuration 9 */
    536536
    537 char    cfg_09[64][3] = {
     537int8_t  cfg_09[64][3] = {
    538538
    539539        {22, 36, 104},  /* 1 */
     
    599599/* Configuration 10 */
    600600
    601 char    cfg_10[64][3] = {
     601int8_t  cfg_10[64][3] = {
    602602
    603603        {19, 18, 26},   /* 1 */
     
    666666/* Configuration 11 */
    667667
    668 char    cfg_11[64][3] = {
     668int8_t  cfg_11[64][3] = {
    669669
    670670        {21, 68, 26},   /* 1 */
     
    729729};
    730730
    731 char    *cfgptr[MAXCFG] = {
    732 
    733         (char *)cfg_00, (char *)cfg_01, (char *)cfg_02, (char *)cfg_03,
    734         (char *)cfg_04, (char *)cfg_05, (char *)cfg_06, (char *)cfg_07,
    735         (char *)cfg_08, (char *)cfg_09, (char *)cfg_10, (char *)cfg_11
    736 };
     731int8_t  *cfgptr[MAXCFG] = {
     732
     733        (int8_t *)cfg_00, (int8_t *)cfg_01, (int8_t *)cfg_02, (int8_t *)cfg_03,
     734        (int8_t *)cfg_04,       (int8_t *)cfg_05, (int8_t *)cfg_06, (int8_t *)cfg_07,
     735        (int8_t *)cfg_08, (int8_t *)cfg_09, (int8_t *)cfg_10, (int8_t *)cfg_11
     736};
     737
  • include/ctype.h

    r0292fbb r7258c6a  
    9898
    9999extern  void    ___atab(void);
    100 extern  char __atab[];          /* character type table */
     100extern  int8_t __atab[];                /* character type table */
    101101
    102102#endif  /* SYS5CODE */
  • include/curpak.h

    r0292fbb r7258c6a  
    2020struct curpak {
    2121
    22         short           (*curtype)(void);
     22        int16_t         (*curtype)(void);
    2323        void            (*premove)(void);
    2424        void            (*pstmove)(void);
     
    3232        void            (*e_key)(void);
    3333        void            (*m_key)(void);
    34         void            (*d_key)(short k);
    35         short           (*not_fld)(short k);
     34        void            (*d_key)(int16_t k);
     35        int16_t         (*not_fld)(int16_t k);
    3636        struct fet      *curfet;
    3737        struct selbox   *csbp;
    38         short           *cratex;
    39         short           *cratey;
    40         short           cmtype;
    41         short           cxval;
    42         short           cyval;
     38        int16_t         *cratex;
     39        int16_t         *cratey;
     40        int16_t         cmtype;
     41        int16_t         cxval;
     42        int16_t         cyval;
    4343};
     44
  • include/dfltins.h

    r0292fbb r7258c6a  
    1 short   dfltins[] = {           /* default instrument */
     1
     2int16_t dfltins[] = {           /* default instrument */
    23
    34        0x0000, 0x4465, 0x2046, 0x6175, 0x6C74, 0x2020, 0x2020, 0x2020,
  • include/errno.h

    r0292fbb r7258c6a  
    77 */
    88
    9 extern  int     errno;
     9extern  int16_t errno;
    1010
    1111#define EPERM   1
  • include/fields.h

    r0292fbb r7258c6a  
    1010struct fet {                    /* field definition structure */
    1111
    12         short   frow;           /* row the field is in */
    13         short   flcol;          /* leftmost column of field */
    14         short   frcol;          /* rightmost column of field */
    15         short   ftags;          /* field tags / parameters (used variously) */
    16         short   (*ebto)(short n);
     12        int16_t frow;           /* row the field is in */
     13        int16_t flcol;          /* leftmost column of field */
     14        int16_t frcol;          /* rightmost column of field */
     15        int16_t ftags;          /* field tags / parameters (used variously) */
     16        int16_t (*ebto)(int16_t n);
    1717                                /* edit buffer 'to' (setup) function */
    18         short   (*ebfrom)(short n);
     18        int16_t (*ebfrom)(int16_t n);
    1919                                /* edit buffer 'from' (parse) function */
    20         short   (*redisp)(short nn);
     20        int16_t (*redisp)(int16_t nn);
    2121                                /* field (re)display function */
    22         short   (*datain)(short nn, short k);
     22        int16_t (*datain)(int16_t nn, int16_t k);
    2323                                /* data entry function */
    2424};
     
    2626struct  selbox  {               /* selection box structure */
    2727
    28         short   sbxmin;         /* minimum x - left edge of box */
    29         short   sbymin;         /* minimum y - top edge of box */
    30         short   sbxmax;         /* maximum x - right edge of box */
    31         short   sbymax;         /* maximum y - bottom edge of box */
    32         short   sbarg;          /* select box argument */
    33         short   (*boxhit)(short n);
     28        int16_t sbxmin;         /* minimum x - left edge of box */
     29        int16_t sbymin;         /* minimum y - top edge of box */
     30        int16_t sbxmax;         /* maximum x - right edge of box */
     31        int16_t sbymax;         /* maximum y - bottom edge of box */
     32        int16_t sbarg;          /* select box argument */
     33        int16_t (*boxhit)(int16_t n);
    3434                                /* box-hit function */
    3535};
    3636
    3737#ifndef FET_DEFS
    38 extern  short   ebflag;                 /* edit buffer setup flag */
    39 extern  char    ebuf[MAXEBUF+1];        /* edit buffer */
     38extern  int16_t ebflag;                 /* edit buffer setup flag */
     39extern  int8_t  ebuf[MAXEBUF+1];        /* edit buffer */
    4040
    4141extern  struct  fet *curfet;            /* current fet table pointer */
  • include/fspars.h

    r0292fbb r7258c6a  
    1515
    1616#define BUFSIZL 256                             /* buffer length -- longs */
    17 #define BUFSIZ  (sizeof (long) * BUFSIZL)       /* buffer length -- chars */
     17#define BUFSIZ  (sizeof (int32_t) * BUFSIZL)    /* buffer length -- chars */
    1818
    1919#define BPSEC           512     /* bytes per disk sector */
     
    2424#define MAXDIRNT        224     /* maximum number of directory entries */
    2525
    26 typedef char    *io_arg;        /* must be big enough to contain a pointer */
     26typedef int8_t  *io_arg;        /* must be big enough to contain a pointer */
    2727
    2828#endif
  • include/glcbars.h

    r0292fbb r7258c6a  
    44*/
    55
    6 short   BBase   = 9;            /* bottom line of bar graph */
    7 short   BCenter = 32;           /* center line of bar graph */
    8 short   BTop    = 53;           /* top line of bar graph */
    9 short   BOffset = 128;          /* data offset for centered-zero bars */
     6int16_t BBase   = 9;            /* bottom line of bar graph */
     7int16_t BCenter = 32;           /* center line of bar graph */
     8int16_t BTop    = 53;           /* top line of bar graph */
     9int16_t BOffset = 128;          /* data offset for centered-zero bars */
    1010
    11 short   BarBLn[128] = {         /* bottom-zero bar lines */
     11int16_t BarBLn[128] = {         /* bottom-zero bar lines */
    1212
    1313         9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15,
     
    2121};
    2222
    23 short   BarCLn[256] = {         /* centered-zero bar lines */
     23int16_t BarCLn[256] = {         /* centered-zero bar lines */
    2424
    2525         9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11,
  • include/glcdefs.h

    r0292fbb r7258c6a  
    66*/
    77
    8 #define G_INIT          (char)0x40
    9 #define G_MWRITE        (char)0x42
    10 #define G_MREAD         (char)0x43
    11 #define G_SETSAD        (char)0x44
    12 #define G_CRSWR         (char)0x46
    13 #define G_CRSRD         (char)0x47
    14 #define G_CRSMRT        (char)0x4C
    15 #define G_CRSMLT        (char)0x4D
    16 #define G_CRSMUP        (char)0x4E
    17 #define G_CRSMDN        (char)0x4F
    18 #define G_ERASE         (char)0x52
    19 #define G_SLEEP         (char)0x53
    20 #define G_DSPCTL        (char)0x58
    21 #define G_HSCRL         (char)0x5A
    22 #define G_OVRLAY        (char)0x5B
    23 #define G_CGRAM         (char)0x5C
    24 #define G_CRSFRM        (char)0x5D
     8#define G_INIT          (int8_t)0x40
     9#define G_MWRITE        (int8_t)0x42
     10#define G_MREAD         (int8_t)0x43
     11#define G_SETSAD        (int8_t)0x44
     12#define G_CRSWR         (int8_t)0x46
     13#define G_CRSRD         (int8_t)0x47
     14#define G_CRSMRT        (int8_t)0x4C
     15#define G_CRSMLT        (int8_t)0x4D
     16#define G_CRSMUP        (int8_t)0x4E
     17#define G_CRSMDN        (int8_t)0x4F
     18#define G_ERASE         (int8_t)0x52
     19#define G_SLEEP         (int8_t)0x53
     20#define G_DSPCTL        (int8_t)0x58
     21#define G_HSCRL         (int8_t)0x5A
     22#define G_OVRLAY        (int8_t)0x5B
     23#define G_CGRAM         (int8_t)0x5C
     24#define G_CRSFRM        (int8_t)0x5D
    2525
    2626#define LCD_WC          lcd_a1
     
    2929#define LCD_RD          lcd_a1
    3030
    31 #define G_PLANE1        (unsigned)0x0000
    32 #define G_PLANE2        (unsigned)0x2000
     31#define G_PLANE1        (uint16_t)0x0000
     32#define G_PLANE2        (uint16_t)0x2000
    3333
    3434#define G_OFF           0               /* off */
  • include/glcfns.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  unsigned        GLCcrc(unsigned row, unsigned col);
    9 extern  unsigned        GLCcxy(unsigned x, unsigned y);
    10 extern  void    GLCplot(unsigned x, unsigned y, unsigned val);
     8extern  uint16_t        GLCcrc(uint16_t row, uint16_t col);
     9extern  uint16_t        GLCcxy(uint16_t x, uint16_t y);
     10extern  void    GLCplot(uint16_t x, uint16_t y, uint16_t val);
    1111extern  void    GLCinit(void);
    12 extern  void    GLCwrts(char *s);
    13 extern  void    GLCtext(unsigned row, unsigned col, char *s);
    14 extern  void    GLCdisp(short dsp, short crs, short blk1, short blk2, short blk3);
    15 extern  void    GLCcurs(short crs);
     12extern  void    GLCwrts(int8_t *s);
     13extern  void    GLCtext(uint16_t row, uint16_t col, int8_t *s);
     14extern  void    GLCdisp(int16_t dsp, int16_t crs, int16_t blk1, int16_t blk2, int16_t blk3);
     15extern  void    GLCcurs(int16_t crs);
    1616
    17 extern  unsigned        lcdx, lcdy, lcdbit, lcdrow, lcdcol, lcdbase;
    18 extern  unsigned        lcdctl1, lcdctl2;
     17extern  uint16_t        lcdx, lcdy, lcdbit, lcdrow, lcdcol, lcdbase;
     18extern  uint16_t        lcdctl1, lcdctl2;
     19
     20
  • include/hwdefs.h

    r0292fbb r7258c6a  
    88/* hardware addresses */
    99
    10 extern  char    io_time[], io_lcd, io_ser, io_midi;
    11 extern  char    io_disk, io_tone, io_leds, io_kbrd;
    12 extern  char    lcd_a0, lcd_a1;
     10extern  int8_t  io_time[], io_lcd, io_ser, io_midi;
     11extern  int8_t  io_disk, io_tone, io_leds, io_kbrd;
     12extern  int8_t  lcd_a0, lcd_a1;
    1313
    14 extern  unsigned        io_vreg[], io_vraw[], io_vram[], io_fpu[];
     14extern  uint16_t        io_vreg[], io_vraw[], io_vram[], io_fpu[];
    1515
    1616
    1717/* video memory allocations */
    1818
    19 extern  unsigned        v_regs[], v_odtab[][4], v_actab[];
    20 extern  unsigned        v_ct0[], v_gt1[], v_score[], v_cgtab[];
     19extern  uint16_t        v_regs[], v_odtab[][4], v_actab[];
     20extern  uint16_t        v_ct0[], v_gt1[], v_score[], v_cgtab[];
    2121
    22 extern  unsigned        v_curs0[], v_curs1[], v_curs2[], v_curs3[];
    23 extern  unsigned        v_curs4[], v_curs5[], v_curs6[], v_curs7[];
    24 extern  unsigned        v_tcur[], v_kbobj[], v_lnobj[];
    25 extern  unsigned        v_win0[], v_cur[];
     22extern  uint16_t        v_curs0[], v_curs1[], v_curs2[], v_curs3[];
     23extern  uint16_t        v_curs4[], v_curs5[], v_curs6[], v_curs7[];
     24extern  uint16_t        v_tcur[], v_kbobj[], v_lnobj[];
     25extern  uint16_t        v_win0[], v_cur[];
    2626
    2727
    2828/* stuff in the depths of the bios */
    2929
    30 extern  short   fc_sw;
     30extern  int16_t fc_sw;
    3131
    32 extern  long    fc_val;
     32extern  int32_t fc_val;
     33
  • include/instdsp.h

    r0292fbb r7258c6a  
    117117
    118118        struct  pflent  *nextpf;        /* next entry pointer */
    119         unsigned        pftrig;         /* trigger number */
    120         unsigned        pfvpval;        /* voice / parameter number */
    121         long            d1reg;          /* D1 register contents */
    122         long            d2reg;          /* D2 register contents */
    123         long            d4reg;          /* D4 register contents */
    124         char            *a1reg;         /* A1 register contents */
    125         char            *a2reg;         /* A2 register contents */
    126         char            *a3reg;         /* A3 register contents */
     119        uint16_t        pftrig;         /* trigger number */
     120        uint16_t        pfvpval;        /* voice / parameter number */
     121        int32_t         d1reg;          /* D1 register contents */
     122        int32_t         d2reg;          /* D2 register contents */
     123        int32_t         d4reg;          /* D4 register contents */
     124        int8_t          *a1reg;         /* A1 register contents */
     125        int8_t          *a2reg;         /* A2 register contents */
     126        int8_t          *a3reg;         /* A3 register contents */
    127127};
    128128
     
    135135struct  instpnt {       /* function point definition */
    136136
    137         short   iptim;          /* time (packed) */
    138         short   ipval;          /* value */
    139         short   ipvmlt;         /* value multiplier */
    140 
    141         char    ipvsrc;         /* value source */
    142         char    ipact;          /* action code */
     137        int16_t iptim;          /* time (packed) */
     138        int16_t ipval;          /* value */
     139        int16_t ipvmlt;         /* value multiplier */
     140
     141        int8_t  ipvsrc;         /* value source */
     142        int8_t  ipact;          /* action code */
    143143
    144144#define AC_NULL         0       /* null action */
     
    151151#define AC_UNDF         7       /* -- undefined - treated as AC_NULL -- */
    152152
    153         char    ippar1;         /* action parameter 1  (point) */
    154         char    ippar2;         /* action parameter 2  (count) */
    155 
    156         char    ippar3;         /* action parameter 3  (counter) */
    157         char    ippad;          /* padding for even boundary */
     153        int8_t  ippar1;         /* action parameter 1  (point) */
     154        int8_t  ippar2;         /* action parameter 2  (count) */
     155
     156        int8_t  ippar3;         /* action parameter 3  (counter) */
     157        int8_t  ippad;          /* padding for even boundary */
    158158};
    159159
     
    166166struct  idfnhdr {       /* function header */
    167167
    168         short   idfpch;         /* pitch (used for freq1 only) */
    169         short   idfmlt;         /* overall value multiplier (-1 .. +1) */
    170 
    171         char    idfsrc;         /* overall value source */
    172         char    idfpif;         /* points in the function */
    173 
    174         char    idfpt1;         /* index of first point (0..NIPTS) */
    175         char    idftmd;         /* trigger mode and control bits */
     168        int16_t idfpch;         /* pitch (used for freq1 only) */
     169        int16_t idfmlt;         /* overall value multiplier (-1 .. +1) */
     170
     171        int8_t  idfsrc;         /* overall value source */
     172        int8_t  idfpif;         /* points in the function */
     173
     174        int8_t  idfpt1;         /* index of first point (0..NIPTS) */
     175        int8_t  idftmd;         /* trigger mode and control bits */
    176176
    177177#define I_TM_KEY        0x01    /* trigger on key closure */
     
    181181#define I_VNSUBN        0x08    /* new value sub-n bit    (matches hardware) */
    182182
    183         char    idfcpt;         /* index of current point (0..NIPTS) */
    184         char    idfprm;         /* parameter associated with this function */
    185 
    186         short   idftrg;         /* trigger that started the function */
     183        int8_t  idfcpt;         /* index of current point (0..NIPTS) */
     184        int8_t  idfprm;         /* parameter associated with this function */
     185
     186        int16_t idftrg;         /* trigger that started the function */
    187187};
    188188
     
    195195struct  instdef {       /* instrument definition */
    196196
    197         short   idhflag;                /* flags */
    198 
    199         char    idhname[MAXIDLN+1];     /* instrument name */
    200         char    idhcom1[MAXIDLN+1];     /* first line of comments */
    201         char    idhcom2[MAXIDLN+1];     /* second line of comments */
    202         char    idhcom3[MAXIDLN+1];     /* third line of comments */
    203 
    204         char    idhcfg;                 /* configuration byte */
    205         char    idhplft;                /* points unused */
    206 
    207         char    idhwsa;                 /* waveshape A library number */
    208         char    idhwsb;                 /* waveshape B library number */
    209 
    210         char    idhos1c;                /* oscillator 1 controls */
    211         char    idhos2c;                /* oscillator 2 controls */
    212         char    idhos3c;                /* oscillator 3 controls */
    213         char    idhos4c;                /* oscillator 4 controls */
     197        int16_t idhflag;                /* flags */
     198
     199        int8_t  idhname[MAXIDLN+1];     /* instrument name */
     200        int8_t  idhcom1[MAXIDLN+1];     /* first line of comments */
     201        int8_t  idhcom2[MAXIDLN+1];     /* second line of comments */
     202        int8_t  idhcom3[MAXIDLN+1];     /* third line of comments */
     203
     204        int8_t  idhcfg;                 /* configuration byte */
     205        int8_t  idhplft;                /* points unused */
     206
     207        int8_t  idhwsa;                 /* waveshape A library number */
     208        int8_t  idhwsb;                 /* waveshape B library number */
     209
     210        int8_t  idhos1c;                /* oscillator 1 controls */
     211        int8_t  idhos2c;                /* oscillator 2 controls */
     212        int8_t  idhos3c;                /* oscillator 3 controls */
     213        int8_t  idhos4c;                /* oscillator 4 controls */
    214214
    215215#define OC_MOD          0x0003          /* oscillator mode mask */
     
    222222#define OC_SYN          0x0004          /* oscillator in sync mode */
    223223
    224         short   idhos1v;                /* oscillator 1 value */
    225         short   idhos2v;                /* oscillator 2 value */
    226         short   idhos3v;                /* oscillator 3 value */
    227         short   idhos4v;                /* oscillator 4 value */
     224        int16_t idhos1v;                /* oscillator 1 value */
     225        int16_t idhos2v;                /* oscillator 2 value */
     226        int16_t idhos3v;                /* oscillator 3 value */
     227        int16_t idhos4v;                /* oscillator 4 value */
    228228
    229229        struct  idfnhdr idhfnc[NFINST]; /* function headers */
     
    231231        struct  instpnt idhpnt[NIPNTS]; /* point table */
    232232
    233         short   idhwvaf[NUMWPNT];       /* waveshape A final values */
    234         short   idhwvao[NUMWPNT];       /* waveshape A offset values */
    235         short   idhwvah[NUMHARM];       /* waveshape A harmonic values */
    236 
    237         short   idhwvbf[NUMWPNT];       /* waveshape B final values */
    238         short   idhwvbo[NUMWPNT];       /* waveshape B offset values */
    239         short   idhwvbh[NUMHARM];       /* waveshape B harmonic values */
    240 
    241 };
     233        int16_t idhwvaf[NUMWPNT];       /* waveshape A final values */
     234        int16_t idhwvao[NUMWPNT];       /* waveshape A offset values */
     235        int16_t idhwvah[NUMHARM];       /* waveshape A harmonic values */
     236
     237        int16_t idhwvbf[NUMWPNT];       /* waveshape B final values */
     238        int16_t idhwvbo[NUMWPNT];       /* waveshape B offset values */
     239        int16_t idhwvbh[NUMHARM];       /* waveshape B harmonic values */
     240
     241};
  • include/io.h

    r0292fbb r7258c6a  
    1010struct channel {                /* channel table entry */
    1111
    12         char    c_read;         /* read routine index */
    13         char    c_write;        /* write routine index */
    14         char    c_ioctl;        /* ioctl routine index */
    15         char    c_seek;         /* seek routine index */
    16         int     (*c_close)();   /* close function pointer */
     12        int8_t  c_read;         /* read routine index */
     13        int8_t  c_write;        /* write routine index */
     14        int8_t  c_ioctl;        /* ioctl routine index */
     15        int8_t  c_seek;         /* seek routine index */
     16        int16_t (*c_close)();   /* close function pointer */
    1717        io_arg  c_arg;          /* argument to channel driver */
    1818};
     
    2020struct device {                 /* device control structure */
    2121
    22         char    d_read;         /* read routine code */
    23         char    d_write;        /* write routine code */
    24         char    d_ioctl;        /* ioctl routine code */
    25         char    d_seek;         /* seek routine code */
    26         int     (*d_open)();    /* special open function */
     22        int8_t  d_read;         /* read routine code */
     23        int8_t  d_write;        /* write routine code */
     24        int8_t  d_ioctl;        /* ioctl routine code */
     25        int8_t  d_seek;         /* seek routine code */
     26        int16_t (*d_open)();    /* special open function */
    2727};
    2828
    2929struct devtabl {                /* device table entry */
    3030
    31         char    *d_name;        /* device name */
     31        int8_t  *d_name;        /* device name */
    3232        struct  device  *d_dev; /* pointer to device structure */
    3333        io_arg  d_arg;          /* argument to device driver */
     
    3737
    3838extern  struct channel chantab[MAXCHAN];        /* defined in fsinit.c */
    39 extern  char    Wrkbuf[BPSEC];                  /* defined in fsinit.c */
     39extern  int8_t  Wrkbuf[BPSEC];                  /* defined in fsinit.c */
    4040
    4141#endif
  • include/knmtab.h

    r0292fbb r7258c6a  
    2020*/
    2121
    22 short   knmtab[32][256] = {
     22int16_t knmtab[32][256] = {
    2323
    2424/*
  • include/libdsp.h

    r0292fbb r7258c6a  
    9191struct  scndx {         /* score index */
    9292
    93         long    sclen;          /* score length */
    94         char    scfnm[16];      /* score name */
     93        int32_t sclen;          /* score length */
     94        int8_t  scfnm[16];      /* score name */
    9595};
    9696
    9797struct  fcat {          /* file catalog entry */
    9898
    99         char    fcsize[3];      /* allocated size in clusters */
    100         char    fcp0;           /* parameter 0 - Autoload flag */
    101         char    fcname[8];      /* directory name */
    102         char    fcp1;           /* parameter 1 - -reserved- */
    103         char    fcextn[3];      /* directory extension  (file type) */
    104         char    fcp2;           /* parameter 2 - -reserved- */
    105         char    fccmnt[37];     /* comment field */
    106         char    fceol[2];       /* end of line  (CR, LF) */
     99        int8_t  fcsize[3];      /* allocated size in clusters */
     100        int8_t  fcp0;           /* parameter 0 - Autoload flag */
     101        int8_t  fcname[8];      /* directory name */
     102        int8_t  fcp1;           /* parameter 1 - -reserved- */
     103        int8_t  fcextn[3];      /* directory extension  (file type) */
     104        int8_t  fcp2;           /* parameter 2 - -reserved- */
     105        int8_t  fccmnt[37];     /* comment field */
     106        int8_t  fceol[2];       /* end of line  (CR, LF) */
    107107};
    108108
    109109struct  mlibhdr {       /* MIDAS library file header */
    110110
    111         char    l_csum[8];      /* checksum in HEX ASCII, of all but l_csum[] */
    112         char    l_name[8];      /* file name */
    113         char    l_type[3];      /* file type */
    114         char    l_cmnt[37];     /* comment */
     111        int8_t  l_csum[8];      /* checksum in HEX ASCII, of all but l_csum[] */
     112        int8_t  l_name[8];      /* file name */
     113        int8_t  l_type[3];      /* file type */
     114        int8_t  l_cmnt[37];     /* comment */
    115115};
    116116
    117117#define LH_LEN          (sizeof (struct mlibhdr))
    118118
    119 #define OR_LEN1         ((long)&idefs[0].idhwvaf[0]-(long)&idefs[0].idhflag)
     119#define OR_LEN1         ((int32_t)&idefs[0].idhwvaf[0]-(int32_t)&idefs[0].idhflag)
    120120#define OR_LEN2         (2 * (NUMWPNT + NUMHARM))
    121121
  • include/memory.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  void    *memccpy(void *vp1, void *vp2, char c, int n);
    9 extern  void    *memchr(void *vp, char c, int n);
    10 extern  void    *memcpy(void *vp1, void *vp2, int n);
    11 extern  void    *memset(void *vp, char c, int n);
    12 extern  int     memcmp(void *vp1, void *vp2, int n);
    13 extern  void    *memsetw(void *vp, short s, short n);
    14 extern  void    *memcpyw(void *vp1, void *vp2, int n);
    15 extern  int     memcmpu(void *vp1, void *vp2, int n);
     8extern  void    *memccpy(void *vp1, void *vp2, int8_t c, int16_t n);
     9extern  void    *memchr(void *vp, int8_t c, int16_t n);
     10extern  void    *memcpy(void *vp1, void *vp2, int16_t n);
     11extern  void    *memset(void *vp, int8_t c, int16_t n);
     12extern  int16_t memcmp(void *vp1, void *vp2, int16_t n);
     13extern  void    *memsetw(void *vp, int16_t s, int16_t n);
     14extern  void    *memcpyw(void *vp1, void *vp2, int16_t n);
     15extern  int16_t memcmpu(void *vp1, void *vp2, int16_t n);
     16
     17
  • include/midas.h

    r0292fbb r7258c6a  
    88*/
    99
    10 typedef void    (*LPF)(short _1, short _2);     /* pointer to a LCD panel function */
     10typedef void    (*LPF)(int16_t _1, int16_t _2); /* pointer to a LCD panel function */
    1111
    1212#define SM_SCALE(x)     (((x) * 252) & 0x7FE0)
  • include/neddefs.h

    r0292fbb r7258c6a  
    88*/
    99
    10 extern  short   noteop, notesel;
     10extern  int16_t noteop, notesel;
    1111
    12 extern  long    t_note;
     12extern  int32_t t_note;
    1313
    1414extern  struct  n_entry *p_nbeg, *p_nend;
  • include/objdefs.h

    r0292fbb r7258c6a  
    88struct EXFILE {                 /* executable file header */
    99
    10         unsigned        F_Magic;        /* File type magic */
    11         long            F_Text;         /* SIze of text segment */
    12         long            F_Data;         /* Size of data segment */
    13         long            F_BSS;          /* Size of BSS segment */
    14         long            F_Symtab;       /* Size of symbol table */
    15         long            F_Res1;         /* Reserved area #1 */
    16         long            F_Res2;         /* Reserved area #2 -- text origin */
    17         unsigned        F_Res3;         /* Reserved area #3 -- flag word */
     10        uint16_t        F_Magic;        /* File type magic */
     11        int32_t         F_Text;         /* SIze of text segment */
     12        int32_t         F_Data;         /* Size of data segment */
     13        int32_t         F_BSS;          /* Size of BSS segment */
     14        int32_t         F_Symtab;       /* Size of symbol table */
     15        int32_t         F_Res1;         /* Reserved area #1 */
     16        int32_t         F_Res2;         /* Reserved area #2 -- text origin */
     17        uint16_t        F_Res3;         /* Reserved area #3 -- flag word */
    1818
    1919                                        /* data origin - long */
     
    2626struct SYMBOL {                 /* Symbol table entry -- 14 bytes */
    2727
    28         char            symname[8];     /* Symbol name  (LJZF) */
    29         unsigned        symtype;        /* Symbol type flags */
    30         long            symvalue;       /* Symbol value */
     28        int8_t          symname[8];     /* Symbol name  (LJZF) */
     29        uint16_t        symtype;        /* Symbol type flags */
     30        int32_t         symvalue;       /* Symbol value */
    3131};
    3232
  • include/patch.h

    r0292fbb r7258c6a  
    3737struct  patch   {       /* patch table entry (16 bytes per entry) */
    3838
    39         unsigned short  nextstm;        /* index of next entry in stm chain */
    40         unsigned short  prevstm;        /* index of previous entry in stm chain */
    41         unsigned short  defnum;         /* definer */
    42         unsigned short  stmnum;         /* stimulus */
    43         unsigned short  paspec;         /* destination type and flags */
    44         unsigned short  pasuba;         /* sub-address */
    45         unsigned short  padat1;         /* data word 1 */
    46         unsigned short  padat2;         /* data word 2 */
     39        uint16_t        nextstm;        /* index of next entry in stm chain */
     40        uint16_t        prevstm;        /* index of previous entry in stm chain */
     41        uint16_t        defnum;         /* definer */
     42        uint16_t        stmnum;         /* stimulus */
     43        uint16_t        paspec;         /* destination type and flags */
     44        uint16_t        pasuba;         /* sub-address */
     45        uint16_t        padat1;         /* data word 1 */
     46        uint16_t        padat2;         /* data word 2 */
    4747};
    4848
    4949struct  defent  {       /* definition table entry -- 10 bytes per entry */
    5050
    51         unsigned short  nextdef;        /* index of next in def chain */
    52         unsigned short  stm;            /* stimulus */
    53         unsigned short  adspec;         /* destination type */
    54         unsigned short  adsuba;         /* sub-address */
    55         unsigned short  addat1;         /* data word 1 */
     51        uint16_t        nextdef;        /* index of next in def chain */
     52        uint16_t        stm;            /* stimulus */
     53        uint16_t        adspec;         /* destination type */
     54        uint16_t        adsuba;         /* sub-address */
     55        uint16_t        addat1;         /* data word 1 */
    5656};
    5757
     
    6161struct  seqent  {       /* sequence table entry -- 14 bytes per entry */
    6262
    63         unsigned short  seqtime;        /* time */
    64         unsigned short  seqact1;        /* action 1 */
    65         unsigned short  seqdat1;        /* action 1 data */
    66         unsigned short  seqact2;        /* action 2 */
    67         unsigned short  seqdat2;        /* action 2 data */
    68         unsigned short  seqact3;        /* action 3 */
    69         unsigned short  seqdat3;        /* action 3 data */
     63        uint16_t        seqtime;        /* time */
     64        uint16_t        seqact1;        /* action 1 */
     65        uint16_t        seqdat1;        /* action 1 data */
     66        uint16_t        seqact2;        /* action 2 */
     67        uint16_t        seqdat2;        /* action 2 data */
     68        uint16_t        seqact3;        /* action 3 */
     69        uint16_t        seqdat3;        /* action 3 data */
    7070};
    7171
     
    7777
    7878#ifndef PATCHDEF
    79 extern  char            stmptr[];       /* stimulus pointer table */
    80 extern  char            defptr[];       /* definition pointer table */
     79extern  int8_t          stmptr[];       /* stimulus pointer table */
     80extern  int8_t          defptr[];       /* definition pointer table */
    8181
    8282extern  struct patch    patches[];      /* patch table */
     
    9191extern  struct seqent   seqtab[];               /* sequence table */
    9292
    93 extern  unsigned short  seqflag[16];            /* sequence flags */
    94 extern  unsigned short  seqline[16];            /* sequence line */
    95 extern  unsigned short  seqstim[16];            /* sequence stimulus */
    96 extern  unsigned short  seqtime[16];            /* sequence timers */
    97 extern  unsigned short  sregval[16];            /* register values */
    98 extern  unsigned short  trstate[16];            /* trigger states */
     93extern  uint16_t        seqflag[16];            /* sequence flags */
     94extern  uint16_t        seqline[16];            /* sequence line */
     95extern  uint16_t        seqstim[16];            /* sequence stimulus */
     96extern  uint16_t        seqtime[16];            /* sequence timers */
     97extern  uint16_t        sregval[16];            /* register values */
     98extern  uint16_t        trstate[16];            /* trigger states */
    9999
    100100#endif
  • include/ptoftab.h

    r0292fbb r7258c6a  
     1
    12/* Pitch to Frequency */
    23
    3 short ptoftab[] = {
     4int16_t ptoftab[] = {
    45
    56        0x0060, /*   0:     0.03561      0    0.00000 */
  • include/ratio.h

    r0292fbb r7258c6a  
     1
    12/* ratio.h -- generated:  1988-08-25  19:23:42 */
    23
    3 short   ratio[100] = {  /* ratio table */
     4int16_t ratio[100] = {  /* ratio table */
    45
    56            0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  • include/rawio.h

    r0292fbb r7258c6a  
    66*/
    77
    8 int     getln(int unit, int nb, char *buf);
    9 int     getrln(int unit, int nb, char *buf);
    10 int     readln(int unit, int nc, char *ctl, int nb, char *buf);
     8int16_t getln(int16_t unit, int16_t nb, int8_t *buf);
     9int16_t getrln(int16_t unit, int16_t nb, int8_t *buf);
     10int16_t readln(int16_t unit, int16_t nc, int8_t *ctl, int16_t nb, int8_t *buf);
    1111
    1212/* The following should really be void ... */
    1313
    14 void    writeln(int unit, char *buf);
     14void    writeln(int16_t unit, int8_t *buf);
     15
     16
  • include/regs.h

    r0292fbb r7258c6a  
    1111struct regs {
    1212
    13         long    d_reg[8];               /* Data registers d0..d7 */
     13        int32_t d_reg[8];               /* Data registers d0..d7 */
    1414
    15         char    *a_reg[8];              /* Address registers */
     15        int8_t  *a_reg[8];              /* Address registers */
    1616
    17         unsigned short  reg_fill,       /* Filler to keep long alignment */
     17        uint16_t        reg_fill,       /* Filler to keep long alignment */
    1818                        reg_sr,         /* Status register */
    1919                        *reg_pc;        /* Program counter */
  • include/scfns.h

    r0292fbb r7258c6a  
    88*/
    99
    10 extern  void    eh_ins(struct s_entry *ne, short et);
    11 extern  void    eh_rmv(struct s_entry *ev, short et);
    12 extern  void    sc_clr(short ns);
     10extern  void    eh_ins(struct s_entry *ne, int16_t et);
     11extern  void    eh_rmv(struct s_entry *ev, int16_t et);
     12extern  void    sc_clr(int16_t ns);
    1313
    14 extern  short   e_del(struct s_entry *e1);
    15 extern  short   selscor(short ns);
    16 extern  int     sc_goto(long tval);
     14extern  int16_t e_del(struct s_entry *e1);
     15extern  int16_t selscor(int16_t ns);
     16extern  int16_t sc_goto(int32_t tval);
    1717
    18 extern  long    scinit(void);
    19 extern  long    evleft(void);
     18extern  int32_t scinit(void);
     19extern  int32_t evleft(void);
    2020
    21 extern  struct  s_entry *e_alc(short w);
     21extern  struct  s_entry *e_alc(int16_t w);
    2222extern  struct  s_entry *e_ins(struct s_entry *e1, struct s_entry *e2);
    2323extern  struct  s_entry *e_rmv(struct s_entry *e1);
    2424extern  struct  s_entry *e_clr(struct s_entry *e1);
    25 extern  struct  s_entry *ehfind(short eh, long te, short d1, short d2);
    26 extern  struct  s_entry *frfind(long tval, int sdir);
    27 extern  struct  s_entry *ep_adj(struct s_entry *sep, int sdir, long tval);
    28 extern  struct  s_entry *se_exec(struct s_entry *ep, short sd);
    29 extern  struct  s_entry *findev(struct s_entry *ep, long te, short et, short d1, short d2);
     25extern  struct  s_entry *ehfind(int16_t eh, int32_t te, int16_t d1, int16_t d2);
     26extern  struct  s_entry *frfind(int32_t tval, int16_t sdir);
     27extern  struct  s_entry *ep_adj(struct s_entry *sep, int16_t sdir, int32_t tval);
     28extern  struct  s_entry *se_exec(struct s_entry *ep, int16_t sd);
     29extern  struct  s_entry *findev(struct s_entry *ep, int32_t te, int16_t et, int16_t d1, int16_t d2);
    3030
    31 extern  char    ac_code;
    32 extern  char    scname[][16];
     31extern  int8_t  ac_code;
     32extern  int8_t  scname[][16];
    3333
    3434extern  BOOL    se_chg;
    3535
    36 extern  short   curscor, cursect;
     36extern  int16_t curscor, cursect;
    3737
    38 extern  long    se1_cnt, se2_cnt, se3_cnt;
    39 extern  long    spool[], *pspool;
    40 extern  long    spcount, frags;
    41 extern  long    t_bak, t_cur, t_ctr, t_fwd;
     38extern  int32_t se1_cnt, se2_cnt, se3_cnt;
     39extern  int32_t spool[], *pspool;
     40extern  int32_t spcount, frags;
     41extern  int32_t t_bak, t_cur, t_ctr, t_fwd;
    4242
    4343extern  struct  s_entry *size1, *size2, *size3;
  • include/score.h

    r0292fbb r7258c6a  
    1515
    1616        struct  nevent  *nxt;
    17         short   group;
    18         short   note;
     17        int16_t group;
     18        int16_t note;
    1919};
    2020
    2121struct s_time {
    2222
    23         short   sflags;
    24         char    smpte[10];
     23        int16_t sflags;
     24        int8_t  smpte[10];
    2525};
    2626
     
    3333struct  s_entry {       /* event entry structure */
    3434
    35         long            e_time;         /* time, in frames */
    36         char            e_size;         /* size of entry, in longs */
    37         char            e_type;         /* type of entry */
    38         char            e_data1;        /* 1st 8 bits of data */
    39         char            e_data2;        /* 2nd 8 bits of data */
     35        int32_t         e_time;         /* time, in frames */
     36        int8_t          e_size;         /* size of entry, in longs */
     37        int8_t          e_type;         /* type of entry */
     38        int8_t          e_data1;        /* 1st 8 bits of data */
     39        int8_t          e_data2;        /* 2nd 8 bits of data */
    4040
    4141        struct s_entry  *e_bak,         /* backward pointer */
     
    5151struct  n_entry {       /* note entry structure */
    5252
    53         long            e_time;         /* time, in frames */
    54         char            e_size;         /* size of entry, in longs */
    55         char            e_type;         /* type of entry */
    56         char            e_note;         /* note number */
    57         char            e_group;        /* group */
     53        int32_t         e_time;         /* time, in frames */
     54        int8_t          e_size;         /* size of entry, in longs */
     55        int8_t          e_type;         /* type of entry */
     56        int8_t          e_note;         /* note number */
     57        int8_t          e_group;        /* group */
    5858
    5959        struct s_entry  *e_bak,         /* backward pointer */
    6060                        *e_fwd;         /* forward pointer */
    6161
    62         short           e_vel;          /* velocity */
    63         short           e_data4;
     62        int16_t         e_vel;          /* velocity */
     63        int16_t         e_data4;
    6464};
    6565
  • include/secdefs.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  short   secopok;
    9 extern  long    t_sbgn, t_send, t_sect, t_sec1, t_sec2, t_cbgn, t_cend;
     8extern  int16_t secopok;
     9extern  int32_t t_sbgn, t_send, t_sect, t_sec1, t_sec2, t_cbgn, t_cend;
    1010extern  struct  s_entry *p_sbgn, *p_send, *p_sec1, *p_sec2, *p_cbgn, *p_cend;
     11
  • include/setjmp.h

    r0292fbb r7258c6a  
    1717struct  JMP_BUF {       /* setjmp() / longjmp() environment structure */
    1818
    19         long    jmpret;         /* return address */
     19        int32_t jmpret;         /* return address */
    2020
    21         long    jmp_d1;         /* data registers */
    22         long    jmp_d2;
    23         long    jmp_d3;
    24         long    jmp_d4;
    25         long    jmp_d5;
    26         long    jmp_d6;
    27         long    jmp_d7;
     21        int32_t jmp_d1;         /* data registers */
     22        int32_t jmp_d2;
     23        int32_t jmp_d3;
     24        int32_t jmp_d4;
     25        int32_t jmp_d5;
     26        int32_t jmp_d6;
     27        int32_t jmp_d7;
    2828
    29         long    jmp_a1;         /* address registers */
    30         long    jmp_a2;
    31         long    jmp_a3;
    32         long    jmp_a4;
    33         long    jmp_a5;
    34         long    jmp_a6;
    35         long    jmp_a7;
     29        int32_t jmp_a1;         /* address registers */
     30        int32_t jmp_a2;
     31        int32_t jmp_a3;
     32        int32_t jmp_a4;
     33        int32_t jmp_a5;
     34        int32_t jmp_a6;
     35        int32_t jmp_a7;
    3636};
    3737
  • include/slice.h

    r0292fbb r7258c6a  
    1515
    1616        struct  gdsel   *next;          /* pointer to next element */
    17         short   note;                   /* note offset 0..87 */
    18         short   code;                   /* update code */
     17        int16_t note;                   /* note offset 0..87 */
     18        int16_t code;                   /* update code */
    1919};
    2020
  • include/smdefs.h

    r0292fbb r7258c6a  
    1010        struct  sment   *nxt;
    1111        struct  sment   *prv;
    12         unsigned        vp;
    13         unsigned        sm;
     12        uint16_t        vp;
     13        uint16_t        sm;
    1414};
    1515
     
    1818        struct  sment   *nxt;
    1919        struct  sment   *prv;
    20         unsigned        val;
     20        uint16_t        val;
    2121};
    2222
  • include/stdarg.h

    r0292fbb r7258c6a  
    66*/
    77
    8 typedef char    *va_list;
     8typedef int8_t  *va_list;
    99
    10 #define va_start(ap, last)      ap = (char *)&last + sizeof(last)
     10#define va_start(ap, last)      ap = (int8_t *)&last + sizeof(last)
    1111#define va_arg(ap, type)        (ap += sizeof(type), ap[-1])
    1212#define va_end(ap)
  • include/stddefs.h

    r0292fbb r7258c6a  
    9696/* BOOL type definition for flag variables */
    9797
    98 typedef char    BOOL;
     98typedef int8_t  BOOL;
    9999
    100100#endif
  • include/stdio.h

    r0292fbb r7258c6a  
    2222typedef struct {
    2323
    24         char    *_bp;           /* current position in buffer */
    25         char    *_bend;         /* last character in buffer + 1 */
    26         char    *_buff;         /* address of buffer */
    27         char    _flags;         /* {_BUSY, _ALLBUF, _DIRTY, _EOF, _IOERR} */
    28         char    _unit;          /* fd token returned by open */
    29         char    _bytbuf;        /* single byte buffer for unbuffered streams */
    30         char    _pad;           /* pad for alignment -- possibly use later */
    31         int     _buflen;        /* length of buffer */
     24        int8_t  *_bp;           /* current position in buffer */
     25        int8_t  *_bend;         /* last character in buffer + 1 */
     26        int8_t  *_buff;         /* address of buffer */
     27        int8_t  _flags;         /* {_BUSY, _ALLBUF, _DIRTY, _EOF, _IOERR} */
     28        int8_t  _unit;          /* fd token returned by open */
     29        int8_t  _bytbuf;        /* single byte buffer for unbuffered streams */
     30        int8_t  _pad;           /* pad for alignment -- possibly use later */
     31        int16_t _buflen;        /* length of buffer */
    3232
    3333} FILE;
     
    3636
    3737extern  FILE    Cbuffs[NSTREAMS];               /* table of FILE structures */
    38 extern  char    *Stdbufs;                       /* free list of buffers */
    39 extern  long    Stdbuf[MAXDFILE][BUFSIZL];      /* buffers */
     38extern  int8_t  *Stdbufs;                       /* free list of buffers */
     39extern  int32_t Stdbuf[MAXDFILE][BUFSIZL];      /* buffers */
    4040
    4141#endif
    4242
    43 extern  long    ftell(FILE *fp);
    44 extern  char    *gets(char *line);
    45 extern  char    *fgets(char *s, int n, FILE *fp);
    46 extern  FILE    *fopen(char *name, char *mode);
    47 extern  FILE    *fopena(char *name, char *mode);
    48 extern  FILE    *fopenb(char *name, char *mode);
     43extern  int32_t ftell(FILE *fp);
     44extern  int8_t  *gets(int8_t *line);
     45extern  int8_t  *fgets(int8_t *s, int16_t n, FILE *fp);
     46extern  FILE    *fopen(int8_t *name, int8_t *mode);
     47extern  FILE    *fopena(int8_t *name, int8_t *mode);
     48extern  FILE    *fopenb(int8_t *name, int8_t *mode);
    4949
    5050#define stdin   (&Cbuffs[0])
  • include/strings.h

    r0292fbb r7258c6a  
    66*/
    77
    8 extern  char    *strccpy(char *s1, char *s2, char c);
    9 extern  char    *strcpy(char *s1, char *s2);
    10 extern  char    *strncpy(char *s1, char *s2, int n);
    11 extern  char    *strcat(char *s1, char *s2);
    12 extern  char    *strncat(char *s1, char *s2, int n);
    13 extern  char    *strchr(char *sp, char c);
    14 extern  char    *strrchr(char *sp, char c);
    15 extern  char    *strpbrk(char *string, char *brkset);
    16 extern  char    *strtok(char *string, char *sepset);
    17 extern  char    *index(char *str, char c);
    18 extern  char    *rindex(char *str, char c);
    19 extern  char    *str2lc(char *s);
    20 extern  char    *str2uc(char *s);
     8extern  int8_t  *strccpy(int8_t *s1, int8_t *s2, int8_t c);
     9extern  int8_t  *strcpy(int8_t *s1, int8_t *s2);
     10extern  int8_t  *strncpy(int8_t *s1, int8_t *s2, int16_t n);
     11extern  int8_t  *strcat(int8_t *s1, int8_t *s2);
     12extern  int8_t  *strncat(int8_t *s1, int8_t *s2, int16_t n);
     13extern  int8_t  *strchr(int8_t *sp, int8_t c);
     14extern  int8_t  *strrchr(int8_t *sp, int8_t c);
     15extern  int8_t  *strpbrk(int8_t *string, int8_t *brkset);
     16extern  int8_t  *strtok(int8_t *string, int8_t *sepset);
     17extern  int8_t  *index(int8_t *str, int8_t c);
     18extern  int8_t  *rindex(int8_t *str, int8_t c);
     19extern  int8_t  *str2lc(int8_t *s);
     20extern  int8_t  *str2uc(int8_t *s);
    2121
    22 extern  int     strcmp(char *s1, char *s2);
    23 extern  int     strlcmp(char *s, char *l[]);
    24 extern  int     strncmp(char *s1, char *s2, int n);
    25 extern  int     strlen(char *s);
    26 extern  int     strspn(char *string, char *charset);
    27 extern  int     strcspn(char *string, char *charset);
     22extern  int16_t strcmp(int8_t *s1, int8_t *s2);
     23extern  int16_t strlcmp(int8_t *s, int8_t *l[]);
     24extern  int16_t strncmp(int8_t *s1, int8_t *s2, int16_t n);
     25extern  int16_t strlen(int8_t *s);
     26extern  int16_t strspn(int8_t *string, int8_t *charset);
     27extern  int16_t strcspn(int8_t *string, int8_t *charset);
    2828
    29 extern  long    strtol(char *str, char **ptr, int base);
     29extern  int32_t strtol(int8_t *str, int8_t **ptr, int16_t base);
     30
     31
  • include/swrtab.h

    r0292fbb r7258c6a  
    1 long swrtab[128] = {    /* scroll rates */
     1
     2int32_t swrtab[128] = { /* scroll rates */
    23
    34        0x00000000L, 0x00000800L, 0x00001000L, 0x00001800L,     /* 0 */
  • include/timers.h

    r0292fbb r7258c6a  
    1515#define MUTIMER         5               /* mouse buffer flush timer */
    1616
    17 extern  short   timers[NTIMERS];        /* timer array */
     17extern  int16_t timers[NTIMERS];        /* timer array */
     18
  • include/vsdd.h

    r0292fbb r7258c6a  
    5555struct octent {                 /* Object control table entry */
    5656
    57         unsigned int    ysize,  /* Height of object in pixels */
     57        uint16_t        ysize,  /* Height of object in pixels */
    5858                        xsize;  /* Width of object in pixels */
    5959
    60         int             objx,   /* Object x location */
     60        int16_t         objx,   /* Object x location */
    6161                        objy;   /* Object y location */
    6262
    63         unsigned int    *obase; /* Base of object data */
     63        uint16_t        *obase; /* Base of object data */
    6464
    65         char            opri,   /* Current object priority */
     65        int8_t          opri,   /* Current object priority */
    6666                        obank;  /* Object bank 0..3 */
    6767
    68         unsigned int    odtw0,  /* Object descriptor table word 0 */
     68        uint16_t        odtw0,  /* Object descriptor table word 0 */
    6969                        odtw1;  /* Object descriptor table word 1 */
    7070};
  • include/vsddsw.h

    r0292fbb r7258c6a  
    99/* functions */
    1010
    11 extern  void    vbank(unsigned b);
    12 extern  void    vputp(struct octent *octad, int xloc, int yloc, int val);
    13 extern  void    vwputp(struct octent *octad, int xloc, int yloc, int val);
     11extern  void    vbank(uint16_t b);
     12extern  void    vputp(struct octent *octad, int16_t xloc, int16_t yloc, int16_t val);
     13extern  void    vwputp(struct octent *octad, int16_t xloc, int16_t yloc, int16_t val);
    1414
    1515/* these should be voids ... */
    1616
    1717extern  void    vfwait(void);
    18 extern  void    vputs(uint *sbase, uint row, uint col, uint attrib, char *str);
    19 extern  void    vputsa(uint *sbase, uint row, uint col, uint *attrib, char *str);
    20 extern  void    vputc(unsigned *sbase, unsigned row, unsigned col, unsigned c, unsigned attrib);
     18extern  void    vputs(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t attrib, int8_t *str);
     19extern  void    vputsa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *attrib, int8_t *str);
     20extern  void    vputc(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t c, uint16_t attrib);
    2121extern  void    VHinit(void);
    22 extern  void    objclr(unsigned obj);
    23 extern  void    objon(unsigned obj, unsigned line, unsigned num);
    24 extern  void    objoff(unsigned obj, unsigned line, unsigned num);
    25 extern  void    vcputs(int *obase, int nw, int fg, int bg, int row, int col, char *str);
    26 extern  void    vwputs(int *obase, int nw, int fg, int bg, int row, int col, char *str);
    27 extern  void    vwputm(unsigned int *obase, int nw, int fg, int bg, int row, int col, char *ml[]);
    28 extern  void    vmput(uint *sbase, uint row, uint col, uint ma, char *ms[]);
    29 extern  void    vmputa(uint *sbase, uint row, uint col, uint *ma[], char *ms[]);
     22extern  void    objclr(uint16_t obj);
     23extern  void    objon(uint16_t obj, uint16_t line, uint16_t num);
     24extern  void    objoff(uint16_t obj, uint16_t line, uint16_t num);
     25extern  void    vcputs(int16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *str);
     26extern  void    vwputs(int16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *str);
     27extern  void    vwputm(uint16_t *obase, int16_t nw, int16_t fg, int16_t bg, int16_t row, int16_t col, int8_t *ml[]);
     28extern  void    vmput(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t ma, int8_t *ms[]);
     29extern  void    vmputa(uint16_t *sbase, uint16_t row, uint16_t col, uint16_t *ma[], int8_t *ms[]);
    3030extern  void    VSinit(void);
    31 extern  void    SelObj(int obj);
    32 extern  void    SetPri(int obj, int pri);
    33 extern  void    SetObj(int obj, int type, int bank, int xpix, int ypix, int x0, int y0, int flags, int pri, unsigned int *base);
    34 extern  void    CpyObj(unsigned *from, unsigned *to, unsigned w, unsigned h, unsigned sw);
     31extern  void    SelObj(int16_t obj);
     32extern  void    SetPri(int16_t obj, int16_t pri);
     33extern  void    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);
     34extern  void    CpyObj(uint16_t *from, uint16_t *to, uint16_t w, uint16_t h, uint16_t sw);
     35
     36
  • include/vsddvars.h

    r0292fbb r7258c6a  
    1010
    1111extern  struct  octent  *v_curob;       /* working object control pointer */
    12 extern  int     v_nobj;                 /* working object number */
    13 extern  int     v_obpri;                /* working object priority */
     12extern  int16_t v_nobj;                 /* working object number */
     13extern  int16_t v_obpri;                /* working object priority */
    1414
     15
  • include/wdcurtb.h

    r0292fbb r7258c6a  
    66*/
    77
    8 short   wdcurtb[] = {
     8int16_t wdcurtb[] = {
    99
    1010        0x7FFF,         /*    0    64   1.00000000  1.00000000 */
     
    147147};
    148148
    149 short   wdcurct[8][2] = {
     149int16_t wdcurct[8][2] = {
    150150
    151151/*      { np, inc}         w */
  • include/wordq.h

    r0292fbb r7258c6a  
    88struct  wordq {
    99
    10         unsigned short  qsize;          /* maximum queue length */
    11         unsigned short  qlen;           /* current queue length */
    12         unsigned short  qin;            /* in pointer */
    13         unsigned short  qout;           /* out pointer */
    14         unsigned short  qhi;            /* high water mark */
    15         unsigned short  qlo;            /* low water mark */
    16         unsigned short  *qbuf;          /* base of queue */
     10        uint16_t        qsize;          /* maximum queue length */
     11        uint16_t        qlen;           /* current queue length */
     12        uint16_t        qin;            /* in pointer */
     13        uint16_t        qout;           /* out pointer */
     14        uint16_t        qhi;            /* high water mark */
     15        uint16_t        qlo;            /* low water mark */
     16        uint16_t        *qbuf;          /* base of queue */
    1717};
    1818
    1919#ifndef WORDQHDR
    20 extern  short   putwq(struct wordq *qp, unsigned short c);
    21 extern  short   getwq(struct wordq *qp, unsigned short *p);
    22 extern  unsigned        short   setwq(struct wordq *qp, unsigned short *qadr, unsigned short qsiz, unsigned short hi, unsigned short lo);
     20extern  int16_t putwq(struct wordq *qp, uint16_t c);
     21extern  int16_t getwq(struct wordq *qp, uint16_t *p);
     22extern  uint16_t        setwq(struct wordq *qp, uint16_t *qadr, uint16_t qsiz, uint16_t hi, uint16_t lo);
    2323#endif
     24
  • include/wsdsp.h

    r0292fbb r7258c6a  
    1212struct  wstbl   {               /* waveshape table library entry */
    1313
    14         short   final[NUMWPNT];         /* final values */
    15         short   offset[NUMWPNT];        /* offset values */
    16         short   harmon[NUMHARM];        /* harmonic values */
     14        int16_t final[NUMWPNT];         /* final values */
     15        int16_t offset[NUMWPNT];        /* offset values */
     16        int16_t harmon[NUMHARM];        /* harmonic values */
    1717};
    1818
Note: See TracChangeset for help on using the changeset viewer.