Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

appconfig.c File Reference

Configuration module. More...

#include "../config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "appconfig.h"
#include "buf.h"
#include "dbapi.h"
#include "luaif.h"

Include dependency graph for appconfig.c:

Include dependency graph

Go to the source code of this file.

Defines

#define CONFIG_DIRNAME   ".gtksql"
 Directory name for GtkSQL config files.

#define CONFIG_FILENAME   "gtksql.conf"
 Name of the main configuration file.

#define USAGE
 Usage string to be displayed to the user.


Functions

void cfg_show_banner (void)
 Show a usage string.

void cfg_show_usage (void)
 Show a usage string.

int cfg_parse_cmdline (int argc, char *argv[])
 Parse the command line.

void cfg_init (void)
 Initialise the configuration.

char * cfg_get_config_dir (void)
 Get the configuration file directory.

char * cfg_get_current_dir (void)
 Get the current workiung directory.

char * cfg_get_default_wsname (void)
 Get the default workspace name.

void cfg_set_current_dir (const char *dir)
 Set the current working directory.


Detailed Description

Configuration module.

Author:
Lionel ULMER , Darryl Luff
The appconfig module manages the gtksql configuration files. At present there are three different types of config files: The resource file is in the standard gtk resource format. The config file and the script files are both LUA scripts. gtksql.conf is loaded every time the application runs. Other scripts are loaded either from the command line, or from menus inside the application.

Definition in file appconfig.c.


Define Documentation

#define USAGE
 

Value:

"gtksql [-h] [-f scriptfile] [-s \"script\"]\n\n" \
                "\t-h              Show usage help\n"   \
                "\t-f scriptfile   Run the script in the named file\n"  \
                "\t-s \"script\"     Run the script given on the command line\n"
Usage string to be displayed to the user.

Definition at line 67 of file appconfig.c.

Referenced by cfg_show_usage().


Generated on Sun May 9 19:19:18 2004 for GtkSQL by doxygen1.2.18