mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Added --home and --config command line parameters to irssi to specify
locations for ~/.irssi and ~/.irssi/config git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1626 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
bcbb55dd1e
commit
79d1d7089a
19 changed files with 129 additions and 276 deletions
30
src/common.h
30
src/common.h
|
|
@ -4,6 +4,9 @@
|
|||
#define IRSSI_AUTHOR "Timo Sirainen <tss@iki.fi>"
|
||||
#define IRSSI_WEBSITE "http://irssi.org/"
|
||||
|
||||
#define IRSSI_DIR_SHORT "~/.irssi"
|
||||
#define IRSSI_DIR_FULL "%s/.irssi" /* %s == g_get_home_dir() */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
@ -45,16 +48,7 @@
|
|||
|
||||
#include "core/memdebug.h"
|
||||
|
||||
#define g_free_not_null(a) \
|
||||
G_STMT_START { \
|
||||
if (a) g_free(a); \
|
||||
} G_STMT_END
|
||||
|
||||
#define g_free_and_null(a) \
|
||||
G_STMT_START { \
|
||||
if (a) { g_free(a); (a) = NULL; } \
|
||||
} G_STMT_END
|
||||
|
||||
/* input functions */
|
||||
#define G_INPUT_READ (1 << 0)
|
||||
#define G_INPUT_WRITE (1 << 1)
|
||||
|
||||
|
|
@ -65,8 +59,24 @@ int g_input_add(GIOChannel *source, int condition,
|
|||
int g_input_add_full(GIOChannel *source, int priority, int condition,
|
||||
GInputFunction function, void *data);
|
||||
|
||||
/* return full path for ~/.irssi */
|
||||
const char *get_irssi_dir(void);
|
||||
/* return full path for ~/.irssi/config */
|
||||
const char *get_irssi_config(void);
|
||||
|
||||
/* max. size for %d */
|
||||
#define MAX_INT_STRLEN ((sizeof(int) * CHAR_BIT + 2) / 3 + 1)
|
||||
|
||||
#define g_free_not_null(a) \
|
||||
G_STMT_START { \
|
||||
if (a) g_free(a); \
|
||||
} G_STMT_END
|
||||
|
||||
#define g_free_and_null(a) \
|
||||
G_STMT_START { \
|
||||
if (a) { g_free(a); (a) = NULL; } \
|
||||
} G_STMT_END
|
||||
|
||||
typedef struct _IPADDR IPADDR;
|
||||
typedef struct _CONFIG_REC CONFIG_REC;
|
||||
typedef struct _CONFIG_NODE CONFIG_NODE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue