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

    r0292fbb r7258c6a  
    2020
    2121extern  void    advicur(void);
    22 extern  void    dosync(short vce);
    23 
    24 extern  char    *strcpy(char *s1, char *s2);
     22extern  void    dosync(int16_t vce);
     23
     24extern  int8_t  *strcpy(int8_t *s1, int8_t *s2);
    2525
    2626/* variables defined elsewhere */
    2727
    28 extern  short   stcrow, stccol, curvce;
    29 
    30 extern  short   idbox[][8];
    31 
    32 extern  unsigned        *instob;
    33 
    34 extern  char    dspbuf[];
     28extern  int16_t stcrow, stccol, curvce;
     29
     30extern  int16_t idbox[][8];
     31
     32extern  uint16_t        *instob;
     33
     34extern  int8_t  dspbuf[];
    3535
    3636extern  struct  instdef vbufs[];
    3737
    38 extern  short   cents, bform;
     38extern  int16_t cents, bform;
    3939
    4040/*
     
    4545
    4646/*                  C  C# D  D# E  F  F# G  G# A  A# B  */
    47 short   notes[]  = {2, 2, 3, 3, 4, 5, 5, 6, 6, 0, 0, 1};
     47int16_t notes[]  = {2, 2, 3, 3, 4, 5, 5, 6, 6, 0, 0, 1};
    4848
    4949/*                      A     B     C     D     E     F     G   */
    50 short   pitches[] = { 900, 1100,    0,  200,  400,  500,  700};
     50int16_t pitches[] = { 900, 1100,    0,  200,  400,  500,  700};
    5151
    5252#include "ratio.h"      /* short ratio[]; */
    5353
    5454/*                  C  C# D  D# E  F  F# G  G# A  A# B  */
    55 short   sharps[] = {7, 9, 7, 9, 7, 7, 9, 7, 9, 7, 9, 7};
    56 
    57 short   shrpflt[] = {  0, -100,    100};
    58 
    59 char    sfdsp[]   = {' ', D_FLAT,  D_SHARP};
    60 
    61 static  char    intstr[] = "+0000";
    62 static  char    ratstr[] = "1/1";
    63 static  char    frqstr[] = "00.0";
    64 static  char    pchstr[] = "0C 00";
    65 
    66 short   ndvals[10] = {0, 0, 1200, 1902, 2400, 2786, 3102, 3369, 3600, 3804};
     55int16_t sharps[] = {7, 9, 7, 9, 7, 7, 9, 7, 9, 7, 9, 7};
     56
     57int16_t shrpflt[] = {  0, -100,    100};
     58
     59int8_t  sfdsp[]   = {' ', D_FLAT,  D_SHARP};
     60
     61static  int8_t  intstr[] = "+0000";
     62static  int8_t  ratstr[] = "1/1";
     63static  int8_t  frqstr[] = "00.0";
     64static  int8_t  pchstr[] = "0C 00";
     65
     66int16_t ndvals[10] = {0, 0, 1200, 1902, 2400, 2786, 3102, 3369, 3600, 3804};
    6767
    6868
     
    7777*/
    7878
    79 void int2rat(short rat)
    80 {
    81         register short den, inum, num;
     79void int2rat(int16_t rat)
     80{
     81        register int16_t den, inum, num;
    8282
    8383        ebuf[0] = '1';
     
    112112*/
    113113
    114 void cnvc2p(char *buf, short cv)
    115 {
    116         short   rem, tmp;
     114void cnvc2p(int8_t *buf, int16_t cv)
     115{
     116        int16_t rem, tmp;
    117117
    118118        cv -= 160;
     
    147147*/
    148148
    149 short cnvp2c(void)
     149int16_t cnvp2c(void)
    150150{
    151151        if (ebuf[0] EQ 9)               /* high limit is C9 00 */
     
    174174*/
    175175
    176 short et_iosc(short nn)
     176int16_t et_iosc(int16_t nn)
    177177{
    178178        register struct instdef *ip;
    179         register short val, ctl, fh, fl, v;
     179        register int16_t val, ctl, fh, fl, v;
    180180
    181181        v = (nn >> 8) & 0x03;
     
    258258*/
    259259
    260 void setoval(struct instdef *ip, short v, short val)
     260void setoval(struct instdef *ip, int16_t v, int16_t val)
    261261{
    262262        switch (v) {
     
    301301*/
    302302
    303 short ef_iosc(short nn)
     303int16_t ef_iosc(int16_t nn)
    304304{
    305305        register struct instdef *ip;
    306         register short v, i, tmp;
     306        register int16_t v, i, tmp;
    307307
    308308        v = (nn >> 8) & 3;
     
    375375*/
    376376
    377 short rd_iosc(short nn)
     377int16_t rd_iosc(int16_t nn)
    378378{
    379379        register struct instdef *ip;
    380         register short val, ctl, fh, fl, v;
    381         short n;
    382         char ocs;
     380        register int16_t val, ctl, fh, fl, v;
     381        int16_t n;
     382        int8_t ocs;
    383383
    384384        v = (nn >> 8) & 0x03;
     
    475475*/
    476476
    477 void setoscb(short n, short v)
     477void setoscb(int16_t n, int16_t v)
    478478{
    479479        register struct instdef *ip;
    480         register short bfm, ctl, val;
    481         register char ocs;
     480        register int16_t bfm, ctl, val;
     481        register int8_t ocs;
    482482
    483483        ip = &vbufs[curvce];
     
    594594*/
    595595
    596 void setosyn(short n, short v, short t)
     596void setosyn(int16_t n, int16_t v, int16_t t)
    597597{
    598598        register struct instdef *ip;
    599         register char *sc;
     599        register int8_t *sc;
    600600
    601601        ip = &vbufs[curvce];
     
    647647*/
    648648
    649 short nd_iosc(short nn, short k)
    650 {
    651         register short v, n;
     649int16_t nd_iosc(int16_t nn, int16_t k)
     650{
     651        register int16_t v, n;
    652652
    653653        n = nn & 0xFF;
Note: See TracChangeset for help on using the changeset viewer.