home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
MM1
/
SOUNDUTILS
/
tracker.4.6.lzh
/
TRACKER4.6
/
prefs.c
< prev
next >
Wrap
Text File
|
1994-11-24
|
1KB
|
68 lines
/* prefs.c
vi:ts=3 sw=3:
*/
/* $Id: prefs.c,v 4.3 1994/11/15 16:11:01 espie Exp espie $
* $Log: prefs.c,v $
* Revision 4.3 1994/11/15 16:11:01 espie
* *** empty log message ***
*
*/
#include <stdio.h>
#include "defs.h"
#include "extern.h"
#include "prefs.h"
#include "tags.h"
ID("$Id: prefs.c,v 4.3 1994/11/15 16:11:01 espie Exp espie $")
LOCAL void init_prefs P((void));
LOCAL void (*INIT)P((void)) = init_prefs;
LOCAL struct tag preferences[NUMBER_PREFS];
LOCAL void init_prefs()
{
int i;
for (i = 0; i < NUMBER_PREFS; i++)
preferences[i].type = BASE_PREFS + i;
}
VALUE get_pref(index)
int index;
{
INIT_ONCE;
return preferences[index-BASE_PREFS].data;
}
void set_pref(index, value)
int index;
VALUE value;
{
preferences[index-BASE_PREFS].data = value;
}
void set_pref_scalar(index, value)
int index;
int value;
{
VALUE temp;
temp.scalar = value;
set_pref(index, temp);
}
int get_pref_scalar(index)
{
return get_pref(index).scalar;
}
struct tag *get_prefs()
{
INIT_ONCE;
return preferences;
}