--- parser3/src/include/pa_string.h 2001/10/29 15:15:11 1.111 +++ parser3/src/include/pa_string.h 2001/11/05 11:46:25 1.115 @@ -2,9 +2,9 @@ Parser: string class decl. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_string.h,v 1.111 2001/10/29 15:15:11 paf Exp $ + $Id: pa_string.h,v 1.115 2001/11/05 11:46:25 paf Exp $ */ #ifndef PA_STRING_H @@ -78,6 +78,7 @@ class Dictionary; - whether they are tainted or not, and the language which should be used to detaint them */ +#include "pa_pragma_pack_begin.h" class String : public Pooled { public: @@ -173,7 +174,6 @@ public: return cmp(partial, src_ptr, 0)!=0; } - /** appends other String. @@ -195,10 +195,10 @@ public: /// @return position of substr in string, -1 means "not found" [String version] int pos(const String& substr, - size_t this_offset=0, Untaint_lang lang=UL_UNSPECIFIED) const; + int this_offset=0, Untaint_lang lang=UL_UNSPECIFIED) const; /// @return position of substr in string, -1 means "not found" [const char* version] int pos(const char *substr, size_t substr_size=0, - size_t this_offset=0, Untaint_lang lang=UL_UNSPECIFIED) const; + int this_offset=0, Untaint_lang lang=UL_UNSPECIFIED) const; void split(Array& result, size_t *pos_after_ref, @@ -244,14 +244,14 @@ private: /// several String fragments struct Chunk { - size_t count; ///< the number of rows in chunk + uint 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 - Untaint_lang lang; ///< untaint flag, later untaint language + unsigned char/*Untaint_lang*/ lang; ///< untaint flag, later untaint language #ifndef NO_STRING_ORIGIN Origin origin; ///< origin #endif @@ -296,7 +296,7 @@ private: String& reconstruct(Pool& pool) const; void join_chain(Pool& pool, - size_t& ai, const Chunk*& achunk, const Chunk::Row*& arow, + uint& ai, const Chunk*& achunk, const Chunk::Row*& arow, Untaint_lang& joined_lang, const char *& joined_ptr, size_t& joined_size) const; String& replace_in_reconstructed(Pool& pool, Dictionary& dict) const; @@ -305,5 +305,6 @@ private: //disabled String& operator = (const String&) { return *this; } }; +#include "pa_pragma_pack_end.h" #endif