--- parser3/src/main/pa_common.C 2001/09/14 15:41:59 1.64 +++ parser3/src/main/pa_common.C 2001/10/08 09:04:08 1.69 @@ -2,10 +2,10 @@ Parser: commonly functions. Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: pa_common.C,v 1.69 2001/10/08 09:04:08 parser Exp $ */ -static const char *RCSId="$Id: pa_common.C,v 1.64 2001/09/14 15:41:59 parser Exp $"; #include "pa_common.h" #include "pa_types.h" @@ -203,6 +203,12 @@ bool file_readable(const String& file_sp bool dir_readable(const String& file_spec) { return entry_readable(file_spec, true); } +String *file_readable(const String& path, const String& name) { + String *result=new(path.pool()) String(path); + *result << "/"; + *result << name; + return file_readable(*result)?result:0; +} bool file_executable(const String& file_spec) { return access(file_spec.cstr(String::UL_FILE_SPEC), X_OK)==0; } @@ -476,3 +482,11 @@ int getMonthDays(int year, int month) { }; return monthDays[month]; } + +void remove_crlf(char *start, char *end) { + for(char *p=start; p