summaryrefslogtreecommitdiff
path: root/src/mime/pack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mime/pack.h')
-rw-r--r--src/mime/pack.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/mime/pack.h b/src/mime/pack.h
new file mode 100644
index 0000000..e750aac
--- /dev/null
+++ b/src/mime/pack.h
@@ -0,0 +1,48 @@
1/*************************************************************************
2 *
3 * HTCd - Copyright (C) 1998-2006 Henrik Rydberg
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef PACKH
21#define PACKH
22
23#include <mt/mset.h>
24#include <mt/msmap.h>
25
26// Really mimefunctions, but needed here
27
28mstream& cashex(mstream& out,unsigned char c);
29char hexasc(unsigned char c1,unsigned char c2);
30
31// Packing means application/x-www-form-urlencoded
32
33void Unpack(mstream& out,const sref& in);
34void Unpack(spile& list,const sref& in);
35void Unpack(sspile& list,const sref& in);
36
37void Pack(mstream& out,const sref& in);
38void Pack(mstream& out,const rpile& list);
39void Pack(mstream& out,const rrpile& list);
40
41// CR LF and CRLF business
42
43const mstring CRLF="\r\n";
44
45void CRLF2LF(mstream& out,const sref& in);
46void LF2CRLF(mstream& out,const sref& in);
47
48#endif