|
a/src/bincimapmime/convert.h |
|
b/src/bincimapmime/convert.h |
1 |
/* -*- Mode: c++; -*- */
|
1 |
/* -*- mode:c++;c-basic-offset:2 -*- */
|
2 |
/* --------------------------------------------------------------------
|
2 |
/* --------------------------------------------------------------------
|
3 |
* Filename:
|
3 |
* Filename:
|
4 |
* src/util/convert.h
|
4 |
* src/util/convert.h
|
5 |
*
|
5 |
*
|
6 |
* Description:
|
6 |
* Description:
|
7 |
* Declaration of miscellaneous convertion functions.
|
7 |
* Declaration of miscellaneous convertion functions.
|
8 |
* --------------------------------------------------------------------
|
8 |
* --------------------------------------------------------------------
|
9 |
* Copyright 2002-2004 Andreas Aardal Hanssen
|
9 |
* Copyright 2002-2005 Andreas Aardal Hanssen
|
10 |
*
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or modify
|
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
|
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
|
13 |
* the Free Software Foundation; either version 2 of the License, or
|
14 |
* (at your option) any later version.
|
14 |
* (at your option) any later version.
|
|
... |
|
... |
36 |
|
36 |
|
37 |
#include <stdio.h>
|
37 |
#include <stdio.h>
|
38 |
#include <sys/stat.h>
|
38 |
#include <sys/stat.h>
|
39 |
|
39 |
|
40 |
#include "address.h"
|
40 |
#include "address.h"
|
41 |
#include "depot.h"
|
41 |
//#include "depot.h"
|
42 |
|
42 |
|
43 |
namespace Binc {
|
43 |
namespace Binc {
|
44 |
|
44 |
|
45 |
//----------------------------------------------------------------------
|
45 |
//----------------------------------------------------------------------
|
46 |
inline std::string toString(int i_in)
|
46 |
inline std::string toString(int i_in)
|
|
... |
|
... |
262 |
regex += "\\";
|
262 |
regex += "\\";
|
263 |
regex += *i;
|
263 |
regex += *i;
|
264 |
} else if (*i == '*')
|
264 |
} else if (*i == '*')
|
265 |
regex += ".*?";
|
265 |
regex += ".*?";
|
266 |
else if (*i == '%') {
|
266 |
else if (*i == '%') {
|
|
|
267 |
regex += "(\\";
|
|
|
268 |
regex += delimiter;
|
|
|
269 |
regex += "){0,1}";
|
267 |
regex += "[^\\";
|
270 |
regex += "[^\\";
|
268 |
regex += delimiter;
|
271 |
regex += delimiter;
|
269 |
regex += "]*?";
|
272 |
regex += "]*?";
|
270 |
} else regex += *i;
|
273 |
} else regex += *i;
|
271 |
}
|
274 |
}
|