|
|
| version 1.50, 2001/03/24 19:12:18 | version 1.53, 2001/03/25 10:14:38 |
|---|---|
| Line 29 | Line 29 |
| #ifndef NO_STRING_ORIGIN | #ifndef NO_STRING_ORIGIN |
| # define STRING_APPEND_PARAMS \ | # define STRING_APPEND_PARAMS \ |
| const char *src, size_t size, \ | const char *src, size_t size, \ |
| bool tainted, \ | String::Untaint_lang lang, \ |
| const char *file, uint line | const char *file, uint line |
| /// appends clean piece to String @see String::real_append | /// appends clean piece to String @see String::real_append |
| # define APPEND(src, size, file, line) real_append(src, size, false, file, line) | # define APPEND(src, size, file, line) \ |
| real_append(src, size, String::UL_NO, file, line) | |
| /// appends tainted piece to String @see String::real_append | /// appends tainted piece to String @see String::real_append |
| # define APPEND_TAINTED(src, size, file, line) real_append(src, size, true, file, line) | # define APPEND_TAINTED(src, size, file, line) \ |
| real_append(src, size, String::UL_YES, file, line) | |
| #else | #else |
| # define STRING_APPEND_PARAMS \ | # define STRING_APPEND_PARAMS \ |
| const char *src, \ | const char *src, \ |
| size_t size, \ | size_t size, \ |
| bool tainted | String::Untaint_lang lang |
| /// appends clean piece to String @see String::real_append | /// appends clean piece to String @see String::real_append |
| # define APPEND(src, size, file, line) real_append(src, size, false) | # define APPEND(src, size, file, line) \ |
| real_append(src, size, String::UL_NO) | |
| /// appends tainted piece to String @see String::real_append | /// appends tainted piece to String @see String::real_append |
| # define APPEND_TAINTED(src, size, file, line) real_append(src, size, true) | # define APPEND_TAINTED(src, size, file, line) \ |
| real_append(src, size, String::UL_YES) | |
| #endif | #endif |
| /// handy: appends const char* piece to String @see String::real_append | /// handy: appends const char* piece to String @see String::real_append |
| #define APPEND_CONST(src) APPEND(src, 0, 0, 0) | #define APPEND_CONST(src) APPEND(src, 0, 0, 0) |
| Line 130 public: | Line 134 public: |
| /** | /** |
| @param partial | @param partial |
| returns partial match status. | returns partial match status. |
| -1 means @c this starts @c src | - -1: strings too different |
| +2 means @src starts @this | - 0: full match |
| - 1: means @c this starts @c src | |
| - 2: means @src starts @this | |
| */ | */ |
| int cmp(const char* src_ptr, int& partial, size_t src_size=0) const; | int cmp(const char* src_ptr, int& partial, size_t src_size=0) const; |
| bool operator == (const char* src_ptr) const { | bool operator == (const char* src_ptr) const { |