home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / MM1 / SOUNDUTILS / mm1_tracker.lzh / TRACKER4.6 / prefs.c < prev    next >
Text File  |  1994-11-24  |  1KB  |  68 lines

  1. /* prefs.c 
  2.     vi:ts=3 sw=3:
  3.  */
  4. /* $Id: prefs.c,v 4.3 1994/11/15 16:11:01 espie Exp espie $
  5.  * $Log: prefs.c,v $
  6.  * Revision 4.3  1994/11/15  16:11:01  espie
  7.  * *** empty log message ***
  8.  *
  9.  */
  10.  
  11. #include <stdio.h>
  12. #include "defs.h"
  13. #include "extern.h"
  14. #include "prefs.h"
  15. #include "tags.h"
  16.  
  17. ID("$Id: prefs.c,v 4.3 1994/11/15 16:11:01 espie Exp espie $")
  18. LOCAL void init_prefs P((void));
  19.  
  20. LOCAL void (*INIT)P((void)) = init_prefs;
  21.  
  22. LOCAL struct tag preferences[NUMBER_PREFS];
  23.  
  24. LOCAL void init_prefs()
  25.    {
  26.    int i;
  27.    
  28.    for (i = 0; i < NUMBER_PREFS; i++)
  29.       preferences[i].type = BASE_PREFS + i;
  30.    }
  31.  
  32. VALUE get_pref(index)
  33. int index;
  34.    {
  35.    INIT_ONCE;
  36.  
  37.    return preferences[index-BASE_PREFS].data;
  38.    }
  39.  
  40. void set_pref(index, value)
  41. int index;
  42. VALUE value;
  43.    {
  44.    preferences[index-BASE_PREFS].data = value;
  45.    }
  46.  
  47. void set_pref_scalar(index, value)
  48. int index;
  49. int value;
  50.    {
  51.    VALUE temp;
  52.    
  53.    temp.scalar = value;
  54.    set_pref(index, temp);
  55.    }
  56.  
  57. int get_pref_scalar(index)
  58.    {
  59.    return get_pref(index).scalar;
  60.    }
  61.  
  62. struct tag *get_prefs()
  63.    {
  64.    INIT_ONCE;
  65.  
  66.    return preferences;
  67.    }
  68.