<!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>
