Index: cpp/frams/util/callbacks.cpp
===================================================================
--- cpp/frams/util/callbacks.cpp	(revision 786)
+++ cpp/frams/util/callbacks.cpp	(revision 793)
@@ -9,8 +9,8 @@
 int MemberCallbackNode::equals(CallbackNode*n)
 {
-if (n==this) return 1;
-MemberCallbackNode *classok=dynamic_cast<MemberCallbackNode*>(n);
-if (!classok) return 0;
-return ((userdata==classok->userdata)&&(object==classok->object)&&(member==classok->member));
+	if (n == this) return 1;
+	MemberCallbackNode *classok = dynamic_cast<MemberCallbackNode*>(n);
+	if (!classok) return 0;
+	return ((userdata == classok->userdata) && (object == classok->object) && (member == classok->member));
 }
 #endif
@@ -18,16 +18,16 @@
 int FunctionCallbackNode::equals(CallbackNode*n)
 {
-if (n==this) return 1;
-FunctionCallbackNode *classok=dynamic_cast<FunctionCallbackNode*>(n);
-if (!classok) return 0;
-return ((userdata==classok->userdata)&&(fun==classok->fun));
+	if (n == this) return 1;
+	FunctionCallbackNode *classok = dynamic_cast<FunctionCallbackNode*>(n);
+	if (!classok) return 0;
+	return ((userdata == classok->userdata) && (fun == classok->fun));
 }
 
 int StatrickCallbackNode::equals(CallbackNode*n)
 {
-if (n==this) return 1;
-StatrickCallbackNode *classok=dynamic_cast<StatrickCallbackNode*>(n);
-if (!classok) return 0;
-return ((object==classok->object)&&(userdata==classok->userdata)&&(fun==classok->fun));
+	if (n == this) return 1;
+	StatrickCallbackNode *classok = dynamic_cast<StatrickCallbackNode*>(n);
+	if (!classok) return 0;
+	return ((object == classok->object) && (userdata == classok->userdata) && (fun == classok->fun));
 }
 
@@ -36,48 +36,48 @@
 CallbackNode* Callback::add(CallbackNode*n)
 {
-SList::operator+=(n);
-return n;
+	SList::operator+=(n);
+	return n;
 }
 
 void Callback::removeNode(CallbackNode*n)
 {
-SList::operator-=(n);
-delete n;
+	SList::operator-=(n);
+	delete n;
 }
 
 void Callback::remove(CallbackNode*node)
 {
-CallbackNode *n;
-//printf("Hint: removing callbacks (former 'DuoList') is more efficient using removeNode(). (refer to 'callbacks.h')\n");
-for (int i=0;n=(CallbackNode *)operator()(i);i++)
-	if (node->equals(n))
+	CallbackNode *n;
+	//printf("Hint: removing callbacks (former 'DuoList') is more efficient using removeNode(). (refer to 'callbacks.h')\n");
+	for (int i = 0; n = (CallbackNode *)operator()(i); i++)
+		if (node->equals(n))
 		{
 		SList::operator-=(i);
 		delete node;
-		if (n!=node) delete n;
+		if (n != node) delete n;
 		return;
 		}
-delete node; // tu nie wiem czy na pewno...
+	delete node; // tu nie wiem czy na pewno...
 }
 
 void Callback::action(intptr_t data)
 {
-if (size()==0) return;
-SList copy=*this;
-FOREACH(CallbackNode*,n,copy)
-	n->action(data);
+	if (size() == 0) return;
+	SList copy = *this;
+	FOREACH(CallbackNode*, n, copy)
+		n->action(data);
 }
 
 Callback::~Callback()
 {
-CallbackNode *n;
-for (int i=size()-1;i>=0;i--)
+	CallbackNode *n;
+	for (int i = size() - 1; i >= 0; i--)
 	{
-	n=(CallbackNode *)operator()(i);
-	delete n;
-// todo: zrobic zeby kolejnosc delete callbacknode <-> delete callback nie wplywala na poprawne dzialania
-// blad odkryty 24.01 pokazal, ze deletowanie callbacknodow w ~callback
-// moze powodowac problemy, jezeli obiekty sa usuwane w "zlej" kolejnosci
-// ale na razie tak zostanie
+		n = (CallbackNode *)operator()(i);
+		delete n;
+		// todo: zrobic zeby kolejnosc delete callbacknode <-> delete callback nie wplywala na poprawne dzialania
+		// blad odkryty 24.01 pokazal, ze deletowanie callbacknodow w ~callback
+		// moze powodowac problemy, jezeli obiekty sa usuwane w "zlej" kolejnosci
+		// ale na razie tak zostanie
 	}
 }
Index: cpp/frams/util/callbacks.h
===================================================================
--- cpp/frams/util/callbacks.h	(revision 786)
+++ cpp/frams/util/callbacks.h	(revision 793)
@@ -15,7 +15,7 @@
 {
 public:
-virtual ~CallbackNode() {}
-virtual void action(intptr_t calldata)=0;
-virtual int equals(CallbackNode*n) {return (this==n);}
+	virtual ~CallbackNode() {}
+	virtual void action(intptr_t calldata) = 0;
+	virtual int equals(CallbackNode*n) { return (this == n); }
 };
 
@@ -24,11 +24,11 @@
 class MemberCallbackNode :public CallbackNode
 {
-void *userdata;
-CallBase *object;
-void (CallBase::*member)(void*,intptr_t);
-  public:
-MemberCallbackNode(CallBase *o,void (CallBase::*m)(void*,intptr_t),void *d):object(o),member(m),userdata(d) {}
-void action(intptr_t calldata) {(object->*member)(userdata,calldata);}
-int equals(CallbackNode*);
+	void *userdata;
+	CallBase *object;
+	void (CallBase::*member)(void*, intptr_t);
+public:
+	MemberCallbackNode(CallBase *o, void (CallBase::*m)(void*, intptr_t), void *d) :object(o), member(m), userdata(d) {}
+	void action(intptr_t calldata) { (object->*member)(userdata, calldata); }
+	int equals(CallbackNode*);
 };
 #define MEMBERCALLBACK(obj,mem,dat) new MemberCallbackNode((CallBase*)(obj),(void (CallBase::*)(void*,intptr_t))(mem),(void*)(dat))
@@ -37,10 +37,10 @@
 class FunctionCallbackNode :public CallbackNode
 {
-void *userdata;
-void (*fun)(void*,intptr_t);
-  public:
-FunctionCallbackNode(void (*f)(void*,intptr_t),void *d):userdata(d),fun(f) {}
-void action(intptr_t calldata) {(*fun)(userdata,calldata);}
-int equals(CallbackNode*);
+	void *userdata;
+	void(*fun)(void*, intptr_t);
+public:
+	FunctionCallbackNode(void(*f)(void*, intptr_t), void *d) :userdata(d), fun(f) {}
+	void action(intptr_t calldata) { (*fun)(userdata, calldata); }
+	int equals(CallbackNode*);
 };
 #define FUNCTIONCALLBACK(fun,dat) new FunctionCallbackNode((void (*)(void*,intptr_t))(fun),(void*)(dat))
@@ -48,11 +48,11 @@
 class StatrickCallbackNode :public CallbackNode
 {
-void *object;
-void *userdata;
-void (*fun)(void*,void*,intptr_t);
-  public:
-StatrickCallbackNode(void *o,void (*f)(void*,void*,intptr_t),void *d):object(o),userdata(d),fun(f) {}
-void action(intptr_t calldata) {(*fun)(object,userdata,calldata);}
-int equals(CallbackNode*);
+	void *object;
+	void *userdata;
+	void(*fun)(void*, void*, intptr_t);
+public:
+	StatrickCallbackNode(void *o, void(*f)(void*, void*, intptr_t), void *d) :object(o), userdata(d), fun(f) {}
+	void action(intptr_t calldata) { (*fun)(object, userdata, calldata); }
+	int equals(CallbackNode*);
 };
 #define STATRICKCALLBACK(obj,name,dat) new StatrickCallbackNode((void*)(obj),(void (*)(void*,void*,intptr_t))STATRICKNAME(name),(void*)(dat))
@@ -60,38 +60,42 @@
 /**
    Like in old 'DuoList' you can register for an event giving function pointer
-      add(Function* fun, void* anydata)
+   add(Function* fun, void* anydata)
    'fun' will be called with your pointer as the first argument (void*)
    and event specific value as the second argument (intptr_t)
-      fun(void* anydata,intptr_t eventdata)
+   fun(void* anydata,intptr_t eventdata)
 
    'StatrickCallbackNode' uses static functions to emulate object member calls.
    @see statrick.h
-   
+
    Unregistering callbacks:
    The old remove(...) still works, but removeNode() is more efficient.
    To use it you have to store what you get from add(...);
-      CallbackNode* node=thelist.l_add.add(&fun,data);
-      // thelist.l_add.remove(&fun,data);
-      thelist.l_add.removeNode(node); // this is better!
+   CallbackNode* node=thelist.l_add.add(&fun,data);
+   // thelist.l_add.remove(&fun,data);
+   thelist.l_add.removeNode(node); // this is better!
 
- */
+   */
 
-class Callback: protected SList
+class Callback : protected SList
 {
 public:
-~Callback();
-CallbackNode* add(CallbackNode*n);
-CallbackNode* add(void (*f)(void*,intptr_t),void *d)
-	{return add(new FunctionCallbackNode(f,d));}
-void remove(void (*f)(void*,intptr_t),void *d)
-	{remove(new FunctionCallbackNode(f,d));}
-void remove(CallbackNode*n);
-void removeNode(CallbackNode*n);
-void operator+=(void* fun) {add((void (*)(void*,intptr_t))fun,0);}
-void operator-=(void* fun) {remove((void (*)(void*,intptr_t))fun,0);}
-void action(intptr_t data);
-void action() {action(0);}
-int size() {return SList::size();}
-void clear() {SList::clear();}
+	~Callback();
+	CallbackNode* add(CallbackNode*n);
+	CallbackNode* add(void(*f)(void*, intptr_t), void *d)
+	{
+		return add(new FunctionCallbackNode(f, d));
+	}
+	void remove(void(*f)(void*, intptr_t), void *d)
+	{
+		remove(new FunctionCallbackNode(f, d));
+	}
+	void remove(CallbackNode*n);
+	void removeNode(CallbackNode*n);
+	void operator+=(void* fun) { add((void(*)(void*, intptr_t))fun, 0); }
+	void operator-=(void* fun) { remove((void(*)(void*, intptr_t))fun, 0); }
+	void action(intptr_t data);
+	void action() { action(0); }
+	int size() { return SList::size(); }
+	void clear() { SList::clear(); }
 };
 
@@ -108,14 +112,13 @@
 /* STCALLBACKDEFC(Class,name)
 
-     |
-     v
+	 |
+	 v
 
-   #define STATRICKCLASS Class
-   STCALLBACKDEF(name)
-   #undef STATRICKCLASS
- */
+	 #define STATRICKCLASS Class
+	 STCALLBACKDEF(name)
+	 #undef STATRICKCLASS
+	 */
 
 #define CALLBACKARGS void* arg1,intptr_t arg2
 
 #endif
-
Index: cpp/frams/util/extvalue.h
===================================================================
--- cpp/frams/util/extvalue.h	(revision 786)
+++ cpp/frams/util/extvalue.h	(revision 793)
@@ -126,8 +126,8 @@
 		ExtObject *o;
 	};
-	paInt& idata() const {return (paInt&)i;};
-	double& ddata() const {return (double&)d;};
-	ExtObject& odata() const {return *o;};
-	SString& sdata() const {return *s;};
+	paInt& idata() const { return (paInt&)i; };
+	double& ddata() const { return (double&)d; };
+	ExtObject& odata() const { return *o; };
+	SString& sdata() const { return *s; };
 #endif
 
@@ -237,8 +237,8 @@
 	void seto(const ExtObject &src) { type = TObj; new(data)ExtObject(src); }
 #else
-	void setrs(const SString &v) {setEmpty();sets(v);}
-	void setro(const ExtObject &src) {setEmpty();seto(src);}
-	void sets(const SString &v) {type=TString;s=new SString(v);}
-	void seto(const ExtObject &src) {type=TObj;o=new ExtObject(src);}
+	void setrs(const SString &v) { setEmpty(); sets(v); }
+	void setro(const ExtObject &src) { setEmpty(); seto(src); }
+	void sets(const SString &v) { type = TString; s = new SString(v); }
+	void seto(const ExtObject &src) { type = TObj; o = new ExtObject(src); }
 #endif
 
Index: cpp/frams/util/hashtable.cpp
===================================================================
--- cpp/frams/util/hashtable.cpp	(revision 786)
+++ cpp/frams/util/hashtable.cpp	(revision 793)
@@ -7,126 +7,126 @@
 int HashTable::hash(const SString &s)
 {
-return s.hash()&0x7fffffff;
+	return s.hash() & 0x7fffffff;
 }
 
-void HashTable::init(int initsize,float lo)
+void HashTable::init(int initsize, float lo)
 {
-size=initsize;
-load=lo;
-threshold=(int)(load*(float)size);
-tab=(HashEntry**)calloc(size,sizeof(HashEntry*));
-count=0;
-sync=0;
+	size = initsize;
+	load = lo;
+	threshold = (int)(load*(float)size);
+	tab = (HashEntry**)calloc(size, sizeof(HashEntry*));
+	count = 0;
+	sync = 0;
 }
 
 void HashTable::rehash(int newsize)
 {
-if (newsize==size) return;
-HashEntry **newtab=(HashEntry**)calloc(newsize,sizeof(HashEntry*));
-HashEntry **te=tab,*e,*ne;
-int i;
-for (int s=size;s>0;s--,te++)
-    for (e=*te;e;)
-	{
-	    ne=e; e=e->next;
-	    i=ne->hash%newsize;
-	    ne->next=newtab[i];
-	    newtab[i]=ne;
-	}
-free(tab);
-tab=newtab;
-size=newsize;
-threshold=int(load*(float)size);
-sync++;
+	if (newsize == size) return;
+	HashEntry **newtab = (HashEntry**)calloc(newsize, sizeof(HashEntry*));
+	HashEntry **te = tab, *e, *ne;
+	int i;
+	for (int s = size; s > 0; s--, te++)
+		for (e = *te; e;)
+		{
+		ne = e; e = e->next;
+		i = ne->hash%newsize;
+		ne->next = newtab[i];
+		newtab[i] = ne;
+		}
+	free(tab);
+	tab = newtab;
+	size = newsize;
+	threshold = int(load*(float)size);
+	sync++;
 }
 
 void HashTable::clear()
 {
-HashEntry *e,**te,*next;
-int n;
-for (n=size,te=tab;n>0;n--,te++)
-	for (e=*te;e;e=next)
+	HashEntry *e, **te, *next;
+	int n;
+	for (n = size, te = tab; n > 0; n--, te++)
+		for (e = *te; e; e = next)
 		{
-		next=e->next;
+		next = e->next;
 		delete e;
 		}
-if (tab) free(tab);
-tab=0; size=0;
-sync++;
+	if (tab) free(tab);
+	tab = 0; size = 0;
+	sync++;
 }
 
 HashTable::~HashTable()
 {
-clear();
+	clear();
 }
 
-void* HashTable::put(const SString& key,void *value)
+void* HashTable::put(const SString& key, void *value)
 {
-int h=hash(key);
-int i=h%size;
-for (HashEntry *e=tab[i];e;e=e->next)
-    {
-    if (e->key==key)
+	int h = hash(key);
+	int i = h%size;
+	for (HashEntry *e = tab[i]; e; e = e->next)
 	{
-	void *v=e->value;
-	e->value=value;
-	return v;
+		if (e->key == key)
+		{
+			void *v = e->value;
+			e->value = value;
+			return v;
+		}
 	}
-    }
-if (count>=threshold) { rehash(2*size+1); i=h%size; }
-HashEntry *e=new HashEntry(h,key,value);
-e->next=tab[i];
-tab[i]=e;
-count++;
-sync++;
-return 0;
+	if (count >= threshold) { rehash(2 * size + 1); i = h%size; }
+	HashEntry *e = new HashEntry(h, key, value);
+	e->next = tab[i];
+	tab[i] = e;
+	count++;
+	sync++;
+	return 0;
 }
 
 void* HashTable::remove(const SString& key)
 {
-int i=hash(key)%size;
-HashEntry **ptr=tab+i,*e;
-for (;e=*ptr;ptr=&e->next)
-    {
-    if (e->key==key)
+	int i = hash(key) % size;
+	HashEntry **ptr = tab + i, *e;
+	for (; e = *ptr; ptr = &e->next)
 	{
-	*ptr=e->next;
-	void *v=e->value;
-	delete e;
-	count--;
-	sync++;
-	return v;
+		if (e->key == key)
+		{
+			*ptr = e->next;
+			void *v = e->value;
+			delete e;
+			count--;
+			sync++;
+			return v;
+		}
 	}
-    }
-return 0;
+	return 0;
 }
 
 void* HashTable::remove(HashEntryIterator& it)
 {
-if (!it.entry) return 0;
-HashEntry **ptr=tab+it.hashindex,*e;
-for (;e=*ptr;ptr=&e->next)
-    {
-    if (e == it.entry)
+	if (!it.entry) return 0;
+	HashEntry **ptr = tab + it.hashindex, *e;
+	for (; e = *ptr; ptr = &e->next)
 	{
-	it++;
-	*ptr=e->next;
-	void *v=e->value;
-	delete e;
-	count--;
-	sync++;
-	it.sync++;
-	return v;
+		if (e == it.entry)
+		{
+			it++;
+			*ptr = e->next;
+			void *v = e->value;
+			delete e;
+			count--;
+			sync++;
+			it.sync++;
+			return v;
+		}
 	}
-    }
-   return NULL; 
+	return NULL;
 }
 
-void* HashTable::get(const SString& key,int *reallygot)
+void* HashTable::get(const SString& key, int *reallygot)
 {
-int i=hash(key)%size;
-for (HashEntry *e=tab[i];e;e=e->next)
-	if (e->key==key) {if (reallygot) *reallygot=1; return e->value;}
-return 0;
+	int i = hash(key) % size;
+	for (HashEntry *e = tab[i]; e; e = e->next)
+		if (e->key == key) { if (reallygot) *reallygot = 1; return e->value; }
+	return 0;
 }
 
@@ -135,8 +135,8 @@
 void HashEntryIterator::findNext()
 {
-while (hashindex < (ht->size-1))
+	while (hashindex < (ht->size - 1))
 	{
-	hashindex++;
-	if (entry=ht->tab[hashindex]) return;
+		hashindex++;
+		if (entry = ht->tab[hashindex]) return;
 	}
 }
@@ -145,6 +145,6 @@
 void HashEntryIterator::operator++()
 {
-if (entry) entry=entry->next;
-if (!entry) findNext();
+	if (entry) entry = entry->next;
+	if (!entry) findNext();
 }
 
@@ -153,15 +153,15 @@
 void HashTable::debugprint()
 {
-printf("HashTable: %d/%d (max %d)\n",count,size,threshold);
-HashEntry *e,**te;
-int n;
-for (n=0,te=tab;n<size;n++,te++)
-	if (e=*te)
-	{
-	printf(" %d:",n);
-	for (;e;e=e->next)
-		printf(" (%x)%s=%p",e->hash,e->key.c_str(),e->value);
-	printf("\n");
-	}
+	printf("HashTable: %d/%d (max %d)\n", count, size, threshold);
+	HashEntry *e, **te;
+	int n;
+	for (n = 0, te = tab; n < size; n++, te++)
+		if (e = *te)
+		{
+		printf(" %d:", n);
+		for (; e; e = e->next)
+			printf(" (%x)%s=%p", e->hash, e->key.c_str(), e->value);
+		printf("\n");
+		}
 }
 
@@ -171,21 +171,21 @@
 stats[2]=avg keys in bucket
 stats[3]=max keys in bucket
- */
+*/
 void HashTable::getstats(float *stats)
 {
-HashEntry *e,**te;
-int used=0, ma=0, mi=count;
-int c,n;
-for (n=size,te=tab;n>0;n--,te++)
+	HashEntry *e, **te;
+	int used = 0, ma = 0, mi = count;
+	int c, n;
+	for (n = size, te = tab; n > 0; n--, te++)
 	{
-	c=0;
-	for (e=*te;e;e=e->next) c++;
-	if (c>ma) ma=c;
-	if ((c<mi)&&(c>0)) mi=c;
-	if (c>0) used++;
+		c = 0;
+		for (e = *te; e; e = e->next) c++;
+		if (c > ma) ma = c;
+		if ((c < mi) && (c>0)) mi = c;
+		if (c > 0) used++;
 	}
-stats[0]=(float)used;
-stats[1]=(float)((mi==count)?0:mi);
-stats[2]=(float)count/(float)used;
-stats[3]=(float)ma;
+	stats[0] = (float)used;
+	stats[1] = (float)((mi == count) ? 0 : mi);
+	stats[2] = (float)count / (float)used;
+	stats[3] = (float)ma;
 }
Index: cpp/frams/util/hashtable.h
===================================================================
--- cpp/frams/util/hashtable.h	(revision 786)
+++ cpp/frams/util/hashtable.h	(revision 793)
@@ -11,10 +11,10 @@
 {
 public:
-int hash;
-SString key;
-void *value;
-HashEntry *next;
+	int hash;
+	SString key;
+	void *value;
+	HashEntry *next;
 
-HashEntry(int h,const SString& k,void *v):hash(h),key(k),value(v),next(0){}
+	HashEntry(int h, const SString& k, void *v) :hash(h), key(k), value(v), next(0){}
 };
 
@@ -23,60 +23,62 @@
 class HashTable
 {
-friend class HashEntryIterator;
-HashEntry **tab;
-int size;
-int count;
-int threshold;
-float load;
-int sync;
+	friend class HashEntryIterator;
+	HashEntry **tab;
+	int size;
+	int count;
+	int threshold;
+	float load;
+	int sync;
 
-int hash(const SString &s);
-void rehash(int newsize);
+	int hash(const SString &s);
+	void rehash(int newsize);
 public:
 
-HashTable(int initsize,float lo) {init(initsize,lo);}
-HashTable(int initsize) {init(initsize,0.75);}
-HashTable() {init();}
-~HashTable();
+	HashTable(int initsize, float lo) { init(initsize, lo); }
+	HashTable(int initsize) { init(initsize, 0.75); }
+	HashTable() { init(); }
+	~HashTable();
 
-/** always use init() after clear() ! */
-void clear();
-void init(int initsize=11,float lo=0.75);
+	/** always use init() after clear() ! */
+	void clear();
+	void init(int initsize = 11, float lo = 0.75);
 
-int getSize() {return count;}
-void* put(const SString& key,void *value);
-void* get(const SString& key, int *reallygot=0);
-void* remove(const SString& key);
-/** can be used inside iteration loop:
-    for(HashEntryIterator it(hashtable);it;) hashtable.remove(it);
-    \note iterator is "iterated" to the next entry when the current one is removed (no "it++"!)
- */
-void* remove(HashEntryIterator& it);
+	int getSize() { return count; }
+	void* put(const SString& key, void *value);
+	void* get(const SString& key, int *reallygot = 0);
+	void* remove(const SString& key);
+	/** can be used inside iteration loop:
+		for(HashEntryIterator it(hashtable);it;) hashtable.remove(it);
+		\note iterator is "iterated" to the next entry when the current one is removed (no "it++"!)
+		*/
+	void* remove(HashEntryIterator& it);
 
-void debugprint();
-void getstats(float *);
+	void debugprint();
+	void getstats(float *);
 };
 
 /** for(HashEntryIterator it(hashtable);it;it++)
-      {
-      ... it->value
-      ... it->key
-      }
- */
+	  {
+	  ... it->value
+	  ... it->key
+	  }
+	  */
 class HashEntryIterator
 {
-void findNext();
-  public:
-const HashTable *ht;
-int hashindex;
-HashEntry *entry;
-int sync;
-  HashEntryIterator(const HashTable&t):ht(&t),hashindex(0),entry(t.tab[0]),sync(ht->sync)
-	{if (!entry) findNext();}
-  HashEntryIterator() {}
-void operator++();
-void operator++(int) {operator++();}
-HashEntry* operator->() {return entry;}
-bool isValid() {return (entry&&(sync==ht->sync))?1:0;}
+	void findNext();
+public:
+	const HashTable *ht;
+	int hashindex;
+	HashEntry *entry;
+	int sync;
+	HashEntryIterator(const HashTable&t) :ht(&t), hashindex(0), entry(t.tab[0]), sync(ht->sync)
+	{
+		if (!entry) findNext();
+	}
+	HashEntryIterator() {}
+	void operator++();
+	void operator++(int) { operator++(); }
+	HashEntry* operator->() { return entry; }
+	bool isValid() { return (entry && (sync == ht->sync)) ? 1 : 0; }
 };
 
Index: cpp/frams/util/list.h
===================================================================
--- cpp/frams/util/list.h	(revision 786)
+++ cpp/frams/util/list.h	(revision 793)
@@ -18,5 +18,5 @@
 public:
 	int objects, allocations, copied, totalmem, usedmem;
-	SListStats():objects(0),allocations(0),copied(0),totalmem(0),usedmem() {}
+	SListStats() :objects(0), allocations(0), copied(0), totalmem(0), usedmem() {}
 	~SListStats()
 	{
@@ -29,5 +29,5 @@
 			" usage       = %ld %%\n"
 			"------------------------\n",
-			objects,allocations,copied,totalmem,(usedmem*100)/totalmem);
+			objects, allocations, copied, totalmem, (usedmem * 100) / totalmem);
 	}
 };
@@ -47,5 +47,5 @@
 #ifdef SLISTSTATS
 			SListStats::stats.allocations++;
-			SListStats::stats.copied+=sizeof(T)*min(x,have);
+			SListStats::stats.copied += sizeof(T)*min(x, have);
 #endif	
 		}
@@ -65,6 +65,6 @@
 #ifdef SLISTSTATS
 		SListStats::stats.objects++;
-		SListStats::stats.totalmem+=sizeof(T)*have;
-		SListStats::stats.usedmem+=sizeof(T)*used;
+		SListStats::stats.totalmem += sizeof(T)*have;
+		SListStats::stats.usedmem += sizeof(T)*used;
 #endif
 		hardclear();
@@ -100,5 +100,5 @@
 	{
 		if (size() != l.size()) return 0;
-		for (int i = 0; i<size(); i++) if (l.mem[i] != mem[i]) return 0;
+		for (int i = 0; i < size(); i++) if (l.mem[i] != mem[i]) return 0;
 		return 1;
 	}
Index: cpp/frams/util/rndutil.h
===================================================================
--- cpp/frams/util/rndutil.h	(revision 786)
+++ cpp/frams/util/rndutil.h	(revision 793)
@@ -12,5 +12,5 @@
 
 /** @param x change seed if x<=0
-    @return random value [0..x-1] if x>0 */
+	@return random value [0..x-1] if x>0 */
 unsigned short pseudornd(short x);
 
@@ -25,12 +25,12 @@
 class RandomGener
 {
-   public:
-      RandomGener() {isNextGauss=0;}
-      static double Uni(double begin, double end); ///< uniform excluding 'end' boundary
-      double GaussStd();
-      double Gauss(double m,double s); ///< usually will not return further than 5*stdd
-   private:
-      int isNextGauss;
-      double nextGauss;
+public:
+	RandomGener() { isNextGauss = 0; }
+	static double Uni(double begin, double end); ///< uniform excluding 'end' boundary
+	double GaussStd();
+	double Gauss(double m, double s); ///< usually will not return further than 5*stdd
+private:
+	int isNextGauss;
+	double nextGauss;
 };
 
Index: cpp/frams/util/sstring-simple.cpp
===================================================================
--- cpp/frams/util/sstring-simple.cpp	(revision 786)
+++ cpp/frams/util/sstring-simple.cpp	(revision 793)
@@ -6,84 +6,84 @@
 void SString::initEmpty()
 {
-txt=NULL; used=0; size=0;
+	txt = NULL; used = 0; size = 0;
 }
 
 SString::SString()
 {
-initEmpty();
+	initEmpty();
 }
 
 SString::~SString()
 {
-resize(0);
+	resize(0);
 }
 
 SString::SString(int x)
 {
-initEmpty();
-if (x)
-	ensureSize(x+1);
-}
-
-SString::SString(const char *t,int t_len)
-{
-initEmpty();
-if (!t) return;
-copyFrom(t,t_len);
+	initEmpty();
+	if (x)
+		ensureSize(x + 1);
+}
+
+SString::SString(const char *t, int t_len)
+{
+	initEmpty();
+	if (!t) return;
+	copyFrom(t, t_len);
 }
 
 SString::SString(const SString &from)
 {
-initEmpty();
-operator=(from);
+	initEmpty();
+	operator=(from);
 }
 
 SString::SString(SString&& from)
 {
-txt=from.txt; size=from.size; used=from.used;
-from.txt=NULL; from.size=0; from.used=0;
+	txt = from.txt; size = from.size; used = from.used;
+	from.txt = NULL; from.size = 0; from.used = 0;
 }
 
 void SString::resize(int newsize)
 {
-if (newsize==size) return;
-txt=(char*)realloc(txt,newsize);
-size=newsize;
+	if (newsize == size) return;
+	txt = (char*)realloc(txt, newsize);
+	size = newsize;
 }
 
 void SString::ensureSize(int needed)
 {
-if (size>needed) return;
-resize( (size>0) ? (needed+needed/2+1) : (needed+1));
+	if (size > needed) return;
+	resize((size > 0) ? (needed + needed / 2 + 1) : (needed + 1));
 }
 
 char *SString::directWrite(int ensuresize)
 {
-ensureSize(ensuresize);
-appending=used;
-return txt;
+	ensureSize(ensuresize);
+	appending = used;
+	return txt;
 }
 
 char *SString::directAppend(int maxappend)
 {
-ensureSize(used+maxappend);
-appending=used;
-return txt+appending;
+	ensureSize(used + maxappend);
+	appending = used;
+	return txt + appending;
 }
 
 void SString::endWrite(int newlength)
 {
-if (newlength<0) newlength=strlen(txt);
-else txt[newlength]=0;
-used=newlength;
-assert(used<size);
+	if (newlength < 0) newlength = strlen(txt);
+	else txt[newlength] = 0;
+	used = newlength;
+	assert(used < size);
 }
 
 void SString::endAppend(int newappend)
 {
-if (newappend<0) newappend=strlen(txt+appending);
-else txt[appending+newappend]=0;
-used=appending+newappend;
-assert(used<size);
+	if (newappend < 0) newappend = strlen(txt + appending);
+	else txt[appending + newappend] = 0;
+	used = appending + newappend;
+	assert(used < size);
 }
 
@@ -92,51 +92,51 @@
 void SString::operator+=(const char *s)
 {
-if (!s) return;
-int x=strlen(s);
-if (!x) return;
-append(s,x);
-}
-
-void SString::append(const char *t,int n)
-{
-if (!n) return;
-ensureSize(used+n);
-memmove(txt+used,t,n);
-used+=n;
-txt[used]=0;
+	if (!s) return;
+	int x = strlen(s);
+	if (!x) return;
+	append(s, x);
+}
+
+void SString::append(const char *t, int n)
+{
+	if (!n) return;
+	ensureSize(used + n);
+	memmove(txt + used, t, n);
+	used += n;
+	txt[used] = 0;
 }
 
 void SString::operator+=(const SString&s)
 {
-append(s.c_str(),s.len());
+	append(s.c_str(), s.len());
 }
 
 SString SString::operator+(const SString& s) const
 {
-SString ret(len()+s.len());
-ret=*this;
-ret+=s;
-return ret;
+	SString ret(len() + s.len());
+	ret = *this;
+	ret += s;
+	return ret;
 }
 
 /////////////////////////////
 
-void SString::copyFrom(const char *ch,int chlen)
-{
-if (!ch) chlen=0;
-else if (chlen<0) chlen=strlen(ch);
-if (chlen)
+void SString::copyFrom(const char *ch, int chlen)
+{
+	if (!ch) chlen = 0;
+	else if (chlen < 0) chlen = strlen(ch);
+	if (chlen)
 	{
-	ensureSize(chlen);
-	memmove(txt,ch,chlen);
-	txt[chlen]=0;
-	used=chlen;
+		ensureSize(chlen);
+		memmove(txt, ch, chlen);
+		txt[chlen] = 0;
+		used = chlen;
 	}
-else
+	else
 	{
-	if (txt)
+		if (txt)
 		{
-		txt[0]=0;
-		used=0;
+			txt[0] = 0;
+			used = 0;
 		}
 	}
@@ -145,11 +145,11 @@
 void SString::operator=(const char *ch)
 {
-copyFrom(ch);
+	copyFrom(ch);
 }
 
 void SString::operator=(const SString&s)
 {
-if (&s==this) return;
-copyFrom(s.c_str(),s.len());
+	if (&s == this) return;
+	copyFrom(s.c_str(), s.len());
 }
 
@@ -158,9 +158,9 @@
 SString SString::substr(int begin, int length) const
 {
-if (begin<0) { length+=begin; begin=0; }
-if (length>=(len()-begin)) length=len()-begin;
-if (length<=0) return SString();
-if (length==len()) return *this;
-return SString((*this)(begin),length);
+	if (begin < 0) { length += begin; begin = 0; }
+	if (length >= (len() - begin)) length = len() - begin;
+	if (length <= 0) return SString();
+	if (length == len()) return *this;
+	return SString((*this)(begin), length);
 }
 
@@ -169,103 +169,103 @@
 bool SString::equals(const SString& s) const
 {
-if (this==&s) return true;
-if (len()!=s.len()) return false;
-return strcmp(getPtr(),s.getPtr())==0;
+	if (this == &s) return true;
+	if (len() != s.len()) return false;
+	return strcmp(getPtr(), s.getPtr()) == 0;
 }
 
 ///////////////////////////////////////
 
-int SString::indexOf(int character,int start) const
-{
-const char *found=strchr(getPtr()+start,character);
-return found?found-getPtr():-1;
-}
-
-int SString::indexOf(const char *substring,int start) const
-{
-const char *found=strstr(getPtr()+start,substring);
-return found?found-getPtr():-1;
-}
-
-int SString::indexOf(const SString & substring,int start) const
-{
-const char *found=strstr(getPtr()+start,substring.c_str());
-return found?found-getPtr():-1;
-}
-
-bool SString::getNextToken (int& pos,SString &token,char separator) const
-{
-if (pos>=len()) {token=0;return false;}
-int p1=pos,p2;
-const char *t1=getPtr()+pos;
-const char *t2=strchr(t1,separator);
-if (t2) pos=(p2=(t2-getPtr()))+1; else p2=pos=len();
-strncpy(token.directWrite(p2-p1),t1,p2-p1);
-token.endWrite(p2-p1);
-return true;
+int SString::indexOf(int character, int start) const
+{
+	const char *found = strchr(getPtr() + start, character);
+	return found ? found - getPtr() : -1;
+}
+
+int SString::indexOf(const char *substring, int start) const
+{
+	const char *found = strstr(getPtr() + start, substring);
+	return found ? found - getPtr() : -1;
+}
+
+int SString::indexOf(const SString & substring, int start) const
+{
+	const char *found = strstr(getPtr() + start, substring.c_str());
+	return found ? found - getPtr() : -1;
+}
+
+bool SString::getNextToken(int& pos, SString &token, char separator) const
+{
+	if (pos >= len()) { token = 0; return false; }
+	int p1 = pos, p2;
+	const char *t1 = getPtr() + pos;
+	const char *t2 = strchr(t1, separator);
+	if (t2) pos = (p2 = (t2 - getPtr())) + 1; else p2 = pos = len();
+	strncpy(token.directWrite(p2 - p1), t1, p2 - p1);
+	token.endWrite(p2 - p1);
+	return true;
 }
 
 bool SString::startsWith(const char *pattern) const
 {
-const char *t=this->c_str();
-for (;*pattern;pattern++,t++)
-	if (*t != *pattern) return false;
-return true;
+	const char *t = this->c_str();
+	for (; *pattern; pattern++, t++)
+		if (*t != *pattern) return false;
+	return true;
 }
 
 SString SString::valueOf(int i)
 {
-return SString::sprintf("%d",i);
+	return SString::sprintf("%d", i);
 }
 SString SString::valueOf(long i)
 {
-return SString::sprintf("%d",i);
+	return SString::sprintf("%d", i);
 }
 SString SString::valueOf(double d)
 {
-SString tmp=SString::sprintf("%.15g",d);
-if ((!strchr(tmp.c_str(),'.'))&&(!strchr(tmp.c_str(),'e'))) tmp+=".0";
-return tmp;
+	SString tmp = SString::sprintf("%.15g", d);
+	if ((!strchr(tmp.c_str(), '.')) && (!strchr(tmp.c_str(), 'e'))) tmp += ".0";
+	return tmp;
 }
 SString SString::valueOf(const SString& s)
 {
-return s;
+	return s;
 }
 
 SString SString::sprintf(const char* format, ...)
 {
-int n, size = 30;
-va_list ap;
-
-SString ret;
+	int n, size = 30;
+	va_list ap;
+
+	SString ret;
 
 #ifdef USE_VSCPRINTF
-va_start(ap, format);
-size=_vscprintf(format, ap);
-va_end(ap);
+	va_start(ap, format);
+	size = _vscprintf(format, ap);
+	va_end(ap);
 #endif
 
-while (1)
+	while (1)
 	{
-	char* p=ret.directWrite(size);
-	assert(p!=NULL);
-	size=ret.directMaxLen()+1;
-	/* Try to print in the allocated space. */
-	va_start(ap, format);
-	n = vsnprintf(p, size, format, ap);
-	va_end(ap);
-	/* If that worked, return the string. */
-	if (n > -1 && n < size)
+		char* p = ret.directWrite(size);
+		assert(p != NULL);
+		size = ret.directMaxLen() + 1;
+		/* Try to print in the allocated space. */
+		va_start(ap, format);
+		n = vsnprintf(p, size, format, ap);
+		va_end(ap);
+		/* If that worked, return the string. */
+		if (n > -1 && n < size)
 		{
-		ret.endWrite(n);
-		return ret;
+			ret.endWrite(n);
+			return ret;
 		}
-	/* Else try again with more space. */
+		/* Else try again with more space. */
 #ifdef VSNPRINTF_RETURNS_REQUIRED_SIZE
-	if (n > -1)    /* glibc 2.1 */
-		size = n; /* precisely what is needed */
-	else           /* glibc 2.0 */
+		if (n > -1)    /* glibc 2.1 */
+			size = n; /* precisely what is needed */
+		else           /* glibc 2.0 */
 #endif
-		size *= 2;  /* twice the old size */
+			size *= 2;  /* twice the old size */
 	}
 }
@@ -273,5 +273,5 @@
 SString &SString::empty()
 {
-static SString empty;
-return empty;
-}
+	static SString empty;
+	return empty;
+}
Index: cpp/frams/util/sstring-simple.h
===================================================================
--- cpp/frams/util/sstring-simple.h	(revision 786)
+++ cpp/frams/util/sstring-simple.h	(revision 793)
@@ -13,133 +13,133 @@
 {
 private:
-char *txt;      ///< string buffer or NULL for empty string
-int size;       ///< allocated memory (including \0)
-int used;	///< string length
-int appending;  ///< append mode, changes can occur after character # 'appending'
+	char *txt;      ///< string buffer or NULL for empty string
+	int size;       ///< allocated memory (including \0)
+	int used;	///< string length
+	int appending;  ///< append mode, changes can occur after character # 'appending'
 
-void initEmpty();
-void copyFrom(SString &from); ///< copy from SString
-void resize(int newsize);
-void ensureSize(int needed);
-const char* getPtr() const {return txt?txt:"";}
+	void initEmpty();
+	void copyFrom(SString &from); ///< copy from SString
+	void resize(int newsize);
+	void ensureSize(int needed);
+	const char* getPtr() const { return txt ? txt : ""; }
 
 public:
-SString(); ///< make an empty string
-SString(const char*t,int t_len=-1); ///< make a string from char*
-SString(int x); ///< string with initial buffer allocated for x characters
-SString(const SString& from); ///< duplicate string
-SString(SString&& from);///< move
-~SString();
+	SString(); ///< make an empty string
+	SString(const char*t, int t_len = -1); ///< make a string from char*
+	SString(int x); ///< string with initial buffer allocated for x characters
+	SString(const SString& from); ///< duplicate string
+	SString(SString&& from);///< move
+	~SString();
 
-void copyFrom(const char* ch, int chlen=-1); ///< copy string, length of -1 == unknown
+	void copyFrom(const char* ch, int chlen = -1); ///< copy string, length of -1 == unknown
 
-void* operator new(size_t s, void* mem) {return mem;}
+	void* operator new(size_t s, void* mem){ return mem; }
 #ifdef _MSC_VER
-void operator delete(void* mem, void* t) {}
+		void operator delete(void* mem, void* t) {}
 #endif
-void* operator new(size_t s) {return malloc(sizeof(SString));}
-void operator delete(void* mem) {free(mem);}
+	void* operator new(size_t s){ return malloc(sizeof(SString)); }
+	void operator delete(void* mem) { free(mem); }
 
-int len() const {return used;} ///< get string length
-void shrink(); ///< free unnecessary buffer
+	int len() const { return used; } ///< get string length
+	void shrink(); ///< free unnecessary buffer
 
-/// after this call, you can modify sstring directly.
-/// returned value is the pointer to the internal buffer.
-/// <B>ensuresize</B> is minimal value of bytes you need,
-/// the buffer will be resized as needed.
-/// all "direct" operations have to leave the buffer with trailing '\0'
-/// at the end. endWrite() will search for this value in order to determine
-/// new string length.
-/// <P>Sample:<CODE>
-/// SString t;
-/// sprintf(t.directWrite(50),"a=%d,b=%f",a,b);
-/// t.endWrite();</CODE>
-char *directWrite(int ensuresize=-1);
-//char *directWrite();
-/// like directWrite, but it returns the pointer to the first char after current string
-/// for easy appending. <B>maxappend</B> is minimum of character in buffer
-/// that can be appended after this call.
-/// <P>Sample:<CODE>
-/// SString t;
-/// sprintf(t.directAppend(10),"c=%d",c);
-/// t.endAppend();</CODE>
-char *directAppend(int maxappend=0);
-/// update string length, after directWrite.
-/// you don't have to to call endWrite after directWrite if the string's length doesn't change.
-/// optional <B>newlength</B> parameter gives a chance to further optimize
-/// this operation if you know exact length of resulting string.
-/// <P>Sample:<CODE>
-/// SString t("samplestring");
-/// strncpy(t.directWrite(50),src,bytecount);
-/// t.endWrite(bytecount);</CODE>
-void endWrite(int newlength=-1);
-/// update string length, after directAppend.
-/// you will usually need to call endAppend (or endWrite) after directAppend,
-/// because the purpose of directAppend is to change string's length.
-/// optional <B>appendlength</B> parameter gives a chance to further optimize
-/// this operation if you know exact length of the appended string.
-/// <P>Sample:<CODE>
-/// SString t("samplestring");
-/// strncpy(t.directAppend(50),src,bytecount);
-/// t.endAppend(bytecount);</CODE>
-void endAppend(int appendlength=-1);
+	/// after this call, you can modify sstring directly.
+	/// returned value is the pointer to the internal buffer.
+	/// <B>ensuresize</B> is minimal value of bytes you need,
+	/// the buffer will be resized as needed.
+	/// all "direct" operations have to leave the buffer with trailing '\0'
+	/// at the end. endWrite() will search for this value in order to determine
+	/// new string length.
+	/// <P>Sample:<CODE>
+	/// SString t;
+	/// sprintf(t.directWrite(50),"a=%d,b=%f",a,b);
+	/// t.endWrite();</CODE>
+	char *directWrite(int ensuresize = -1);
+	//char *directWrite();
+	/// like directWrite, but it returns the pointer to the first char after current string
+	/// for easy appending. <B>maxappend</B> is minimum of character in buffer
+	/// that can be appended after this call.
+	/// <P>Sample:<CODE>
+	/// SString t;
+	/// sprintf(t.directAppend(10),"c=%d",c);
+	/// t.endAppend();</CODE>
+	char *directAppend(int maxappend = 0);
+	/// update string length, after directWrite.
+	/// you don't have to to call endWrite after directWrite if the string's length doesn't change.
+	/// optional <B>newlength</B> parameter gives a chance to further optimize
+	/// this operation if you know exact length of resulting string.
+	/// <P>Sample:<CODE>
+	/// SString t("samplestring");
+	/// strncpy(t.directWrite(50),src,bytecount);
+	/// t.endWrite(bytecount);</CODE>
+	void endWrite(int newlength = -1);
+	/// update string length, after directAppend.
+	/// you will usually need to call endAppend (or endWrite) after directAppend,
+	/// because the purpose of directAppend is to change string's length.
+	/// optional <B>appendlength</B> parameter gives a chance to further optimize
+	/// this operation if you know exact length of the appended string.
+	/// <P>Sample:<CODE>
+	/// SString t("samplestring");
+	/// strncpy(t.directAppend(50),src,bytecount);
+	/// t.endAppend(bytecount);</CODE>
+	void endAppend(int appendlength = -1);
 
-void memoryHint(int howbig) {ensureSize(howbig);}
-int directMaxLen() {return size-1;} ///< when called after directWrite: max number of characters allowed (can be more than requested)
+	void memoryHint(int howbig) { ensureSize(howbig); }
+	int directMaxLen() { return size - 1; } ///< when called after directWrite: max number of characters allowed (can be more than requested)
 
-/// find a character in SString.
-/// return index if the character was found or -1 otherwise.
-int indexOf(int character,int start=0) const;
+	/// find a character in SString.
+	/// return index if the character was found or -1 otherwise.
+	int indexOf(int character, int start = 0) const;
 
-/// find a substring.
-/// return index if the substring was found or -1 otherwise.
-int indexOf(const char *substring,int start=0) const;
+	/// find a substring.
+	/// return index if the substring was found or -1 otherwise.
+	int indexOf(const char *substring, int start = 0) const;
 
-/// find a substring.
-/// return index if the substring was found or -1 otherwise.
-int indexOf(const SString & substring,int start=0) const;
+	/// find a substring.
+	/// return index if the substring was found or -1 otherwise.
+	int indexOf(const SString & substring, int start = 0) const;
 
-const char* c_str() const {return getPtr();} ///< get SString's readonly buffer
-void operator=(const char*t); ///< assign from const char*
-void operator=(const SString &s);
+	const char* c_str() const { return getPtr(); } ///< get SString's readonly buffer
+	void operator=(const char*t); ///< assign from const char*
+	void operator=(const SString &s);
 
-void append(const char *t,int n);
-SString operator+(const SString &s) const;
-void operator+=(int x); ///< append x spaces after current string
-void operator+=(const char*); ///< append char* contents
-void operator+=(const SString&); ///< append other SString
+	void append(const char *t, int n);
+	SString operator+(const SString &s) const;
+	void operator+=(int x); ///< append x spaces after current string
+	void operator+=(const char*); ///< append char* contents
+	void operator+=(const SString&); ///< append other SString
 
-bool equals(const SString &s) const; ///< TRUE if equal
-bool operator==(const SString &s) const {return equals(s);} ///< TRUE if equal
-bool operator!=(const SString &s) const {return !equals(s);} ///< TRUE if not equal
-bool operator<(const SString &s) const {return strcmp(getPtr(),s.getPtr())<1;}
-const char* operator()(int p) const {return getPtr()+p;} ///< pointer to p'th character in SString
-char operator[](int i) const {return getPtr()[i];} ///< get char like in array
+	bool equals(const SString &s) const; ///< TRUE if equal
+	bool operator==(const SString &s) const { return equals(s); } ///< TRUE if equal
+	bool operator!=(const SString &s) const { return !equals(s); } ///< TRUE if not equal
+	bool operator<(const SString &s) const { return strcmp(getPtr(), s.getPtr()) < 1; }
+	const char* operator()(int p) const { return getPtr() + p; } ///< pointer to p'th character in SString
+	char operator[](int i) const { return getPtr()[i]; } ///< get char like in array
 
-/// return a substring of the current string
-SString substr(int begin, int length=1<<30) const;
+	/// return a substring of the current string
+	SString substr(int begin, int length = 1 << 30) const;
 
-/// simple tokenization:
-/// starting at <B>pos</B>, get next substring delimited by <B>separator</B> character
-/// and put it in output parameter <B>token</B>.
-/// <B>pos</B> is moved accordingly.
-/// returns <B>false</B> if no more tokens are available or <B>true</B> otherwise.
-bool getNextToken(int& pos,SString &token,char separator) const;
+	/// simple tokenization:
+	/// starting at <B>pos</B>, get next substring delimited by <B>separator</B> character
+	/// and put it in output parameter <B>token</B>.
+	/// <B>pos</B> is moved accordingly.
+	/// returns <B>false</B> if no more tokens are available or <B>true</B> otherwise.
+	bool getNextToken(int& pos, SString &token, char separator) const;
 
-void operator+=(char ch) {directAppend(1)[0]=ch;endAppend(1);} ///< append single character
+	void operator+=(char ch) { directAppend(1)[0] = ch; endAppend(1); } ///< append single character
 
-bool startsWith(const char *pattern) const;
-char charAt(int pos) const {return operator[](pos);}
-uint32_t hash() const;
+	bool startsWith(const char *pattern) const;
+	char charAt(int pos) const { return operator[](pos); }
+	uint32_t hash() const;
 
-static SString valueOf(int);
-static SString valueOf(long);
-static SString valueOf(double);
-static SString valueOf(const SString&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString valueOf(const ExtValue&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString valueOf(const ExtObject&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString sprintf(const char* format, ...);
+	static SString valueOf(int);
+	static SString valueOf(long);
+	static SString valueOf(double);
+	static SString valueOf(const SString&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString valueOf(const ExtValue&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString valueOf(const ExtObject&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString sprintf(const char* format, ...);
 
-static SString &empty();
+	static SString &empty();
 };
 
Index: cpp/frams/util/sstring.cpp
===================================================================
--- cpp/frams/util/sstring.cpp	(revision 786)
+++ cpp/frams/util/sstring.cpp	(revision 793)
@@ -26,5 +26,5 @@
 #ifdef MULTITHREADED
 #include <pthread.h>
-static pthread_mutex_t sstring_ref_lock=PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t sstring_ref_lock = PTHREAD_MUTEX_INITIALIZER;
 #define REF_LOCK pthread_mutex_lock(&sstring_ref_lock);
 #define REF_UNLOCK pthread_mutex_unlock(&sstring_ref_lock)
@@ -36,173 +36,173 @@
 static int guessMemSize(int request)
 {
-return request+min(request/2,10000)+8;
+	return request + min(request / 2, 10000) + 8;
 }
 
 SBuf::SBuf()
 {
-txt=(char*)"";
-size=used=0;
-refcount=1;
+	txt = (char*)"";
+	size = used = 0;
+	refcount = 1;
 }
 
 SBuf::SBuf(int initsize)
 {
-size=guessMemSize(initsize);
-if (size>0)	{ txt=(char*)malloc(size+1); txt[0]=0; }
-	else	txt=(char*)"";
-used=0;
-refcount=1;
+	size = guessMemSize(initsize);
+	if (size > 0)	{ txt = (char*)malloc(size + 1); txt[0] = 0; }
+	else	txt = (char*)"";
+	used = 0;
+	refcount = 1;
 }
 
 SBuf::~SBuf()
 {
-freeBuf();
+	freeBuf();
 }
 
 void SBuf::initEmpty()
 {
-txt=(char*)"";
-used=size=0;
-refcount=1;
+	txt = (char*)"";
+	used = size = 0;
+	refcount = 1;
 }
 
 void SBuf::freeBuf()
 {
-if (!size) return;
-free(txt); used=0;
-}
-
-void SBuf::copyFrom(const char *ch,int chlen)
-{
-if (chlen==-1) chlen=strlen(ch);
-if (chlen>0)
-{
-if (chlen<size)
+	if (!size) return;
+	free(txt); used = 0;
+}
+
+void SBuf::copyFrom(const char *ch, int chlen)
+{
+	if (chlen == -1) chlen = strlen(ch);
+	if (chlen > 0)
 	{
-	memmove(txt,ch,chlen);
-	}
-else
+		if (chlen < size)
+		{
+			memmove(txt, ch, chlen);
+		}
+		else
+		{
+			size = guessMemSize(chlen);
+			char *newtxt = (char*)malloc(size + 1);
+			memcpy(newtxt, ch, chlen);
+			free(txt);
+			txt = newtxt;
+		}
+	}
+	txt[chlen] = 0;
+	used = chlen;
+}
+
+void SBuf::append(const char *ch, int chlen)
+{ // doesn't check anything!
+	memmove(txt + used, ch, chlen);
+	used += chlen;
+	txt[used] = 0;
+}
+
+void SBuf::ensureSize(int needed)
+{
+	if (size >= needed) return;
+	needed = guessMemSize(needed);
+	txt = (char*)realloc(txt, needed + 1);
+	size = needed;
+}
+
+/////////////////////////////////////////////
+
+SString::SString()
+{
+	initEmpty();
+}
+
+SString::~SString()
+{
+	REF_LOCK;
+	detach();
+	REF_UNLOCK;
+}
+
+SString::SString(int x)
+{
+	buf = new SBuf(x);
+}
+
+SString::SString(const char *t, int t_len)
+{
+	initEmpty();
+	if (!t) return;
+	copyFrom(t, t_len);
+}
+
+SString::SString(SString&& from)
+{
+	buf = from.buf;
+	from.buf = &SBuf::empty();
+}
+
+SString::SString(const SString &from)
+{
+	if (from.buf == &SBuf::empty())
+		buf = &SBuf::empty();
+	else
 	{
-	size=guessMemSize(chlen);
-	char *newtxt=(char*)malloc(size+1);
-	memcpy(newtxt,ch,chlen);
-	free(txt);
-	txt=newtxt;
-	}
-}
-txt[chlen]=0;
-used=chlen;
-}
-
-void SBuf::append(const char *ch,int chlen)
-{ // doesn't check anything!
-memmove(txt+used,ch,chlen);
-used+=chlen;
-txt[used]=0;
-}
-
-void SBuf::ensureSize(int needed)
-{
-if (size>=needed) return;
-needed=guessMemSize(needed);
-txt=(char*)realloc(txt,needed+1);
-size=needed;
-}
-
-/////////////////////////////////////////////
-
-SString::SString()
-{
-initEmpty();
-}
-
-SString::~SString()
-{
-REF_LOCK;
-detach();
-REF_UNLOCK;
-}
-
-SString::SString(int x)
-{
-buf=new SBuf(x);
-}
-
-SString::SString(const char *t,int t_len)
-{
-initEmpty();
-if (!t) return;
-copyFrom(t,t_len);
-}
-
-SString::SString(SString&& from)
-{
-buf=from.buf;
-from.buf=&SBuf::empty();
-}
-
-SString::SString(const SString &from)
-{
-if (from.buf==&SBuf::empty())
-	buf=&SBuf::empty();
-else
+		REF_LOCK;
+		buf = from.buf;
+		if (buf->size)
+			buf->refcount++;
+		REF_UNLOCK;
+	}
+}
+
+void SString::initEmpty()
+{
+	buf = &SBuf::empty();
+}
+
+void SString::memoryHint(int howbig)
+{
+	detachCopy(howbig);
+}
+
+void SString::detachEmpty(int ensuresize)
+{
+	if (buf == &SBuf::empty()) { buf = new SBuf(ensuresize); return; }
+	if (buf->refcount < 2) buf->ensureSize(ensuresize);
+	else
 	{
-	REF_LOCK;
-	buf=from.buf;
-	if (buf->size)
-		buf->refcount++;
-	REF_UNLOCK;
-	}
-}
-
-void SString::initEmpty()
-{
-buf=&SBuf::empty();
-}
-
-void SString::memoryHint(int howbig)
-{
-detachCopy(howbig);
-}
-	
-void SString::detachEmpty(int ensuresize)
-{
-if (buf==&SBuf::empty()) { buf=new SBuf(ensuresize); return; }
-if (buf->refcount<2) buf->ensureSize(ensuresize);
-else
+		buf->refcount--;
+		buf = new SBuf(ensuresize);
+	}
+}
+
+void SString::detach()
+{
+	if (buf == &SBuf::empty()) return;
+	if (!--buf->refcount) delete buf;
+}
+
+void SString::detachCopy(int ensuresize)
+{
+	if (buf == &SBuf::empty()) { buf = new SBuf(ensuresize); return; }
+	if (buf->refcount < 2)
 	{
+		buf->ensureSize(ensuresize);
+		return;
+	}
 	buf->refcount--;
-	buf=new SBuf(ensuresize);
-	}
-}
-
-void SString::detach()
-{
-if (buf==&SBuf::empty()) return;
-if (!--buf->refcount) delete buf;
-}
-
-void SString::detachCopy(int ensuresize)
-{
-if (buf==&SBuf::empty()) { buf=new SBuf(ensuresize); return; }
-if (buf->refcount<2)
-	{
-	buf->ensureSize(ensuresize);
-	return;
-	}
-buf->refcount--;
-SBuf *newbuf=new SBuf(ensuresize);
-newbuf->copyFrom(buf->txt,min(ensuresize,buf->used));
-buf=newbuf;
+	SBuf *newbuf = new SBuf(ensuresize);
+	newbuf->copyFrom(buf->txt, min(ensuresize, buf->used));
+	buf = newbuf;
 }
 
 char *SString::directWrite(int ensuresize)
 {
-if (ensuresize<0) ensuresize=len();
-REF_LOCK;
-detachCopy(ensuresize);
-REF_UNLOCK;
-appending=buf->used;
-return buf->txt;
+	if (ensuresize < 0) ensuresize = len();
+	REF_LOCK;
+	detachCopy(ensuresize);
+	REF_UNLOCK;
+	appending = buf->used;
+	return buf->txt;
 }
 
@@ -215,23 +215,23 @@
 char *SString::directAppend(int maxappend)
 {
-REF_LOCK;
-detachCopy(buf->used+maxappend);
-REF_UNLOCK;
-appending=buf->used;
-return buf->txt+appending;
+	REF_LOCK;
+	detachCopy(buf->used + maxappend);
+	REF_UNLOCK;
+	appending = buf->used;
+	return buf->txt + appending;
 }
 
 void SString::endWrite(int newlength)
 {
-if (newlength<0) newlength=strlen(buf->txt);
-else buf->txt[newlength]=0;
-buf->used=newlength;
+	if (newlength < 0) newlength = strlen(buf->txt);
+	else buf->txt[newlength] = 0;
+	buf->used = newlength;
 }
 
 void SString::endAppend(int newappend)
 {
-if (newappend<0) newappend=strlen(buf->txt+appending);
-else buf->txt[appending+newappend]=0;
-buf->used=appending+newappend;
+	if (newappend < 0) newappend = strlen(buf->txt + appending);
+	else buf->txt[appending + newappend] = 0;
+	buf->used = appending + newappend;
 }
 
@@ -240,57 +240,57 @@
 void SString::operator+=(const char *s)
 {
-if (!s) return;
-int x=strlen(s);
-if (!x) return;
-append(s,x);
-}
-
-void SString::append(const char *txt,int count)
-{
-if (!count) return;
-REF_LOCK;
-detachCopy(buf->used+count);
-REF_UNLOCK;
-buf->append(txt,count);
+	if (!s) return;
+	int x = strlen(s);
+	if (!x) return;
+	append(s, x);
+}
+
+void SString::append(const char *txt, int count)
+{
+	if (!count) return;
+	REF_LOCK;
+	detachCopy(buf->used + count);
+	REF_UNLOCK;
+	buf->append(txt, count);
 }
 
 void SString::operator+=(const SString&s)
 {
-append(s.c_str(),s.len());
+	append(s.c_str(), s.len());
 }
 
 SString SString::operator+(const SString& s) const
 {
-SString ret(*this);
-ret+=s;
-return ret;
+	SString ret(*this);
+	ret += s;
+	return ret;
 }
 
 /////////////////////////////
 
-void SString::copyFrom(const char *ch,int chlen)
-{
-if (!ch) chlen=0;
-else if (chlen<0) chlen=strlen(ch);
-REF_LOCK;
-detachEmpty(chlen);
-REF_UNLOCK;
-memmove(buf->txt,ch,chlen);
-buf->txt[chlen]=0; buf->used=chlen;
+void SString::copyFrom(const char *ch, int chlen)
+{
+	if (!ch) chlen = 0;
+	else if (chlen < 0) chlen = strlen(ch);
+	REF_LOCK;
+	detachEmpty(chlen);
+	REF_UNLOCK;
+	memmove(buf->txt, ch, chlen);
+	buf->txt[chlen] = 0; buf->used = chlen;
 }
 
 void SString::operator=(const char *ch)
 {
-copyFrom(ch);
+	copyFrom(ch);
 }
 
 void SString::operator=(const SString&s)
 {
-if (s.buf==buf) return;
-REF_LOCK;
-detach();
-buf=s.buf;
-if (buf->size) buf->refcount++;
-REF_UNLOCK;
+	if (s.buf == buf) return;
+	REF_LOCK;
+	detach();
+	buf = s.buf;
+	if (buf->size) buf->refcount++;
+	REF_UNLOCK;
 }
 ///////////////////////////////////////
@@ -298,9 +298,9 @@
 SString SString::substr(int begin, int length) const
 {
-if (begin<0) { length+=begin; begin=0; }
-if (length>=(len()-begin)) length=len()-begin;
-if (length<=0) return SString();
-if (length==len()) return *this;
-return SString((*this)(begin),length);
+	if (begin < 0) { length += begin; begin = 0; }
+	if (length >= (len() - begin)) length = len() - begin;
+	if (length <= 0) return SString();
+	if (length == len()) return *this;
+	return SString((*this)(begin), length);
 }
 
@@ -309,72 +309,72 @@
 bool SString::equals(const SString& s) const
 {
-if (s.buf==buf) return true;
-return strcmp(buf->txt,s.buf->txt)==0;
+	if (s.buf == buf) return true;
+	return strcmp(buf->txt, s.buf->txt) == 0;
 }
 
 ///////////////////////////////////////
 
-int SString::indexOf(int character,int start) const
-{
-const char *found=strchr(buf->txt+start,character);
-return found?found-buf->txt:-1;
-}
-
-int SString::indexOf(const char *substring,int start) const
-{
-char *found=strstr(buf->txt+start,substring);
-return found?found-buf->txt:-1;
-}
-
-int SString::indexOf(const SString & substring,int start) const
-{
-char *found=strstr(buf->txt+start,substring.c_str());
-return found?found-buf->txt:-1;
-}
-
-bool SString::getNextToken (int& pos,SString &token,char separator) const
-{
-if (pos>=len()) {token=0;return false;}
-int p1=pos,p2;
-const char *t1=buf->txt+pos;
-const char *t2=strchr(t1,separator);
-if (t2) pos=(p2=(t2-buf->txt))+1; else p2=pos=len();
-strncpy(token.directWrite(p2-p1),t1,p2-p1);
-token.endWrite(p2-p1);
-return true;
+int SString::indexOf(int character, int start) const
+{
+	const char *found = strchr(buf->txt + start, character);
+	return found ? found - buf->txt : -1;
+}
+
+int SString::indexOf(const char *substring, int start) const
+{
+	char *found = strstr(buf->txt + start, substring);
+	return found ? found - buf->txt : -1;
+}
+
+int SString::indexOf(const SString & substring, int start) const
+{
+	char *found = strstr(buf->txt + start, substring.c_str());
+	return found ? found - buf->txt : -1;
+}
+
+bool SString::getNextToken(int& pos, SString &token, char separator) const
+{
+	if (pos >= len()) { token = 0; return false; }
+	int p1 = pos, p2;
+	const char *t1 = buf->txt + pos;
+	const char *t2 = strchr(t1, separator);
+	if (t2) pos = (p2 = (t2 - buf->txt)) + 1; else p2 = pos = len();
+	strncpy(token.directWrite(p2 - p1), t1, p2 - p1);
+	token.endWrite(p2 - p1);
+	return true;
 }
 
 bool SString::startsWith(const char *pattern) const
 {
-const char *t=this->c_str();
-for (;*pattern;pattern++,t++)
-	if (*t != *pattern) return false;
-return true;
+	const char *t = this->c_str();
+	for (; *pattern; pattern++, t++)
+		if (*t != *pattern) return false;
+	return true;
 }
 
 SString SString::valueOf(int i)
 {
-return SString::sprintf("%d",i);
+	return SString::sprintf("%d", i);
 }
 SString SString::valueOf(long i)
 {
-return SString::sprintf("%d",i);
+	return SString::sprintf("%d", i);
 }
 SString SString::valueOf(double d)
 {
-SString tmp=SString::sprintf("%.15g",d);
-if ((!strchr(tmp.c_str(),'.'))&&(!strchr(tmp.c_str(),'e'))) tmp+=".0";
-return tmp;
+	SString tmp = SString::sprintf("%.15g", d);
+	if ((!strchr(tmp.c_str(), '.')) && (!strchr(tmp.c_str(), 'e'))) tmp += ".0";
+	return tmp;
 }
 SString SString::valueOf(const SString& s)
 {
-return s;
+	return s;
 }
 
 #if 0 //testing _vscprintf
 #define USE_VSCPRINTF
-int _vscprintf(const char *format,va_list argptr)
-{
-return vsnprintf("",0,format,argptr);
+int _vscprintf(const char *format, va_list argptr)
+{
+	return vsnprintf("", 0, format, argptr);
 }
 #endif
@@ -382,37 +382,37 @@
 SString SString::sprintf(const char* format, ...)
 {
-int n, size = 30;
-va_list ap;
-
-SString ret;
+	int n, size = 30;
+	va_list ap;
+
+	SString ret;
 
 #ifdef USE_VSCPRINTF
-va_start(ap, format);
-size=_vscprintf(format, ap);
-va_end(ap);
-#endif
-
-while (1)
+	va_start(ap, format);
+	size = _vscprintf(format, ap);
+	va_end(ap);
+#endif
+
+	while (1)
 	{
-	char* p=ret.directWrite(size);
-	assert(p!=NULL);
-	size=ret.directMaxLen()+1;
-	/* Try to print in the allocated space. */
-	va_start(ap, format);
-	n = vsnprintf(p, size, format, ap);
-	va_end(ap);
-	/* If that worked, return the string. */
-	if (n > -1 && n < size)
+		char* p = ret.directWrite(size);
+		assert(p != NULL);
+		size = ret.directMaxLen() + 1;
+		/* Try to print in the allocated space. */
+		va_start(ap, format);
+		n = vsnprintf(p, size, format, ap);
+		va_end(ap);
+		/* If that worked, return the string. */
+		if (n > -1 && n < size)
 		{
-		ret.endWrite(n);
-		return ret;
+			ret.endWrite(n);
+			return ret;
 		}
-	/* Else try again with more space. */
+		/* Else try again with more space. */
 #ifdef VSNPRINTF_RETURNS_REQUIRED_SIZE
-	if (n > -1)    /* glibc 2.1 */
-		size = n; /* precisely what is needed */
-	else           /* glibc 2.0 */
-#endif
-		size *= 2;  /* twice the old size */
+		if (n > -1)    /* glibc 2.1 */
+			size = n; /* precisely what is needed */
+		else           /* glibc 2.0 */
+#endif
+			size *= 2;  /* twice the old size */
 	}
 }
@@ -420,12 +420,12 @@
 SString &SString::empty()
 {
-static SString empty;
-return empty;
+	static SString empty;
+	return empty;
 }
 
 SBuf &SBuf::empty()
 {
-static SBuf empty;
-return empty;
+	static SBuf empty;
+	return empty;
 }
 
@@ -443,23 +443,23 @@
 Fnv32_t fnv_32a_buf(void *buf, size_t len, Fnv32_t hval)
 {
-    unsigned char *bp = (unsigned char *)buf;	/* start of buffer */
-    unsigned char *be = bp + len;		/* beyond end of buffer */
-
-    while (bp < be) {
-
-	/* xor the bottom with the current octet */
-	hval ^= (Fnv32_t)*bp++;
-
-	/* multiply by the 32 bit FNV magic prime mod 2^32 */
+	unsigned char *bp = (unsigned char *)buf;	/* start of buffer */
+	unsigned char *be = bp + len;		/* beyond end of buffer */
+
+	while (bp < be) {
+
+		/* xor the bottom with the current octet */
+		hval ^= (Fnv32_t)*bp++;
+
+		/* multiply by the 32 bit FNV magic prime mod 2^32 */
 #if defined(NO_FNV_GCC_OPTIMIZATION)
-	hval *= FNV_32_PRIME;
+		hval *= FNV_32_PRIME;
 #else
-	hval += (hval<<1) + (hval<<4) + (hval<<7) + (hval<<8) + (hval<<24);
-#endif
-
-    }
-
-    /* return our new hash value */
-    return hval;
+		hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
+#endif
+
+	}
+
+	/* return our new hash value */
+	return hval;
 }
 //////////////////////////////////////////////////
@@ -468,10 +468,10 @@
 uint32_t SString::hash() const
 {
-return fnv_32a_buf(txt,used,FNV1_32A_INIT);
+	return fnv_32a_buf(txt, used, FNV1_32A_INIT);
 }
 #else
 uint32_t SBuf::hash() const
 {
-return fnv_32a_buf(txt,used,FNV1_32A_INIT);
-}
-#endif
+	return fnv_32a_buf(txt, used, FNV1_32A_INIT);
+}
+#endif
Index: cpp/frams/util/sstring.h
===================================================================
--- cpp/frams/util/sstring.h	(revision 786)
+++ cpp/frams/util/sstring.h	(revision 793)
@@ -32,21 +32,21 @@
 class SBuf
 {
-char *txt;
-int used;	///< data size
-int size;	///< buffer size, not including \0, special case: 0==buffer not allocated
-int refcount;	///< buffer is used by 'refcount' objects.
-void initEmpty();
-void ensureSize(int wantsize);
-void copyFrom(const char* ch, int chlen=-1);
-void freeBuf();
-void append(const char* ch, int chlen=-1);
-static SBuf &empty();
-SBuf(int initsize);
-friend class SString;
-SBuf(const SBuf& b) {}
+	char *txt;
+	int used;	///< data size
+	int size;	///< buffer size, not including \0, special case: 0==buffer not allocated
+	int refcount;	///< buffer is used by 'refcount' objects.
+	void initEmpty();
+	void ensureSize(int wantsize);
+	void copyFrom(const char* ch, int chlen = -1);
+	void freeBuf();
+	void append(const char* ch, int chlen = -1);
+	static SBuf &empty();
+	SBuf(int initsize);
+	friend class SString;
+	SBuf(const SBuf& b) {}
 public:
-SBuf();
-~SBuf();
-uint32_t hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
+	SBuf();
+	~SBuf();
+	uint32_t hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
 };
 
@@ -56,136 +56,136 @@
 {
 private:
-SBuf *buf;	///< buffer
-int appending;  ///< append mode, changes can occur after character # 'appending'
-//int memhint;
+	SBuf *buf;	///< buffer
+	int appending;  ///< append mode, changes can occur after character # 'appending'
+	//int memhint;
 
-void initEmpty();
-int guessMemSize(int request);
-void copyFrom(SString &from); ///< copy from SString, reference if possible
-void detach(); ///< detach from shared buffer, if any
-void detachEmpty(int ensuresize=0); ///< detach and make empty
-void detachCopy(int ensuresize=0); ///< detach and make private copy
+	void initEmpty();
+	int guessMemSize(int request);
+	void copyFrom(SString &from); ///< copy from SString, reference if possible
+	void detach(); ///< detach from shared buffer, if any
+	void detachEmpty(int ensuresize = 0); ///< detach and make empty
+	void detachCopy(int ensuresize = 0); ///< detach and make private copy
 
 public:
-SString(); ///< make an empty string
-SString(const char*t,int t_len=-1); ///< make a string from char*
-SString(int x); ///< string with initial buffer size
-SString(const SString& from); ///< duplicate string
-SString(SString&& from); ///< move
-~SString();
+	SString(); ///< make an empty string
+	SString(const char*t, int t_len = -1); ///< make a string from char*
+	SString(int x); ///< string with initial buffer size
+	SString(const SString& from); ///< duplicate string
+	SString(SString&& from); ///< move
+	~SString();
 
-void copyFrom(const char* ch, int chlen=-1); ///< copy string, length of -1 == unknown
+	void copyFrom(const char* ch, int chlen = -1); ///< copy string, length of -1 == unknown
 
-void* operator new(size_t s, void* mem) {return mem;}
+	void* operator new(size_t s, void* mem){ return mem; }
 #ifdef _MSC_VER
-void operator delete(void* mem, void* t) {}
+		void operator delete(void* mem, void* t) {}
 #endif
-void* operator new(size_t s) {return malloc(sizeof(SString));}
-void operator delete(void* mem) {free(mem);}
+	void* operator new(size_t s){ return malloc(sizeof(SString)); }
+	void operator delete(void* mem) { free(mem); }
 
-int len() const {return buf->used;} ///< get string length
-void shrink(); ///< free unnecessary buffer
+	int len() const { return buf->used; } ///< get string length
+	void shrink(); ///< free unnecessary buffer
 
-/// after this call, you can modify sstring directly.
-/// returned value is the pointer to the internal buffer.
-/// <B>ensuresize</B> is minimal value of bytes you need,
-/// the buffer will be resized as needed.
-/// all "direct" operations have to leave the buffer with trailing '\0'
-/// at the end. endWrite() will search for this value in order to determine
-/// new string length.
-/// <P>Sample:<CODE>
-/// SString t;
-/// sprintf(t.directWrite(50),"a=%d,b=%f",a,b);
-/// t.endWrite();</CODE>
-char *directWrite(int ensuresize=-1);
-//char *directWrite();
-/// like directWrite, but it returns the pointer to the first char after current string
-/// for easy appending. <B>maxappend</B> is minimum of character in buffer
-/// that can be appended after this call.
-/// <P>Sample:<CODE>
-/// SString t;
-/// sprintf(t.directAppend(10),"c=%d",c);
-/// t.endAppend();</CODE>
-char *directAppend(int maxappend=0);
-/// update string length, after directWrite.
-/// you don't have to to call endWrite after directWrite if the string's length doesn't change.
-/// optional <B>newlength</B> parameter gives a chance to further optimize
-/// this operation if you know exact length of resulting string.
-/// <P>Sample:<CODE>
-/// SString t("samplestring");
-/// strncpy(t.directWrite(50),src,bytecount);
-/// t.endWrite(bytecount);</CODE>
-void endWrite(int newlength=-1);
-/// update string length, after directAppend.
-/// you will usually need to call endAppend (or endWrite) after directAppend,
-/// because the purpose of directAppend is to change string's length.
-/// optional <B>appendlength</B> parameter gives a chance to further optimize
-/// this operation if you know exact length of the appended string.
-/// <P>Sample:<CODE>
-/// SString t("samplestring");
-/// strncpy(t.directAppend(50),src,bytecount);
-/// t.endAppend(bytecount);</CODE>
-void endAppend(int appendlength=-1);
-/// argument is the amount of memory, that will be probably used
-/// by this string instance. string can use this value
-/// to optimize memory allocation (bigger chunks will be allocated).
-void memoryHint(int howbig);
-int directMaxLen() {return buf->size;} ///< when called after directWrite: max number of characters allowed (can be more than requested)
+	/// after this call, you can modify sstring directly.
+	/// returned value is the pointer to the internal buffer.
+	/// <B>ensuresize</B> is minimal value of bytes you need,
+	/// the buffer will be resized as needed.
+	/// all "direct" operations have to leave the buffer with trailing '\0'
+	/// at the end. endWrite() will search for this value in order to determine
+	/// new string length.
+	/// <P>Sample:<CODE>
+	/// SString t;
+	/// sprintf(t.directWrite(50),"a=%d,b=%f",a,b);
+	/// t.endWrite();</CODE>
+	char *directWrite(int ensuresize = -1);
+	//char *directWrite();
+	/// like directWrite, but it returns the pointer to the first char after current string
+	/// for easy appending. <B>maxappend</B> is minimum of character in buffer
+	/// that can be appended after this call.
+	/// <P>Sample:<CODE>
+	/// SString t;
+	/// sprintf(t.directAppend(10),"c=%d",c);
+	/// t.endAppend();</CODE>
+	char *directAppend(int maxappend = 0);
+	/// update string length, after directWrite.
+	/// you don't have to to call endWrite after directWrite if the string's length doesn't change.
+	/// optional <B>newlength</B> parameter gives a chance to further optimize
+	/// this operation if you know exact length of resulting string.
+	/// <P>Sample:<CODE>
+	/// SString t("samplestring");
+	/// strncpy(t.directWrite(50),src,bytecount);
+	/// t.endWrite(bytecount);</CODE>
+	void endWrite(int newlength = -1);
+	/// update string length, after directAppend.
+	/// you will usually need to call endAppend (or endWrite) after directAppend,
+	/// because the purpose of directAppend is to change string's length.
+	/// optional <B>appendlength</B> parameter gives a chance to further optimize
+	/// this operation if you know exact length of the appended string.
+	/// <P>Sample:<CODE>
+	/// SString t("samplestring");
+	/// strncpy(t.directAppend(50),src,bytecount);
+	/// t.endAppend(bytecount);</CODE>
+	void endAppend(int appendlength = -1);
+	/// argument is the amount of memory, that will be probably used
+	/// by this string instance. string can use this value
+	/// to optimize memory allocation (bigger chunks will be allocated).
+	void memoryHint(int howbig);
+	int directMaxLen() { return buf->size; } ///< when called after directWrite: max number of characters allowed (can be more than requested)
 
-/// find a character in SString.
-/// return index if the character was found or -1 otherwise.
-int indexOf(int character,int start=0) const;
+	/// find a character in SString.
+	/// return index if the character was found or -1 otherwise.
+	int indexOf(int character, int start = 0) const;
 
-/// find a substring.
-/// return index if the substring was found or -1 otherwise.
-int indexOf(const char *substring,int start=0) const;
+	/// find a substring.
+	/// return index if the substring was found or -1 otherwise.
+	int indexOf(const char *substring, int start = 0) const;
 
-/// find a substring.
-/// return index if the substring was found or -1 otherwise.
-int indexOf(const SString & substring,int start=0) const;
+	/// find a substring.
+	/// return index if the substring was found or -1 otherwise.
+	int indexOf(const SString & substring, int start = 0) const;
 
-const char* c_str() const {return buf->txt;} ///< get SString's readonly buffer
-//operator char*() {detachCopy(len()); return buf->txt;} ///< get SString's writable buffer
-void operator=(const char*t); ///< assign from const char*
-//void operator=(int x) {free(txt);nowy(x);} ///< clear string and make new empty one
-void operator=(const SString &s);
+	const char* c_str() const { return buf->txt; } ///< get SString's readonly buffer
+	//operator char*() {detachCopy(len()); return buf->txt;} ///< get SString's writable buffer
+	void operator=(const char*t); ///< assign from const char*
+	//void operator=(int x) {free(txt);nowy(x);} ///< clear string and make new empty one
+	void operator=(const SString &s);
 
-void append(const char *txt,int count);
-SString operator+(const SString &s) const;
-void operator+=(int x); ///< append x spaces after current string
-void operator+=(const char*); ///< append char* contents
-void operator+=(const SString&); ///< append other SString
+	void append(const char *txt, int count);
+	SString operator+(const SString &s) const;
+	void operator+=(int x); ///< append x spaces after current string
+	void operator+=(const char*); ///< append char* contents
+	void operator+=(const SString&); ///< append other SString
 
-bool equals(const SString &s) const; ///< TRUE if equal
-bool operator==(const SString &s) const {return equals(s);} ///< TRUE if equal
-bool operator!=(const SString &s) const {return !equals(s);}
-const char* operator()(int p) const {return buf->txt+p;} ///< pointer to p'th character in SString
-char operator[](int i) const {return buf->txt[i];} ///< get char like in array
+	bool equals(const SString &s) const; ///< TRUE if equal
+	bool operator==(const SString &s) const { return equals(s); } ///< TRUE if equal
+	bool operator!=(const SString &s) const { return !equals(s); }
+	const char* operator()(int p) const { return buf->txt + p; } ///< pointer to p'th character in SString
+	char operator[](int i) const { return buf->txt[i]; } ///< get char like in array
 
-/// return a substring of the current string
-SString substr(int begin, int length=1<<30) const;
+	/// return a substring of the current string
+	SString substr(int begin, int length = 1 << 30) const;
 
-/// simple tokenization:
-/// starting at <B>pos</B>, get next substring delimited by <B>separator</B> character
-/// and put it in output parameter <B>token</B>.
-/// <B>pos</B> is moved accordingly.
-/// returns <B>false</B> if no more tokens are available or <B>true</B> otherwise.
-bool getNextToken(int& pos,SString &token,char separator) const;
+	/// simple tokenization:
+	/// starting at <B>pos</B>, get next substring delimited by <B>separator</B> character
+	/// and put it in output parameter <B>token</B>.
+	/// <B>pos</B> is moved accordingly.
+	/// returns <B>false</B> if no more tokens are available or <B>true</B> otherwise.
+	bool getNextToken(int& pos, SString &token, char separator) const;
 
-void operator+=(char ch) {directAppend(1)[0]=ch;endAppend(1);} ///< append single character
+	void operator+=(char ch) { directAppend(1)[0] = ch; endAppend(1); } ///< append single character
 
-bool startsWith(const char *pattern) const;
-char charAt(int pos) const {return buf->txt[pos];}
-uint32_t hash() const {return buf->hash();}
+	bool startsWith(const char *pattern) const;
+	char charAt(int pos) const { return buf->txt[pos]; }
+	uint32_t hash() const { return buf->hash(); }
 
-static SString valueOf(int);
-static SString valueOf(long);
-static SString valueOf(double);
-static SString valueOf(const SString&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString valueOf(const ExtValue&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString valueOf(const ExtObject&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
-static SString sprintf(const char* format, ...);
+	static SString valueOf(int);
+	static SString valueOf(long);
+	static SString valueOf(double);
+	static SString valueOf(const SString&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString valueOf(const ExtValue&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString valueOf(const ExtObject&); //tylko do kompletu zeby mozna uzyc tej funkcji nie martwiac sie o typ argumentu
+	static SString sprintf(const char* format, ...);
 
-static SString &empty();
+	static SString &empty();
 };
 
Index: cpp/frams/util/usertags.h
===================================================================
--- cpp/frams/util/usertags.h	(revision 786)
+++ cpp/frams/util/usertags.h	(revision 793)
@@ -41,31 +41,30 @@
  */
 
-template<class ID,class T,int N> class UserTags
+template<class ID, class T, int N> class UserTags
 {
-static char reg[N];
-T data[N];
-  public:
-UserTags() {memset(data,0,sizeof(data));}
+	static char reg[N];
+	T data[N];
+public:
+	UserTags() { memset(data, 0, sizeof(data)); }
 
-/** allocate new id */
-static int newID() 
-	{ for(int i=1;i<N;i++) if (!reg[i]) {reg[i]=1; return i;}
-	DB(printf("Warning: UserTags run out of ids!\n"));
-	  return 0; }
-static void freeID(int id) 
-	{ reg[id]=0; }
-T& operator[](int id)
+	/** allocate new id */
+	static int newID()
 	{
-	DB(if (!id) printf("Warning: UserTags @ %p is using id=0\n",this);)
-	return data[id]; 
+		for (int i = 1; i < N; i++) if (!reg[i]) { reg[i] = 1; return i; }
+		DB(printf("Warning: UserTags run out of ids!\n"));
+		return 0;
 	}
-operator T() { return data[0]; }
-void operator=(T x) { data[0]=x; }
+	static void freeID(int id)
+	{
+		reg[id] = 0;
+	}
+	T& operator[](int id)
+	{
+		DB(if (!id) printf("Warning: UserTags @ %p is using id=0\n", this);)
+			return data[id];
+	}
+	operator T() { return data[0]; }
+	void operator=(T x) { data[0] = x; }
 };
 
 #endif
-
-
-
-
-
Index: cpp/frams/util/validitychecks.cpp
===================================================================
--- cpp/frams/util/validitychecks.cpp	(revision 786)
+++ cpp/frams/util/validitychecks.cpp	(revision 793)
@@ -7,28 +7,28 @@
 #include <common/log.h>
 
-bool listIndexCheck(SList* list,int index,const char* msgobj,const char* msgfun)
+bool listIndexCheck(SList* list, int index, const char* msgobj, const char* msgfun)
 {
-	int size=list->size();
-if ((index<0)||(index>=size))
+	int size = list->size();
+	if ((index < 0) || (index >= size))
 	{
-	if (size>0) 
-		logPrintf(msgobj,msgfun,LOG_ERROR,"Invalid index %d (allowed range is 0..%d)",index,size-1);
-	else
-		logPrintf(msgobj,msgfun,LOG_ERROR,"Invalid index %d (this list is empty)",index);
-	return false;
+		if (size>0)
+			logPrintf(msgobj, msgfun, LOG_ERROR, "Invalid index %d (allowed range is 0..%d)", index, size - 1);
+		else
+			logPrintf(msgobj, msgfun, LOG_ERROR, "Invalid index %d (this list is empty)", index);
+		return false;
 	}
-return true;
+	return true;
 }
 
-SString stringCheck(SString& in,const char* msgobj,const char* msgfun,const char* msg,SString (*checker)(const SString& in))
+SString stringCheck(SString& in, const char* msgobj, const char* msgfun, const char* msg, SString(*checker)(const SString& in))
 {
-if (!checker)
-	checker=trim;
-SString corrected=checker(in);
-if (corrected!=in)
+	if (!checker)
+		checker = trim;
+	SString corrected = checker(in);
+	if (corrected != in)
 	{
-	SString msg2=SString(msg)+": \"%s\" (adjusted to \"%s\")";
-	logPrintf(msgobj,msgfun,LOG_WARN,msg2.c_str(),in.c_str(),corrected.c_str());
+		SString msg2 = SString(msg) + ": \"%s\" (adjusted to \"%s\")";
+		logPrintf(msgobj, msgfun, LOG_WARN, msg2.c_str(), in.c_str(), corrected.c_str());
 	}
-return corrected;
+	return corrected;
 }
Index: cpp/frams/util/validitychecks.h
===================================================================
--- cpp/frams/util/validitychecks.h	(revision 786)
+++ cpp/frams/util/validitychecks.h	(revision 793)
@@ -9,6 +9,6 @@
 #include <frams/util/sstring.h>
 
-bool listIndexCheck(SList* list,int index,const char* msgobj,const char* msgfun);
-SString stringCheck(SString& in,const char* msgobj,const char* msgfun,const char* msg,SString (*checker)(const SString& in)=NULL);
+bool listIndexCheck(SList* list, int index, const char* msgobj, const char* msgfun);
+SString stringCheck(SString& in, const char* msgobj, const char* msgfun, const char* msg, SString(*checker)(const SString& in) = NULL);
 
 #endif
