Changeset 7258c6a in buchla-68k for ram/stmproc.c


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ram/stmproc.c

    r0292fbb r7258c6a  
    2424#include "ptdisp.h"
    2525
    26 extern  short   ptegood, ptedfok, ptestok, ptedsok, ptedtok;
    27 
    28 extern  short   ptedef, ptestm, ptespec, ptesuba, ptedat1;
    29 
    30 extern  short   pteset;
    31 
    32 extern  short   ptecpos, ptepred, ptesucc;
     26extern  int16_t ptegood, ptedfok, ptestok, ptedsok, ptedtok;
     27
     28extern  int16_t ptedef, ptestm, ptespec, ptesuba, ptedat1;
     29
     30extern  int16_t pteset;
     31
     32extern  int16_t ptecpos, ptepred, ptesucc;
    3333
    3434extern  struct patch    ptebuf;
    3535
    36 extern  char    ptdebuf[];
     36extern  int8_t  ptdebuf[];
    3737
    3838#if     DEBUGDP
     
    6262#endif
    6363
    64 unsigned short  dtfree;                 /* defent free list index */
    65 unsigned short  ptfree;                 /* patch free list index */
    66 
    67 unsigned short  dpepred;                /* defent predecessor index */
    68 unsigned short  dpecpos;                /* current defent index */
    69 unsigned short  dpesucc;                /* defent successor index */
    70 
    71 char    ptdsbuf[50];                    /* patch display build buffer */
    72 
    73 char    defptr[NDEFSTMS];               /* definition index table */
    74 char    stmptr[NDEFSTMS];               /* stimulus index table */
     64uint16_t        dtfree;                 /* defent free list index */
     65uint16_t        ptfree;                 /* patch free list index */
     66
     67uint16_t        dpepred;                /* defent predecessor index */
     68uint16_t        dpecpos;                /* current defent index */
     69uint16_t        dpesucc;                /* defent successor index */
     70
     71int8_t  ptdsbuf[50];                    /* patch display build buffer */
     72
     73int8_t  defptr[NDEFSTMS];               /* definition index table */
     74int8_t  stmptr[NDEFSTMS];               /* stimulus index table */
    7575
    7676struct  defent  defents[RAWDEFS];       /* definition control table */
     
    8080struct  wordq   ptefifo;                /* patch trigger fifo header */
    8181
    82 unsigned short  ptewrds[NPTEQELS];      /* patch trigger fifo entries */
    83 
    84 char    dmatch[] = {                    /* addat1 match tags */
     82uint16_t        ptewrds[NPTEQELS];      /* patch trigger fifo entries */
     83
     84int8_t  dmatch[] = {                    /* addat1 match tags */
    8585
    8686        0, 0, 0, 0, 0, 0, 0, 0,         /*  0 ..  7 */
     
    102102void initpt(void)
    103103{
    104         register unsigned short i;
     104        register uint16_t i;
    105105
    106106        /* initialize the trigger fifo */
     
    142142*/
    143143
    144 unsigned short pt_alc(void)
    145 {
    146         register unsigned short pe;
     144uint16_t pt_alc(void)
     145{
     146        register uint16_t pe;
    147147
    148148        if (0 NE (pe = ptfree))
     
    158158*/
    159159
    160 void pt_del(unsigned short pe)
     160void pt_del(uint16_t pe)
    161161{
    162162        patches[pe].nextstm = ptfree;
     
    174174*/
    175175
    176 unsigned short dt_alc(void)
    177 {
    178         register unsigned short de;
     176uint16_t dt_alc(void)
     177{
     178        register uint16_t de;
    179179
    180180        if (0 NE (de = dtfree))
     
    190190*/
    191191
    192 void dt_del(unsigned short de)
     192void dt_del(uint16_t de)
    193193{
    194194        defents[de].nextdef = dtfree;
     
    211211*/
    212212
    213 short cprdpe(unsigned short np)
    214 {
    215         register unsigned short ca, cb, ct;
     213int16_t cprdpe(uint16_t np)
     214{
     215        register uint16_t ca, cb, ct;
    216216        register struct defent *pp;
    217217
     
    274274*/
    275275
    276 short finddpe(void)
    277 {
    278         register unsigned short c, idef;
     276int16_t finddpe(void)
     277{
     278        register uint16_t c, idef;
    279279
    280280        dpepred = 0;            /* initialize dpepred = 0  (no predecessor) */
     
    370370*/
    371371
    372 short cprpte(unsigned short np)
    373 {
    374         register unsigned short ca, cb, ct;
     372int16_t cprpte(uint16_t np)
     373{
     374        register uint16_t ca, cb, ct;
    375375        register struct patch *pb, *pp;
    376376
     
    440440*/
    441441
    442 short findpte(void)
    443 {
    444         register unsigned short c, istim;
     442int16_t findpte(void)
     443{
     444        register uint16_t c, istim;
    445445
    446446        ptepred = 0;            /* initialize ptepred = 0  (no predecessor) */
     
    533533void entrpte(void)
    534534{
    535         register short c;
    536         register unsigned short np, stim;
     535        register int16_t c;
     536        register uint16_t np, stim;
    537537
    538538        ptegood = ptedfok AND ptestok AND ptedsok AND ptedtok;
     
    711711*/
    712712
    713 short find1st(void)
    714 {
    715         register short cp, pp;
     713int16_t find1st(void)
     714{
     715        register int16_t cp, pp;
    716716
    717717        for (cp = 0; cp < NDEFSTMS; cp++)
     
    728728*/
    729729
    730 short findnxt(short cp)
    731 {
    732         register short np, stim;
     730int16_t findnxt(int16_t cp)
     731{
     732        register int16_t np, stim;
    733733
    734734        if (0 NE (np = patches[cp].nextstm))
     
    754754*/
    755755
    756 short findprv(short cp)
    757 {
    758         register short np, pp, stim;
     756int16_t findprv(int16_t cp)
     757{
     758        register int16_t np, pp, stim;
    759759
    760760        if (0 NE (np = patches[cp].prevstm))    /* return prevstm if set */
     
    789789*/
    790790
    791 void dpte(short pe, short row, short atr)
    792 {
    793         register short i;
     791void dpte(int16_t pe, int16_t row, int16_t atr)
     792{
     793        register int16_t i;
    794794
    795795        memset(ptdsbuf, ' ', 50);
     
    824824void dptw(void)
    825825{
    826         register short cp, r, row, pp;
     826        register int16_t cp, r, row, pp;
    827827
    828828#if     DEBUGDP
     
    979979void srdspte(void)
    980980{
    981         short   oldcpos, oldpred, oldsucc;
     981        int16_t oldcpos, oldpred, oldsucc;
    982982#if     DEBUGSR
    983983        register short i;
     
    10641064*/
    10651065
    1066 void stmproc(unsigned short trg)
     1066void stmproc(uint16_t trg)
    10671067{
    10681068        register struct defent  *nextdef;
    10691069        register struct patch   *nextpch;
    1070         register unsigned short adspec, adsuba, np, stim;
    1071         unsigned short addat1, adrtag;
     1070        register uint16_t adspec, adsuba, np, stim;
     1071        uint16_t addat1, adrtag;
    10721072
    10731073        /* ***** DEFINER PROCESSING PHASE ***** */
Note: See TracChangeset for help on using the changeset viewer.