/* * choices.h * * Handling the global choices repository * * © 1994-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Steel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __choices_h #define __choices_h #ifndef BOOL #define BOOL int #define TRUE 1 #define FALSE 0 #endif /* * void choices_setName(char *progname) * * Use * Sets the name of the application as used by choices. The name is * truncated to 10 characters if necessary. If no name is specified (i.e. * you don't call this routine) then the name of the application (as passed * to wimpt_init) is assumed. */ void choices_setName(char *progname); /* * char *choices_name(char *leaf,BOOL writable) * * Use * Locates the name of the specified resource. If you want to open a file * for writing, you should set the writable flag. Otherwise, this routine * will try to find the name of a file which already exists. * * If you only want to read a file, this routine will first look at * .leaf, and then at .leaf, and return whichever * is found first. If neither exists, a name is returned as for the * writable case. * * If you want to write a file, then .leaf is returned, unless * Choices$Dir is unset, in which case .leaf is returned. * * resPrefix is the prefix passed to res through res_init or res_setPrefix. */ char *choices_name(char *leaf,BOOL writable); #endif