File: joke.act%2Cv

package info (click to toggle)
flexml 1-5
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 884 kB
  • ctags: 203
  • sloc: perl: 2,016; makefile: 160; ansic: 56; xml: 28
file content (61 lines) | stat: -rw-r--r-- 868 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
head	1.1;
access;
symbols;
locks
	krisrose:1.1; strict;
comment	@# @;


1.1
date	99.11.23.09.32.31;	author krisrose;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Documentation updated.
@
text
@<!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>
@