into a dedicated module. This also has the advantage that it's
harder to break code by accidentally forgetting to call
InitSemaphore() after having allocated the memory for it.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14853 87f5fb63-7c3d-0410-a384-fd976d0f7a62
routine. We no longer allocate memory and then modify it, but
call a function for each quoted parameter which does whatever is
necessary.
- The shell command parameter parser now considers the non-breaking
space character (ISO code 160) to be a blank space character, too.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14851 87f5fb63-7c3d-0410-a384-fd976d0f7a62
contributed by Peter Bengtsson. Thank you very much!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14848 87f5fb63-7c3d-0410-a384-fd976d0f7a62
are now defined as empty macros unless __THREAD_SAFE is defined.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14847 87f5fb63-7c3d-0410-a384-fd976d0f7a62
support and the thread-safety.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14846 87f5fb63-7c3d-0410-a384-fd976d0f7a62
absolute Amiga path names passed to it and will use them without
changing them.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14845 87f5fb63-7c3d-0410-a384-fd976d0f7a62
Both the library and the user code need to be rebuilt with the
preprocessor symbol __THREAD_SAFE defined to get thread-safe
code.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14843 87f5fb63-7c3d-0410-a384-fd976d0f7a62
and dirent data operations. That should do it! While the library is
not reentrant (this is not ixemul.library) it should be thread-safe
now. Thread-safe in the sense of POSIX 1003.1c-1995.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14842 87f5fb63-7c3d-0410-a384-fd976d0f7a62
and ftrylockfile().
- Modified the internal FILE structure to allow for thread locking.
Note that this again requires that the library is rebuilt!
- Added or modified macros for getc_unlocked(), getchar_unlocked(),
putc_unlocked() and putchar_unlocked().
- Added rand_r().
- Added flockfile()/funlockfile() wrappers around all stdio
functions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14841 87f5fb63-7c3d-0410-a384-fd976d0f7a62
checks while wildcard patterns are expanded in the the command line.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14840 87f5fb63-7c3d-0410-a384-fd976d0f7a62
parameters (which is by default linked in with libunix.a),
regular expressions can no longer prompt dos.library requesters
to appear. However, to be on the safe side, if you are expecting
to pass regular expressions on the command line, do not use
the wildcard expansion code such as by overriding the library
symbols with dummy functions such as are used in the file
"stdlib_wildcard_expand.c".
- Added a new variable '__open_locale' which can be used to
restrict all library functions to use the "C" language locale
rather than the current system locale settings. In addition
to that, two new functions __locale_exit() and __locale_init()
can be used to close and (re-)open the system locale at a
later time.
- Local ("static") functions are now identified by the STATIC
qualifier. This was done in preparation for changes that will
deal with global and local data and the issue of thread safety.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14839 87f5fb63-7c3d-0410-a384-fd976d0f7a62
function pointers alone. The utility.library/CallHookPkt mechanism
is no longer required.
- Moved the entire lseek() code relevant for files into the hook
function.
- Simplified the close() function which now just calls into the
hook code to perform whatever is necessary. The hook code is
responsible for cleaning up after aliases, etc. This change in
turn made it possible to greatly simplify the hook code for
buffered files which now bypasses close/read/write/lseek and
directly invokes the hook code for unbuffered files.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14835 87f5fb63-7c3d-0410-a384-fd976d0f7a62
Also, the file descriptor duplication code no longer uses a goto to
deliver its result.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14834 87f5fb63-7c3d-0410-a384-fd976d0f7a62
the file descriptor hook and into the respective functions,
such as dup2(), fchmod(), fchown(), fcntl(), fdatasync(), fstatfs(),
fsync(), ftruncate() and lseek(). Code which is not strictly
required will no longer find its way into your programs if you
link with the updated library.
NOTE: these changes require that the entire library is rebuilt!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14833 87f5fb63-7c3d-0410-a384-fd976d0f7a62
"" rather than ":".
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14832 87f5fb63-7c3d-0410-a384-fd976d0f7a62
translate patterns such as "foo/bar/../../baz" properly, and to
use strlen() less.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14831 87f5fb63-7c3d-0410-a384-fd976d0f7a62
<inttypes.h> header files contributed by Peter Bengtsson. Thank
you very much!
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14827 87f5fb63-7c3d-0410-a384-fd976d0f7a62
handler. The side-effects were too varied and irritating after all.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14826 87f5fb63-7c3d-0410-a384-fd976d0f7a62
code which initialized them.
- Reading/changing the errno variable is no longer done directly, but
involves accessor functions.
- References to the HUGE_VAL quantity now involve an accessor function, too.
- Changed the manner in which the __huge_val constant is initialized by
the __math_init() function.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14824 87f5fb63-7c3d-0410-a384-fd976d0f7a62
code. Also, the contents of the AnchorPath structure are no longer
modified between calls. MatchEnd() has to be sufficient.
- Moved redundant code out of the readdir()/opendir()/closedir()
functions which is not required unless the code is built for
Unix compatibility mode.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14823 87f5fb63-7c3d-0410-a384-fd976d0f7a62
code. Also, the contents of the AnchorPath structure are no longer
modified between calls. MatchEnd() has to be sufficient.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14822 87f5fb63-7c3d-0410-a384-fd976d0f7a62
modified unless the library is built with the "CHECK_FOR_NULL_POINTERS"
option.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14821 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Moved the date/time conversion test code around in "test.c".
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14820 87f5fb63-7c3d-0410-a384-fd976d0f7a62
"long long" data type are no longer prototyped if the library is built
for SAS/C.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14819 87f5fb63-7c3d-0410-a384-fd976d0f7a62
- Simplified the code in time_asctime_r.c which builds the time
string. It gracefully handles buffer sizes which are too short
by returning an empty string.
- Moved the tm->tm_wday initialization out of the hook function
in time_strftime.c since it was to be called only once anyway.
- Lost a few compiler warnings in unistd_time_delay.c and
time_gettimeofday.c.
- Folded duplicate code in time_mktime.c; also, errno is no longer
modified unless the library is built with the CHECK_FOR_NULL_POINTERS
option.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14818 87f5fb63-7c3d-0410-a384-fd976d0f7a62
so far as used by the the __convert_time() function and the conversion
code in strftime().
- Also changed the algorithm used by strftime() to produce the week numbers
(the '%U' and '%W' format specifiers). The new method is much simpler
than the old one.
- Made the code that converts a 'time_t' value into the 'struct DateStamp',
as used by strftime() and utime(), into its own function. This also
fixes a bug in the code strftime() would use which was completely
unaware of the local time zone settings.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14815 87f5fb63-7c3d-0410-a384-fd976d0f7a62
strftime() and asctime_r(). This one isn't sensitive to the effects of
adding/subtracting the local time zone.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14813 87f5fb63-7c3d-0410-a384-fd976d0f7a62
time, into the number of seconds since January 1st, 1970, relative to
UTC. This didn't really work up until now since the time value returned
was given as local time.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14810 87f5fb63-7c3d-0410-a384-fd976d0f7a62
function.
- The fall-back function for converting time into a string in strftime()
now calls itself for the "%x" and "%X" format specifiers.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14809 87f5fb63-7c3d-0410-a384-fd976d0f7a62
check against 0 that used to be in there.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14807 87f5fb63-7c3d-0410-a384-fd976d0f7a62
from Workbench would open and stay open. This was not intended to
happen and is a side-effect of the new stdio initialization code which
checks if the stdio streams are in non-blocking mode. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14806 87f5fb63-7c3d-0410-a384-fd976d0f7a62
the OS4 header files, but not of the older header file distributions.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14804 87f5fb63-7c3d-0410-a384-fd976d0f7a62
have. This only worked for files which were closed anyway, but not
for the stdio streams. Fixed.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14803 87f5fb63-7c3d-0410-a384-fd976d0f7a62