~ubuntu-branches/debian/sid/eperl/sid

« back to all changes in this revision

Viewing changes to eperl_global.h

  • Committer: Bazaar Package Importer
  • Author(s): Denis Barbier
  • Date: 2001-12-18 20:40:24 UTC
  • Revision ID: james.westby@ubuntu.com-20011218204024-kas01yyh4uj98q11
Tags: upstream-2.2.14
ImportĀ upstreamĀ versionĀ 2.2.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
**        ____           _ 
 
3
**    ___|  _ \ ___ _ __| |
 
4
**   / _ \ |_) / _ \ '__| |
 
5
**  |  __/  __/  __/ |  | |
 
6
**   \___|_|   \___|_|  |_|
 
7
** 
 
8
**  ePerl -- Embedded Perl 5 Language
 
9
**
 
10
**  ePerl interprets an ASCII file bristled with Perl 5 program statements
 
11
**  by evaluating the Perl 5 code while passing through the plain ASCII
 
12
**  data. It can operate both as a standard Unix filter for general file
 
13
**  generation tasks and as a powerful Webserver scripting language for
 
14
**  dynamic HTML page programming. 
 
15
**
 
16
**  ======================================================================
 
17
**
 
18
**  Copyright (c) 1996,1997,1998 Ralf S. Engelschall <rse@engelschall.com>
 
19
**
 
20
**  This program is free software; it may be redistributed and/or modified
 
21
**  only under the terms of either the Artistic License or the GNU General
 
22
**  Public License, which may be found in the ePerl source distribution.
 
23
**  Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive
 
24
**  a built-in copy of both license files.
 
25
**
 
26
**  This program is distributed in the hope that it will be useful, but
 
27
**  WITHOUT ANY WARRANTY; without even the implied warranty of
 
28
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either the
 
29
**  Artistic License or the GNU General Public License for more details.
 
30
**
 
31
**  ======================================================================
 
32
**
 
33
**  eperl_global.h -- ePerl global header file
 
34
*/
 
35
#ifndef EPERL_GLOBAL_H
 
36
#define EPERL_GLOBAL_H 1
 
37
 
 
38
 
 
39
/*
 
40
**
 
41
**  The ePerl block delimiters
 
42
**
 
43
*/
 
44
#define BEGIN_DELIMITER_FILTER "<:"
 
45
#define   END_DELIMITER_FILTER ":>"
 
46
#define BEGIN_DELIMITER_CGI    "<?"
 
47
#define   END_DELIMITER_CGI    "!>"
 
48
 
 
49
 
 
50
/*
 
51
**
 
52
**  The ePerl runtime mode
 
53
**
 
54
*/
 
55
#define MODE_UNKNOWN    1
 
56
#define MODE_FILTER     2
 
57
#define MODE_CGI        4
 
58
#define MODE_NPHCGI     8
 
59
 
 
60
 
 
61
/* 
 
62
**
 
63
**   debugging
 
64
**
 
65
*/
 
66
#ifdef DEBUG_ENABLED
 
67
#ifdef HAVE_DMALLOC
 
68
#define DMALLOC_FUNC_CHECK 1
 
69
#include <dmalloc.h>
 
70
#endif
 
71
#endif
 
72
 
 
73
 
 
74
/*
 
75
**
 
76
**  CU() -- CleanUp Makro (implemented in a safety way)
 
77
**
 
78
*/
 
79
#define DECL_EXRC int rc
 
80
#define EXRC rc
 
81
#define ZERO 0
 
82
#define STMT(stuff) do { stuff } while (ZERO)
 
83
#define CU(returncode) STMT( rc = returncode; goto CUS; )
 
84
#define VCU STMT( goto CUS; )
 
85
#define RETURN_WVAL(val) return (val)
 
86
#define RETURN_EXRC return (rc)
 
87
#define RETURN_NORC return
 
88
 
 
89
/*
 
90
**  Shortcuts for string comparisons
 
91
*/
 
92
#define stringEQ(s1,s2)    strcmp(s1,s2)   == 0
 
93
#define stringNE(s1,s2)    strcmp(s1,s2)   != 0
 
94
#define stringEQn(s1,s2,n) strcmp(s1,s2,n) == 0
 
95
#define stringNEn(s1,s2,n) strcmp(s1,s2,n) != 0
 
96
 
 
97
#endif /* EPERL_GLOBAL_H */
 
98
/*EOF*/