summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@beryl-project.org>2007-03-26 23:24:05 +0200
committerDennis Kasprzyk <onestone@beryl-project.org>2007-03-26 23:24:05 +0200
commitd512c39117e1b4c278622b233e03a4d8c94aef83 (patch)
treea6799feec27e8f230280b05298580d812b121ef1
parent55aa311ed39484f80738ef8d69ca0fe2f88667d6 (diff)
downloadberyl-bcop-d512c39117e1b4c278622b233e03a4d8c94aef83.tar.gz
beryl-bcop-d512c39117e1b4c278622b233e03a4d8c94aef83.tar.bz2
added match initialisation
-rw-r--r--src/code_generator.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/code_generator.c b/src/code_generator.c
index 09912f6..74a9d59 100644
--- a/src/code_generator.c
+++ b/src/code_generator.c
@@ -314,6 +314,17 @@ void addMatchOption(Option *o)
addString(out,"\tmatchAddFromString (&o->value.match, %s_DEFAULT);\n",name);
addGetFunction(o,"CompMatch *","",".value.match","&");
+
+ if (o->screen)
+ {
+ addString(&initScreen,"\tmatchUpdate (s->display, &os->opt[%s].value.match);\n",o->temp);
+ addString(&finiScreen,"\tmatchFini(&os->opt[%s].value.match);\n",o->temp);
+ }
+ else
+ {
+ addString(&initDisplay,"\tmatchUpdate (d, &od->opt[%s].value.match);\n",o->temp);
+ addString(&finiDisplay,"\tmatchFini(&od->opt[%s].value.match);\n",o->temp);
+ }
}
void addStringOption(Option *o)