|
|
| version 1.47, 2001/03/20 06:45:18 | version 1.48, 2001/03/21 14:06:44 |
|---|---|
| Line 27 | Line 27 |
| const char *src, size_t size, \ | const char *src, size_t size, \ |
| bool tainted, \ | bool tainted, \ |
| 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, false, 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, true, 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 | bool tainted |
| /// 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, false) |
| /// 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, true) |
| #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 66 | Line 66 |
| */ | */ |
| class String : public Pooled { | class String : public Pooled { |
| public: | public: |
| enum { | enum { |
| CR_PREALLOCATED_COUNT=5, ///< default preallocated item count | CR_PREALLOCATED_COUNT=5, ///< default preallocated item count |
| CR_GROW_PERCENT=60 ///< each time the Array chunk_is_full() array expanded() | CR_GROW_PERCENT=60 ///< each time the Array chunk_is_full() array expanded() |
| Line 73 public: | Line 74 public: |
| /// piece is tainted or not. the language to use when detaint | /// piece is tainted or not. the language to use when detaint |
| enum Untaint_lang { | enum Untaint_lang { |
| UNKNOWN=0, ///< when get by name fails | UL_UNKNOWN=0, ///< when get by name fails |
| NO, ///< clean | UL_NO, ///< clean |
| YES, ///< tainted, untaint language as assigned later | UL_YES, ///< tainted, untaint language as assigned later |
| // untaint languages. assigned by ^untaint[lang]{...} | // untaint languages. assigned by ^untaint[lang]{...} |
| PASS_APPENDED, | UL_PASS_APPENDED, |
| /**< | /**< |
| leave language built into string being appended. | leave language built into string being appended. |
| just a flag, that value not stored | just a flag, that value not stored |
| */ | */ |
| AS_IS, ///< leave all characters intact | UL_AS_IS, ///< leave all characters intact |
| FILE_NAME, ///< filename | UL_FILE_NAME, ///< filename |
| HEADER, ///< text in response header | UL_HEADER, ///< text in response header |
| URI, ///< text in uri | UL_URI, ///< text in uri |
| TABLE, ///< ^table:set body | UL_TABLE, ///< ^table:set body |
| SQL, ///< ^table:sql body | UL_SQL, ///< ^table:sql body |
| JS, ///< JavaScript code | UL_JS, ///< JavaScript code |
| HTML, ///< HTML code (for editing) | UL_HTML, ///< HTML code (for editing) |
| HTML_TYPO ///< HTML code with TYPOgraphic replacements (for showing) | UL_HTML_TYPO ///< HTML code with TYPOgraphic replacements (for showing) |
| }; | }; |
| public: | public: |