--- parser3/src/main/pa_common.C 2001/03/23 13:08:10 1.22 +++ parser3/src/main/pa_common.C 2001/03/24 11:33:26 1.26 @@ -1,3 +1,4 @@ + /** @file Parser: commonly functions. @@ -5,7 +6,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_common.C,v 1.22 2001/03/23 13:08:10 paf Exp $ + $Id: pa_common.C,v 1.26 2001/03/24 11:33:26 paf Exp $ */ #include "pa_config_includes.h" @@ -126,9 +127,9 @@ char *getrow(char **row_ref, char delim) return result; } -char *lsplit(char *string_ref, char delim) { - if(string_ref) { - char *v=strchr(string_ref, delim); +char *lsplit(char *string, char delim) { + if(string) { + char *v=strchr(string, delim); if(v) { *v=0; return v+1; @@ -245,9 +246,18 @@ const String& attributed_meaning_to_stri if(Value *value=static_cast(hash->get(*value_name))) result.append(value->as_string(), String::UL_HEADER, true); - hash->foreach(append_attribute_subattribute, &result); + hash->for_each(append_attribute_subattribute, &result); } else // result value result.append(meaning.as_string(), String::UL_HEADER, true); return result; -} \ No newline at end of file +} + +#ifdef WIN32 +void back_slashes_to_slashes(char *s) { + if(s) + for(; *s; s++) + if(*s=='\\') + *s='/'; +} +#endif