Mercurial > hg
changeset 1278:c3107650d165
Allow longer lines in config file
The maximum line length in the conf. file should be the same as in the UI.
Reported by "ManMachine".
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 25 Aug 2007 11:06:28 +0200 |
parents | b6d333044269 |
children | 8bbc764139ef |
files | mcabber/src/settings.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/settings.c Fri Aug 24 07:06:10 2007 +0200 +++ b/mcabber/src/settings.c Sat Aug 25 11:06:28 2007 +0200 @@ -28,6 +28,10 @@ #include "utils.h" #include "logprint.h" +// Maximum line length +// (probably best to use the same value as INPUTLINE_LENGTH) +#define CONFLINE_LENGTH 1024 + static GHashTable *option; static GHashTable *alias; static GHashTable *binding; @@ -128,9 +132,9 @@ scr_LogPrint(LPRINT_LOGNORM, "Reading %s", filename); } - buf = g_new(char, 512); + buf = g_new(char, CONFLINE_LENGTH+1); - while (fgets(buf+1, 511, fp) != NULL) { + while (fgets(buf+1, CONFLINE_LENGTH, fp) != NULL) { // The first char is reserved to add a '/', to make a command line line = buf+1; ln++;