--- parser3/src/main/pa_common.C 2001/04/09 09:48:20 1.41 +++ parser3/src/main/pa_common.C 2001/04/10 07:40:50 1.43 @@ -6,7 +6,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_common.C,v 1.41 2001/04/09 09:48:20 paf Exp $ + $Id: pa_common.C,v 1.43 2001/04/10 07:40:50 paf Exp $ */ #include "pa_config_includes.h" @@ -142,6 +142,9 @@ void file_delete(Pool& pool, const Strin bool file_readable(const String& file_spec) { return access(file_spec.cstr(String::UL_FILE_NAME), R_OK)==0; } +bool file_executable(const String& file_spec) { + return access(file_spec.cstr(String::UL_FILE_NAME), X_OK)==0; +} char *getrow(char **row_ref, char delim) { char *result=*row_ref; @@ -299,6 +302,14 @@ void back_slashes_to_slashes(char *s) { if(*s=='\\') *s='/'; } +/* +void slashes_to_back_slashes(char *s) { + if(s) + for(; *s; s++) + if(*s=='/') + *s='\\'; +} +*/ #endif bool StrEqNc(const char *s1, const char *s2, bool strict) {