blob: 74b90663f9ca48fe22f4352c79c119da194b1af6 (
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
|
/*************************************************
* xfpt - Simple ASCII->Docbook processor *
*************************************************/
/* Copyright (c) University of Cambridge, 2006 */
/* Written by Philip Hazel. */
/* This module contains code for processing lines of literal text. */
#include "xfpt.h"
/*************************************************
* Process a line of literal text *
*************************************************/
/* All we need to do is make sure that any & < and > characters are correctly
escaped.
Argument: the line to be processed
Returns: nothing
*/
void
literal_process(uschar *p)
{
while (*p != 0)
{
int c = *p++;
if (c == '&') (void)fprintf(outfile, "&");
else if (c == '<') (void)fprintf(outfile, "<");
else if (c == '>') (void)fprintf(outfile, ">");
else (void)fputc(c, outfile);
}
}
/* End of literal.c */
|