Changeset 7258c6a in buchla-68k for ram/pix2mid.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/pix2mid.c

    r0292fbb r7258c6a  
    1717#define PCENTER         256     /* pixel offset of 0 time line */
    1818
    19 extern  short   cflag;          /* accidental flag */
    20 extern  short   cnote;          /* note value at cursor */
    21 extern  short   cyval;          /* cursor y value */
    22 extern  short   cxval;          /* cursor x value */
     19extern  int16_t cflag;          /* accidental flag */
     20extern  int16_t cnote;          /* note value at cursor */
     21extern  int16_t cyval;          /* cursor y value */
     22extern  int16_t cxval;          /* cursor x value */
    2323
    24 extern  long    ctime;          /* time at cursor */
    25 extern  long    t_cur;          /* time at p_cur */
     24extern  int32_t ctime;          /* time at cursor */
     25extern  int32_t t_cur;          /* time at p_cur */
    2626
    2727/*
     
    2929*/
    3030
    31 short   mpixtab[52][4] = {      /* pixel to MIDI note for the white keys */
     31int16_t mpixtab[52][4] = {      /* pixel to MIDI note for the white keys */
    3232
    3333/* [0] = center pixel, [1] = MIDI note, [2] = sharp tag, [3] = flat tag */
     
    122122*/
    123123
    124 short pix2mid(void)
     124int16_t pix2mid(void)
    125125{
    126         register short i, cy, mpc;
    127         register long ct;
     126        register int16_t i, cy, mpc;
     127        register int32_t ct;
    128128
    129129        cnote = -1;
     
    132132        mpc   = ac_code EQ N_SHARP ? 2 : 3;
    133133
    134         ct = t_cur + ((long)cxval - (long)PCENTER);
     134        ct = t_cur + ((int32_t)cxval - (int32_t)PCENTER);
    135135
    136136        if (ct < 0L)
Note: See TracChangeset for help on using the changeset viewer.