Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/templates/stdlib.m4
blob: b320774554c537742dc4b49d5811731f930a1ab0 (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
m4_divert(-1)

m4_define(`_Copyleft',
`Copyright (C) 1997 Bob Hepple

This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.')

m4_changecom(`[[[[')

m4_dnl define(`_LOCAL',1)

m4_ifdef(`_LOCAL',
  `m4_define(`_HOMEPAGE',`//127.0.0.1/~bhepple')',
  `m4_define(`_HOMEPAGE',`//www.bit.net.au/~bhepple')')

m4_ifdef(`_LOCAL',
  `m4_define(`_SECONDPAGE',`//127.0.0.1/~bhepple')',
  `m4_define(`_SECONDPAGE',`//www.bit.net.au/~bhepple')')

m4_define(`_EMAIL_ADDRESS',bhepple@bit.net.au)

m4_define(`_MAILTO',<A HREF="mailto:$1">$2</A>)

m4_define(`_EMAILME',_MAILTO(_EMAIL_ADDRESS,$1))

m4_define(`_CODEQUOTE',<BLOCKQUOTE><PRE><CODE>$1</CODE></PRE></BLOCKQUOTE>)

m4_dnl Logical markup:

m4_define(`_EM',<EM>$1</EM>)
m4_define(`_STRONG',<STRONG>$1</STRONG>)
m4_define(`_CITE',<CITE>$1</CITE>)
m4_define(`_PRE',<BLOCKQUOTE><PRE>$1</PRE></BLOCKQUOTE>)
m4_define(`_CODE',<CODE>$1</CODE>)

m4_dnl Physical markup:

m4_define(`_BOLD',<B>$1</B>)
m4_define(`_ITALICS',<I>$1</I>)
m4_define(`_STRIKE',<S>$1</S>)
m4_define(`_SUBSCRIPT',<SUB>$1</SUB>)
m4_define(`_SUPERSCRIPT',<SUP>$1</SUP>)
m4_define(`_COURIER',<TT>$1</TT>)
m4_define(`_UNDERLINE',<U>$1</U>)
m4_define(`_SMALL',<SMALL>$1</SMALL>)
m4_define(`_BIG',<BIG>$1</BIG>)

m4_define(`_CENTER',<CENTER>$1</CENTER>)

m4_define(`_LIMAGE', <IMG SRC="$1" ALT="[$1]" WIDTH=$2 HEIGHT=$3>)

m4_define(`_RIMAGE', <IMG SRC="$1" ALT="[$1]" WIDTH=$2 HEIGHT=$3 ALIGN="right">)

m4_define(`_IMAGE', <P><CENTER><IMG SRC="$1" ALT="[$1]" WIDTH=$2 HEIGHT=$3></CENTER><P>)

m4_define(`_IMAGE2',<P><CENTER>
<IMG SRC="$1" ALT="[$1]" ALIGN=TOP WIDTH=$2 HEIGHT=$3>
<IMG SRC="$4" ALT="[$4]" ALIGN=TOP WIDTH=$5 HEIGHT=$6>
</CENTER><P>)

m4_define(`_FTP',<A HREF="http:$1">$2</A>)

m4_define(`_HEAD1', <H2>$1</H2>)

m4_define(`_HEAD2', <H3>$1</H3>)

m4_define(`_LINK', <a href="$1">$2</a>)

m4_define(`_SELFLINK', _LINK($1,$1))

m4_define(`_LOCALLINK',<A HREF="#$1">$2</A>)

m4_define(`_LABEL',<A NAME="$1"><H2>$1</H2></A>)

m4_define(`_LINK_TO_LABEL', _LOCALLINK($1,$1))

m4_define(`_PLUG',
  _LINK(http://www.ssc.com/linux/,
    _IMAGE(_HOMEPAGE/powered.gif,196,49))<BR>
`If you are wondering, Linux is a free, non-commercial
operating system for computers. It happens to be a hobby of
mine and might well interest other hackers. Click on the logo
to learn more...')

m4_define(`_HEADER', 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML> 
<HEAD> 
  <TITLE>$1</TITLE>
  <META NAME="Author" CONTENT="Bob Hepple">
</HEAD>
<BODY BGCOLOR="#FFFFFE" BACKGROUND="http:_HOMEPAGE/bg.gif" $2>
<CENTER><A NAME="Contents"><H1>$1</H1></A></CENTER><HR>)

m4_define(_COUNTER,)

m4_dnl define(`_COUNTER',<img SRC="/cgi-bin/Count.cgi?dd=T|ft=6|frgb=648bd8|md=5|pad=Y|df=bhepple$1.dat" align=absmiddle> $2)

m4_define(`_CREDITS',`For corrections/additions/suggestions for this page, please send email to: _EMAILME(Bob Hepple) <P> Copyright `&#169;' 1997 Bob Hepple. All rights reserved.')

m4_dnl ----------------------------------------------
m4_dnl TABLE OF CONTENTS

m4_define(`_Start_TOC',`<UL><P>m4_divert(-1)
  m4_define(`_H1_num',0)
  m4_define(`_H2_num',0)
  m4_define(`_H3_num',0)
  m4_define(`_H4_num',0)
  m4_divert(1)')

m4_define(`_H1', `m4_divert(-1)
  m4_define(`_H1_num',m4_incr(_H1_num))
  m4_define(`_H2_num',0)
  m4_define(`_H3_num',0)
  m4_define(`_H4_num',0)
  m4_define(`_TOC_label',`_H1_num. $1')
  m4_divert(0)<LI><A HREF="#_TOC_label">_TOC_label</A>
  m4_divert(1)<A NAME="_TOC_label"><H2>_TOC_label</H2></A>')

m4_define(`_H2', `m4_divert(-1)
  m4_define(`_H2_num',m4_incr(_H2_num))
  m4_define(`_H3_num',0)
  m4_define(`_H4_num',0)
  m4_define(`_TOC_label',`_H1_num._H2_num $1')
  m4_divert(0)<LI><A HREF="#_TOC_label">_TOC_label</A>
  m4_divert(1)<A NAME="_TOC_label"><H2>_TOC_label</H2></A>')

m4_define(`_H3', `m4_divert(-1)
  m4_define(`_H3_num',m4_incr(_H3_num))
  m4_define(`_H4_num',0)
  m4_define(`_TOC_label',`_H1_num._H2_num._H3_num $1')
  m4_divert(0)<LI><A HREF="#_TOC_label">_TOC_label</A>
  m4_divert(1)<A NAME="_TOC_label"><H2>_TOC_label</H2></A>')

m4_define(`_H4', `m4_divert(-1)
  m4_define(`_H4_num',m4_incr(_H4_num))
  m4_define(`_TOC_label',`_H1_num._H2_num._H3_num._H4_num $1')
  m4_divert(0)<LI><A HREF="#_TOC_label">_TOC_label</A>
  m4_divert(1)<A NAME="_TOC_label"><H2>_TOC_label</H2></A>')

m4_define(`_End_TOC',`m4_divert(0)</UL><P>')

m4_dnl ----------------------------------------------
m4_dnl TABLES

m4_dnl _Start_Table(Columns,TABLE parameters)
m4_dnl defaults are BORDER=1 CELLPADDING="1" CELLSPACING="1"
m4_dnl WIDTH="n" pixels or "n%" of screen width
m4_define(`_Start_Table',`<TABLE $1>')

m4_define(`_Table_Hdr_Item', `<th>$1</th>m4_ifelse($#,1,,`_Table_Hdr_Item(m4_shift($@))')')

m4_define(`_Table_Row_Item', `<td>$1</td>m4_ifelse($#,1,,`_Table_Row_Item(m4_shift($@))')')

m4_define(`_Table_Hdr',`<tr>_Table_Hdr_Item($@)</tr>')
m4_define(`_Table_Row',`<tr>_Table_Row_Item($@)</tr>')

m4_define(`_End_Table',</TABLE>)

m4_dnl -- local adations, we only use the ones below, the ones above are for
m4_dnl -- reference to the original stdlib.m4

m4_define(`_LINK_TO_LABEL',`
 <a href="#$1">$1</a>
')
m4_define(`_SECTION_HEADER',`
 <a name="$2"><$1>$2</$1></a>
')

m4_define(`_TABLE_START',`
<div class="box">
<table class="results">
')

m4_define(`_Table_Hdr_Item', `<th>$1</th>m4_ifelse($#,1,,`_Table_Hdr_Item(m4_shift($@))')')

m4_define(`_Table_Row_Item', `<td>$1</td>m4_ifelse($#,1,,`_Table_Row_Item(m4_shift($@))')')

m4_define(_TABLE_ROW_CNT,0)
m4_define(`_TABLE_HEADER',`<thead><tr>_Table_Hdr_Item($@)</tr></thead>')
m4_define(`_TABLE_ROW',`
<tbody>
  m4_define(`_TABLE_ROW_CNT',m4_incr(_TABLE_ROW_CNT))
  m4_ifelse(m4_eval(_TABLE_ROW_CNT % 2),0,`<tr class="even">',`<tr class="odd">')
    _Table_Row_Item($@)
  </tr>
</tbody>
')

m4_define(`_TABLE_END',`</table></div>')
<table class="results">

m4_divert