--- parser3/src/include/pa_common.h 2003/07/24 11:31:21 1.93 +++ parser3/src/include/pa_common.h 2003/11/20 16:34:24 1.97 @@ -8,13 +8,13 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char* IDENT_COMMON_H="$Date: 2003/07/24 11:31:21 $"; +static const char * const IDENT_COMMON_H="$Date: 2003/11/20 16:34:24 $"; #include "pa_string.h" #include "pa_hash.h" class Value; -typedef Hash HashStringValue; +typedef Hash HashStringValue; // replace system s*nprintf with our versions #undef vsnprintf @@ -56,9 +56,6 @@ inline long lseek( int handle, long offs #endif -/// yields to OS for secs secs and usecs milliseconds -int pa_sleep(unsigned long secs, unsigned long usecs); - /** under WIN32 "t" mode fixes DOS chars OK, can't say that about other systems/ line break styles */ @@ -67,6 +64,11 @@ void fix_line_breaks( size_t& length///< may change! used to speedup next actions ); +int pa_lock_shared_blocking(int fd); +int pa_lock_exclusive_blocking(int fd); +int pa_lock_exclusive_nonblocking(int fd); +int pa_unlock(int fd); + typedef void (*File_read_action)( struct stat& finfo, int f, @@ -149,7 +151,7 @@ void file_write( delete specified file throws an exception in case of problems */ -bool file_delete(const String& file_spec, bool fail_on_read_problem=true); +bool file_delete(const String& file_spec, bool fail_on_problem=true); /** move specified file throws an exception in case of problems