diff -urN midi_prog-/Makefile midi_prog/Makefile --- midi_prog-/Makefile 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/Makefile 2014-01-25 00:00:00.000000000 +0900 @@ -1,6 +1,6 @@ CC = gcc -Wall LIB = -lm -TARG = prog27 +TARG = prog28 OBJS = main.o vcf.o ch.o delay.o stat.o note.o env.o tone.o filter.o lfo.o modu.o vco.o wave.o out.o rd.o util.o all: $(TARG) diff -urN midi_prog-/delay.c midi_prog/delay.c --- midi_prog-/delay.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/delay.c 2014-01-25 00:00:00.000000000 +0900 @@ -11,7 +11,7 @@ stat->delay_buf[1][i] = env_v; } -double +static double tbl_lookup(double *tbl, int n, double d_idx) { int i; @@ -22,7 +22,7 @@ return MIX(tbl[i], tbl[(i+1)%n], d_idx); } -double +static double delay_buf_lookup(struct stat_rec *stat, double sec, double *ret_env_v) { double cycle; diff -urN midi_prog-/delay.h midi_prog/delay.h --- midi_prog-/delay.h 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/delay.h 2014-01-25 00:00:00.000000000 +0900 @@ -11,8 +11,6 @@ }; void delay_buf_set(struct stat_rec *stat, double v, double env_v); -double tbl_lookup(double *tbl, int n, double d_idx); -double delay_buf_lookup(struct stat_rec *stat, double sec, double *ret_env_v); double delay_out(struct stat_rec *stat, struct delay_rec *delay, double *ret_env_v); double chorus_out(struct stat_rec *stat); diff -urN midi_prog-/main.c midi_prog/main.c --- midi_prog-/main.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/main.c 2014-01-25 00:00:00.000000000 +0900 @@ -5,7 +5,7 @@ #include "stat.h" #include "ch.h" -int +static int header(void) { int v; @@ -18,7 +18,7 @@ return v; /* div4 */ } -void +static void data_out(struct out_rec *ot, double evt_sec) { double vl, vr; diff -urN midi_prog-/note.c midi_prog/note.c --- midi_prog-/note.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/note.c 2014-01-25 00:00:00.000000000 +0900 @@ -24,7 +24,7 @@ for(i=0; i= 140400 ? diff -urN midi_prog-/out.h midi_prog/out.h --- midi_prog-/out.h 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/out.h 2014-01-25 00:00:00.000000000 +0900 @@ -17,8 +17,6 @@ double smp_t, sec; }; -int sox_version(void); -char *sox_bit_len_fmt(int bit_len); void out_init(struct out_rec *ot, int ac, char **av); void out_do(struct out_rec *ot, double v); Binary files midi_prog-/prog27 and midi_prog/prog27 differ diff -urN midi_prog-/rd.c midi_prog/rd.c --- midi_prog-/rd.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/rd.c 2014-01-25 00:00:00.000000000 +0900 @@ -1,6 +1,6 @@ #include "rd.h" -int bk_buf = -1; +static int bk_buf = -1; int rd(void) @@ -19,7 +19,7 @@ bk_buf = v; } -void +static void rd_str(int n, char *s) { int i; diff -urN midi_prog-/rd.h midi_prog/rd.h --- midi_prog-/rd.h 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/rd.h 2014-01-25 00:00:00.000000000 +0900 @@ -3,11 +3,8 @@ #include "util.h" -extern int bk_buf; - int rd(void); void bk(int v); -void rd_str(int n, char *s); int rd_str_chk(int n, char *s); int rd_int(int n); int rd_delta(void); diff -urN midi_prog-/stat.c midi_prog/stat.c --- midi_prog-/stat.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/stat.c 2014-01-25 00:00:00.000000000 +0900 @@ -1,8 +1,8 @@ #include "stat.h" -struct stat_rec stat_buf[ STAT_BUF_N ]; +static struct stat_rec stat_buf[ STAT_BUF_N ]; -void +static void stat_init(struct stat_rec *stat, double sec) { int i; diff -urN midi_prog-/stat.h midi_prog/stat.h --- midi_prog-/stat.h 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/stat.h 2014-01-25 00:00:00.000000000 +0900 @@ -20,9 +20,6 @@ struct stat_rec *next; }; -extern struct stat_rec stat_buf[ STAT_BUF_N ]; - -void stat_init(struct stat_rec *stat, double sec); void stat_buf_init(void); void stat_lst_free(struct stat_rec *stat); struct stat_rec *stat_lst_alloc_init(int n, double sec, struct note_rec *nt, struct tone_compo_rec *tone_compo_arr, struct stat_rec *next); diff -urN midi_prog-/tone.c midi_prog/tone.c --- midi_prog-/tone.c 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/tone.c 2014-01-25 00:00:00.000000000 +0900 @@ -3,7 +3,7 @@ #include "vcf.h" #include "stat.h" -struct tone_rec tone_inf[] = { +static struct tone_rec tone_inf[] = { { /* strings */ { WAVE_SAW, WAVE_SAW, 12, 0.5, OFF }, { LPF, 3000, 1.5 }, { OFF, }, @@ -99,7 +99,7 @@ #define PROG_DRUM 0 -struct{ +static struct{ int prog, note; /* note for ch 9 */ struct tone_compo_rec *tone_compo; } tones_lst[] = { diff -urN midi_prog-/tone.h midi_prog/tone.h --- midi_prog-/tone.h 2014-01-24 00:00:00.000000000 +0900 +++ midi_prog/tone.h 2014-01-25 00:00:00.000000000 +0900 @@ -26,7 +26,6 @@ double rate; }; -extern struct tone_rec tone_inf[], drum_tone_inf[]; struct tone_compo_rec *tone_compo_get(int ch, int note, int *ret_n); double tone_out(struct stat_rec *stat, double freq, double env_v);