1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<!DOCTYPE actions SYSTEM "flexml-act.dtd">
<actions>
<top><![CDATA[
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
char* terminator;
]]></top>
<start tag='joke'><![CDATA[
printf("Joke:\n");
]]></start>
<start tag='setup'><![CDATA[
terminator = ({type} == {type/question} ? " ??" : "...");
]]></start>
<end tag='setup'><![CDATA[
printf("%s%s\n", {#PCDATA}, terminator);
]]></end>
<start tag='punch-line'><![CDATA[
terminator = ({type} == {type/question} ? "?" : "!");
]]></start>
<end tag='punch-line'><![CDATA[
printf("-- %s%s\n", {#PCDATA}, terminator);
]]></end>
<start tag='pause'><![CDATA[
sleep(atoi({seconds}));
]]></start>
</actions>
|