32 #include "lib/charbuf.h" 41 static const char *
tempname =
"/tmp/amath.prefs";
42 static const char *
permname =
"/usr/local/etc/amath.conf";
44 static const char *tempname =
"/tmp/amath.prefs";
45 static const char *permname =
"~/config/settings/amath/amath.conf";
47 static const char* tempname =
"amath.prefs";
48 static const char* permname =
"amath.conf";
53 #if defined(UNIX
) && defined(HAIKU) 54 FILE *file = fopen(tempname,
"r");
59 CharBuffer *text =
new CharBuffer();
62 const int bufsize = 64;
63 char* buf =
new char[bufsize];
68 c = fgets(buf, bufsize, file);
70 text->EnsureSize(s++);
73 }
while (c !=
nullptr);
77 SetPrefs(text->GetString());
95 #if defined(UNIX
) && defined(HAIKU) 96 FILE *file = fopen(name,
"w");
101 char *out = GetDescription();
static const char * tempname
static const char * permname
bool SavePrefs(const char *file)