prefs.c File Reference

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <getopt.h>
#include "prefs.h"
#include "charset.h"

Include dependency graph for prefs.c:


Defines

#define usage_fpf(file,)

Functions

static void usage (FILE *file)
gboolean read_prefs (int argc, char *argv[])
cfgcfg_new (void)
static void cfg_free (struct cfg *c)
void discard_prefs ()
const gchar * prefs_get_filename (void)
void prefs_set_filename (const gchar *tpl)
gboolean prefs_get_have_footer (void)
void prefs_set_have_footer (gboolean tpl)

Variables

static struct cfgcfg = NULL

Detailed Description

some funtions to set and get preference

Define Documentation

#define usage_fpf file   ) 
 

Value:

do {    gchar *utf8=g_strdup_printf (__VA_ARGS__);\
        gchar *loc=g_locale_from_utf8 (utf8, -1, NULL, NULL, NULL); \
        fprintf (file, "%s", loc); \
        g_free (loc); \
        g_free (utf8);\
} while (FALSE)


Function Documentation

static void cfg_free struct cfg c  )  [static]
 

Free all memory including the cfg-struct itself.

struct cfg * cfg_new void   ) 
 

Set the preferences and initialise the cfg-struct

Returns:
struct cfg the cfg-struct after initialise

void discard_prefs void   ) 
 

const gchar* prefs_get_filename void   ) 
 

set and get the current filename

gboolean prefs_get_have_footer void   ) 
 

set and get the current have_footer flag

void prefs_set_filename const gchar *  tpl  ) 
 

void prefs_set_have_footer gboolean  tpl  ) 
 

gboolean read_prefs int  argc,
char *  argv[]
 

Read and parse the command options xxPreferences and initialise the cfg-struct

Returns:
gboolean reserved for future use

static void usage FILE *  file  )  [static]
 


Variable Documentation

struct cfg* cfg = NULL [static]
 


Generated on Wed Nov 30 21:04:23 2005 for RFC Reader by  doxygen 1.4.5