aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorokan2009-01-23 19:00:59 +0000
committerokan2009-01-23 19:00:59 +0000
commit484eb0cd0ae7117fa56f6d4094580128209981a4 (patch)
treece687c0e49f1cbb0a4e2d6065ea8e024637e7dc4 /parse.y
parentf766a2baaec283eabcfa26f0c60e9a596b43459d (diff)
downloadcwm-484eb0cd0ae7117fa56f6d4094580128209981a4.tar.gz
move conf_clear() and add proto.
ok todd@ oga@
Diffstat (limited to '')
-rw-r--r--parse.y45
1 files changed, 1 insertions, 44 deletions
diff --git a/parse.y b/parse.y
index 996664e..34db550 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.17 2009/01/22 18:16:38 oga Exp $ */
+/* $OpenBSD: parse.y,v 1.18 2009/01/23 19:00:59 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -464,49 +464,6 @@ popfile(void)
return (EOF);
}
-void
-conf_clear(struct conf *c)
-{
- struct autogroupwin *ag;
- struct keybinding *kb;
- struct winmatch *wm;
- struct cmd *cmd;
- struct mousebinding *mb;
-
- while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
- TAILQ_REMOVE(&c->cmdq, cmd, entry);
- free(cmd);
- }
-
- while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
- TAILQ_REMOVE(&c->keybindingq, kb, entry);
- free(kb);
- }
-
- while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
- TAILQ_REMOVE(&c->autogroupq, ag, entry);
- free(ag->class);
- if (ag->name)
- free(ag->name);
- free(ag->group);
- free(ag);
- }
-
- while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
- TAILQ_REMOVE(&c->ignoreq, wm, entry);
- free(wm);
- }
-
- while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
- TAILQ_REMOVE(&c->mousebindingq, mb, entry);
- free(mb);
- }
-
- if (c->DefaultFontName != NULL)
- free(c->DefaultFontName);
-}
-
-
int
parse_config(const char *filename, struct conf *xconf)
{