|
a |
|
b/src/bincimapmime/mime-utils.h |
|
|
1 |
/* -*- Mode: c++; -*- */
|
|
|
2 |
/* --------------------------------------------------------------------
|
|
|
3 |
* Filename:
|
|
|
4 |
* mime.cc
|
|
|
5 |
*
|
|
|
6 |
* Description:
|
|
|
7 |
* Implementation of main mime parser components
|
|
|
8 |
* --------------------------------------------------------------------
|
|
|
9 |
* Copyright 2002-2004 Andreas Aardal Hanssen
|
|
|
10 |
*
|
|
|
11 |
* This program is free software; you can redistribute it and/or modify
|
|
|
12 |
* it under the terms of the GNU General Public License as published by
|
|
|
13 |
* the Free Software Foundation; either version 2 of the License, or
|
|
|
14 |
* (at your option) any later version.
|
|
|
15 |
*
|
|
|
16 |
* This program is distributed in the hope that it will be useful,
|
|
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
19 |
* GNU General Public License for more details.
|
|
|
20 |
*
|
|
|
21 |
* You should have received a copy of the GNU General Public License
|
|
|
22 |
* along with this program; if not, write to the Free Software
|
|
|
23 |
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
|
|
|
24 |
* --------------------------------------------------------------------
|
|
|
25 |
*/
|
|
|
26 |
#ifndef mime_utils_h_included
|
|
|
27 |
#define mime_utils_h_included
|
|
|
28 |
|
|
|
29 |
#ifdef HAVE_CONFIG_H
|
|
|
30 |
#include <config.h>
|
|
|
31 |
#endif
|
|
|
32 |
|
|
|
33 |
#include <string.h>
|
|
|
34 |
#include <ctype.h>
|
|
|
35 |
#include <stdio.h>
|
|
|
36 |
#include <errno.h>
|
|
|
37 |
|
|
|
38 |
using namespace ::std;
|
|
|
39 |
|
|
|
40 |
inline bool compareStringToQueue(const char *s_in, char *bqueue,
|
|
|
41 |
int pos, int size)
|
|
|
42 |
{
|
|
|
43 |
for (int i = 0; i < size; ++i)
|
|
|
44 |
if (s_in[i] != bqueue[(pos + i) % size])
|
|
|
45 |
return false;
|
|
|
46 |
|
|
|
47 |
return true;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
#endif
|