--- parser3/src/include/pa_string.h 2001/11/16 12:38:43 1.116 +++ parser3/src/include/pa_string.h 2001/11/16 14:25:02 1.118 @@ -4,7 +4,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_string.h,v 1.116 2001/11/16 12:38:43 paf Exp $ + $Id: pa_string.h,v 1.118 2001/11/16 14:25:02 paf Exp $ */ #ifndef PA_STRING_H @@ -108,9 +108,7 @@ public: String(Pool& apool, const char *src=0, size_t src_size=0, bool tainted=false); String(const String& src); - size_t size() const { return fsize; } - /// makes store_to produce origin:text\n output - void set_origins_mode(bool aorigins_mode) const { forigins_mode=aorigins_mode; } + size_t size() const; /// convert to C string. if 'lang' known, forcing 'lang' to it char *cstr(Untaint_lang lang=UL_AS_IS, SQL_Connection *connection=0, @@ -121,6 +119,7 @@ public: *eol=0; return result; } + char *cstr_debug_origins() const; /// puts pieces to buf void serialize(size_t prolog_size, void *& buf, size_t& buf_size) const; /// appends pieces from buf to self @@ -235,13 +234,13 @@ private: /// several String fragments struct Chunk { - uint count; ///< the number of rows in chunk + ushort count; ///< the number of rows in chunk /// string fragment or a link to next chunk union union Row { /// fragment struct { const char *ptr; ///< pointer to the start - size_t size; ///< length + ushort size; ///< length unsigned char/*Untaint_lang*/ lang; ///< untaint flag, later untaint language #ifndef NO_STRING_ORIGIN Origin origin; ///< origin @@ -265,12 +264,6 @@ private: /// last chunk Chunk *last_chunk; - /// string size - size_t fsize; - - /// origins_mode changes behaviour of store_to[cstr()] - mutable bool forigins_mode; - private: bool chunk_is_full() {