# HG changeset patch # User Matti Hamalainen # Date 1274653353 -10800 # Node ID b9d6799653202a8e7b318bd6fdd59fbfc4d81d26 # Parent 32ec3c0d1b6c259788b208f1da0aa85de087aaac Code cleanups. diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/gb.c --- a/pwplib/gb.c Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/gb.c Mon May 24 01:22:33 2010 +0300 @@ -49,7 +49,7 @@ {int i=0;for(;i<3;i++)gb_sound(i,0,0,0);} } -void gb_gen1chan(char*d,int l,int freq) +static void gb_gen1chan(char*d,int l,int freq) { int ph=128*256; while(l--){ @@ -60,7 +60,7 @@ #define CH pwpgb.ch -void gb_beepemu(char*d,int l) +static void gb_beepemu(char*d,int l) { static int pf=0; int diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/gb.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pwplib/gb.h Mon May 24 01:22:33 2010 +0300 @@ -0,0 +1,10 @@ +#ifndef PWP_GB_H +#define PWP_GB_H 1 + +#include "config.h" + +void gb_sound(int chan,int freq,int volume,int ratio); +void gb_init(int freq); +void gb_genwave(char*d,int l); + +#endif /* PWP_GB_H */ diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/pwplib.h --- a/pwplib/pwplib.h Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/pwplib.h Mon May 24 01:22:33 2010 +0300 @@ -181,5 +181,6 @@ char* pwp_get_locale(); void pwplib_dump_rast_plain(); int pwp_timer_nrt(); +void pwplib_getopts(); #endif diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/setup.c --- a/pwplib/setup.c Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/setup.c Mon May 24 01:22:33 2010 +0300 @@ -122,7 +122,7 @@ #define ARGC pwplib.argc #define ARGV pwplib.argv -int getopts(optab*argin) +static int getopts(optab *argin) { int i=0; @@ -219,7 +219,7 @@ /************************************/ -optab main_init[]= +static optab main_init[]= { /* stuph */ "help", OPT_ONE,(void*)0,(void*)&pwplib.setup[SETUP_WANTHELP], diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/snd-oss.c --- a/pwplib/snd-oss.c Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/snd-oss.c Mon May 24 01:22:33 2010 +0300 @@ -10,6 +10,7 @@ #include #include "pwplib.h" +#include "gb.h" #define TIMERHZ 72 @@ -20,8 +21,6 @@ int freq; }pwp_oss; -extern void gb_sound(int,int,int,int); - void oss_loopflush() { for(;;) diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/snd-sdl.c --- a/pwplib/snd-sdl.c Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/snd-sdl.c Mon May 24 01:22:33 2010 +0300 @@ -16,14 +16,13 @@ #include #include "pwplib.h" +#include "gb.h" #define TIMERHZ 72 static int pwp_sdlaudio_run = 1; static int pwp_sdlaudio_frag = -1, pwp_sdlaudio_curr; -extern void gb_sound(int, int, int, int); - static void pwp_sdlaudio_fill(void * udata, Uint8 * buf, int len) { diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/snd-w32.c --- a/pwplib/snd-w32.c Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/snd-w32.c Mon May 24 01:22:33 2010 +0300 @@ -12,6 +12,7 @@ #define TIMERHZ 72 #include "pwplib.h" +#include "gb.h" #define NUMBUFS 2 @@ -29,8 +30,6 @@ } pwp_w32snd; -extern void gb_sound(int,int,int,int); - void win32snd_fill() { while(pwp_w32snd.bufferptr<(HARDBUFSIZE-pwp_w32snd.buffersize)) diff -r 32ec3c0d1b6c -r b9d679965320 pwplib/tty.h --- a/pwplib/tty.h Mon May 24 01:16:43 2010 +0300 +++ b/pwplib/tty.h Mon May 24 01:22:33 2010 +0300 @@ -41,5 +41,5 @@ TTY_VT2XX /* vtnnn where nnn>=200 */ }; -void tty_write(u8*data,int lgt); - +int tty_init(void); +void tty_write(u8 *data, int lgt);