summaryrefslogtreecommitdiff
path: root/xts5
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-06-24 17:09:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-06-24 17:09:16 +1000
commit8bb792bf3cfbf1014e753ce855861a28a2805525 (patch)
tree48bd7dd5ee77e64dc5af776c3bbc18c0a4868312 /xts5
parent5044d5e6d828f914932b3418355b3c5192ed0b32 (diff)
Assign a couple of default values to the config.
Since most values are optional, set a couple of reasonable defaults, thus making the need for TET_CONFIG obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'xts5')
-rw-r--r--xts5/src/lib/config.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/xts5/src/lib/config.c b/xts5/src/lib/config.c
index c9721265..0bb3947d 100644
--- a/xts5/src/lib/config.c
+++ b/xts5/src/lib/config.c
@@ -22,6 +22,7 @@ SOFTWARE.
Modifications:
2010/06/24 - add config setting retrieval from environment.
- make all config parameters optional.
+ - set some sane defaults
*/
@@ -377,7 +378,19 @@ struct getparam *gp;
void
initconfig(void)
{
+ /* set some sane defaults. the strdups might leak, I don't care */
+ config.coverage = 1;
+ config.display = strdup(":0");
+ config.extensions = 1;
+ config.tcp = 1;
+ config.fontpath_bad = strdup("built-ins");
+ config.speedfactor = 1;
+ config.reset_delay = 1;
+ config.protocol_version = 11;
+ config.protocol_revision = 0;
+ config.posix_system = 1;
+ config.local = 1;
+
_initconfig(tet_getvar);
_initconfig(getenv);
-
}