4 * Handling the global choices repository
6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Steel library.
13 * Steel is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Steel is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 * void choices_setName(char *progname)
41 * Sets the name of the application as used by choices. The name is
42 * truncated to 10 characters if necessary. If no name is specified (i.e.
43 * you don't call this routine) then the name of the application (as passed
44 * to wimpt_init) is assumed.
47 void choices_setName(char *progname);
50 * char *choices_name(char *leaf,BOOL writable)
53 * Locates the name of the specified resource. If you want to open a file
54 * for writing, you should set the writable flag. Otherwise, this routine
55 * will try to find the name of a file which already exists.
57 * If you only want to read a file, this routine will first look at
58 * <Choices$Dir>.leaf, and then at <resPrefix>.leaf, and return whichever
59 * is found first. If neither exists, a name is returned as for the
62 * If you want to write a file, then <Choices$Dir>.leaf is returned, unless
63 * Choices$Dir is unset, in which case <resPrefix>.leaf is returned.
65 * resPrefix is the prefix passed to res through res_init or res_setPrefix.
68 char *choices_name(char *leaf,BOOL writable);