--- parser3/src/include/pa_common.h 2001/09/14 15:41:59 1.48 +++ parser3/src/include/pa_common.h 2001/10/24 16:33:02 1.55 @@ -2,10 +2,9 @@ Parser: commonly used functions. Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_common.h,v 1.48 2001/09/14 15:41:59 parser Exp $ + $Id: pa_common.h,v 1.55 2001/10/24 16:33:02 parser Exp $ */ #ifndef PA_COMMON_H @@ -69,6 +68,11 @@ int __snprintf(char *, size_t, const cha #endif +/** under WIN32 "t" mode fixes DOS chars OK, + can't say that about other systems/ line break styles +*/ +void fix_line_breaks(char *src, size_t& size); + /** read specified text file using pool, if fail_on_read_problem is true[default] throws an exception @@ -110,6 +114,7 @@ void file_move(Pool& pool, const String& bool file_readable(const String& file_spec); bool dir_readable(const String& file_spec); +String *file_readable(const String& path, const String& name); bool file_executable(const String& file_spec); bool file_stat(const String& file_spec, @@ -138,7 +143,7 @@ inline int min(int a,int b){ return a @@ -159,9 +164,10 @@ void back_slashes_to_slashes(char *s); #endif bool StrEqNc(const char *s1, const char *s2, bool strict=true); -char *unquote(char*& current, char stop_at); #define SECS_PER_DAY (60*60*24) int getMonthDays(int year, int month); +void remove_crlf(char *start, char *end); + #endif