Mail Archives: djgpp-workers/1997/10/15/17:38:35
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Attached are the .txh diffs. Some sugar.
Randy Maas
randym AT acm DOT org
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="_close-txh.dif"
diff -c src\libc\dos\io\_close.txh _close.txh
*** \local\src\libc\dos\io\_close.txh Sun Aug 31 13:11:58 1997
--- \local\ginsu\diffs\_close.txh Wed Oct 15 16:19:24 1997
***************
*** 4,10
@example
#include <io.h>
! int _close(int fd);
@end example
@subheading Description
--- 4,10 -----
@example
#include <io.h>
! int _close(int handle)
@end example
@subheading Description
***************
*** 9,18
@subheading Description
! This is a direct connection to the MS-DOS close function call, int
! 0x21, %ah = 0x3e. This function can be hooked by the
! @xref{File System Extensions}. If you don't want this, you should
! use @xref{_dos_close}.
@subheading Return Value
--- 9,17 -----
@subheading Description
! This close a previous opened file handle. This procedure will
! redirect the "close" operation to the file system extension that
! opened it, or to MSDOS otherwise.
@subheading Return Value
***************
*** 16,19
@subheading Return Value
! Zero if the file was closed, else nonzero.
--- 15,18 -----
@subheading Return Value
! Zero if the file was closed, else nonzero.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="_creat-txh.dif"
diff -c src\libc\dos\io\_creat.txh _creat.txh
*** \local\src\libc\dos\io\_creat.txh Sun Aug 31 13:12:00 1997
--- \local\ginsu\diffs\_creat.txh Wed Oct 15 16:19:22 1997
***************
*** 4,10
@example
#include <io.h>
! int _creat(const char *path, int attrib);
@end example
@subheading Description
--- 4,10 -----
@example
#include <io.h>
! int _creat(const char* path, int attrib)
@end example
@subheading Description
***************
*** 9,18
@subheading Description
! This is a direct connection to the MS-DOS creat function call, int
! 0x21, %ah = 0x3c. The file is set to binary mode. This function can
! be hooked by the @xref{File System Extensions}. If you don't want this
! you should use @xref{_dos_creat} or @xref{_dos_creatnew}.
@subheading Return Value
--- 9,15 -----
@subheading Description
! This function has the File System Extension create the named file.
@subheading Return Value
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="_open-txh.dif"
diff -c src\libc\dos\io\_open.txh _open.txh
*** \local\src\libc\dos\io\_open.txh Sun Aug 31 13:12:00 1997
--- \local\ginsu\diffs\_open.txh Wed Oct 15 16:19:22 1997
***************
*** 4,10
@example
#include <io.h>
! int _open(const char *path, int attrib);
@end example
@subheading Description
--- 4,10 -----
@example
#include <io.h>
! int _open(const char* filename, int attrib)
@end example
@subheading Description
***************
*** 8,18
@end example
@subheading Description
!
! This is a direct connection to the MS-DOS open function call, int
! 0x21, %ah = 0x3d. The file is set to binary mode. This function
! can be hooked by the @xref{File System Extensions}. If don't want
! this you should use @xref{_dos_open}.
@subheading Return Value
--- 8,15 -----
@end example
@subheading Description
! This is a standard interface into File Extension. It will find the
! proper extension to open the specified file name.
@subheading Return Value
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="_read-txh.dif"
diff -c src\libc\dos\io\_read.txh _read.txh
*** \local\src\libc\dos\io\_read.txh Sun Aug 31 13:12:00 1997
--- \local\ginsu\diffs\_read.txh Wed Oct 15 16:19:24 1997
***************
*** 4,10
@example
#include <io.h>
! ssize_t _read(int fildes, void *buf, size_t nbyte);
@end example
@subheading Description
--- 4,10 -----
@example
#include <io.h>
! ssize_t _read(int handle, void* buf, size_t nbytes)
@end example
@subheading Description
***************
*** 9,19
@subheading Description
! This is a direct connection to the MS-DOS read function call, int
! 0x21, %ah = 0x3f. No conversion is done on the data; it is read as
! raw binary data. This function can be hooked by the
! @xref{File System Extensions}. If you don't want this, you should
! use @xref{_dos_read}.
@subheading Return Value
--- 9,18 -----
@subheading Description
! This function reads from the file associated with @var{handle}.
! If the handle is associated with a file system extension, that
! extension will be responsible for emulating the "read" functionality.
! Otherwise, MSDOS will be called.
@subheading Return Value
***************
*** 17,21
@subheading Return Value
! The number of bytes read.
!
--- 16,19 -----
@subheading Return Value
! The number of bytes read, or -1 on error.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="_write-txh.dif"
diff -c src\libc\dos\io\_write.txh _write.txh
*** \local\src\libc\dos\io\_write.txh Sun Aug 31 13:12:00 1997
--- \local\ginsu\diffs\_write.txh Wed Oct 15 16:19:24 1997
***************
*** 4,10
@example
#include <io.h>
! ssize_t _write(int fildes, void *buf, size_t nbyte);
@end example
@subheading Description
--- 4,10 -----
@example
#include <io.h>
! ssize_t _write(int handle, const void* buf, size_t nbytes)
@end example
@subheading Description
***************
*** 9,19
@subheading Description
! This is a direct connection to the MS-DOS write function call, int
! 0x21, %ah = 0x40. No conversion is done on the data; it is written as
! raw binary data. This function can be hooked by the
! @xref{File System Extensions}. If you don't want this, you should use
! @xref{_dos_write}.
@subheading Return Value
--- 9,18 -----
@subheading Description
! This function writes to the file associated with @var{handle}.
! If the handle is associated with a file system extension, that
! extension will be responsible for emulating the "write" functionality.
! Otherwise, MSDOS will be called.
@subheading Return Value
***************
*** 17,21
@subheading Return Value
! The number of bytes written.
!
--- 16,19 -----
@subheading Return Value
! The number of bytes written, or -1 on error.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="dup2-txh.dif"
diff -c src\libc\posix\unistd\dup2.txh dup2.txh
*** \local\src\libc\posix\unistd\dup2.txh Mon Jul 10 01:40:46 1995
--- \local\ginsu\diffs\dup2.txh Wed Oct 15 16:19:24 1997
***************
*** 1,6
@node dup2, io
@subheading Syntax
-
@example
#include <unistd.h>
--- 1,5 -----
@node dup2, io
@subheading Syntax
@example
#include <unistd.h>
***************
*** 2,8
@subheading Syntax
@example
- #include <unistd.h>
int dup2(int existing_handle, int new_handle);
@end example
--- 1,6 -----
@node dup2, io
@subheading Syntax
@example
#include <unistd.h>
int dup2(int existing_handle, int new_handle)
***************
*** 4,10
@example
#include <unistd.h>
! int dup2(int existing_handle, int new_handle);
@end example
@subheading Description
--- 2,9 -----
@subheading Syntax
@example
! #include <unistd.h>
! int dup2(int existing_handle, int new_handle)
@end example
@subheading Description
***************
*** 8,14
@end example
@subheading Description
-
This call causes @var{new_handle} to refer to the same file and file
pointer as @var{existing_handle}. If @var{new_handle} is an open file,
it is closed.
--- 7,12 -----
@end example
@subheading Description
This call causes @var{new_handle} to refer to the same file and file
pointer as @var{existing_handle}. If @var{new_handle} is an open file,
it is closed. This works for both MSDOS files and @xref{file system
***************
*** 11,17
This call causes @var{new_handle} to refer to the same file and file
pointer as @var{existing_handle}. If @var{new_handle} is an open file,
! it is closed.
@subheading Return Value
--- 9,16 -----
@subheading Description
This call causes @var{new_handle} to refer to the same file and file
pointer as @var{existing_handle}. If @var{new_handle} is an open file,
! it is closed. This works for both MSDOS files and @xref{file system
! extension} files
@subheading Return Value
***************
*** 18,24
The new handle, or -1 on error.
@subheading Example
-
@example
/* copy new file to stdin stream */
close(0);
--- 17,22 -----
The new handle, or -1 on error.
@subheading Example
@example
/* copy new file to stdin stream */
close(0);
***************
*** 25,28
dup2(new_stdin, 0);
close(new_stdin);
@end example
-
--- 23,25 -----
dup2(new_stdin, 0);
close(new_stdin);
@end example
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="fse_open-txh.dif"
diff -c src\libc\fsext\fse_open.txh fse_open.txh
*** \local\src\libc\fsext\fse_open.txh Thu Sep 19 22:37:20 1996
--- \local\ginsu\diffs\fse_open.txh Wed Oct 15 16:19:22 1997
***************
*** 4,10
@example
#include <sys/fsext.h>
! int __FSEXT_add_open_handler(__FSEXT_Function *_function);
@end example
@subheading Description
--- 4,10 -----
@example
#include <sys/fsext.h>
! int __FSEXT_add_open_handler(__FSEXT_Function *_function)
@end example
@subheading Description
***************
*** 27,33
__FSEXT_add_open_handler(_my_handler);
@}
! @end example
@c ----------------------------------------------------------------------
@node __FSEXT_call_open_handlers, file system
--- 27,33 -----
__FSEXT_add_open_handler(_my_handler);
@}
! @end example
@subheading Return Value
***************
*** 29,35
@end example
! @c ----------------------------------------------------------------------
@node __FSEXT_call_open_handlers, file system
@subheading Syntax
--- 29,39 -----
@end example
! @subheading Return Value
!
! Returns 0 if the extension was added, 1 otherwise.
!
!
@node __FSEXT_call_open_handlers, file system
@subheading Syntax
***************
*** 37,43
#include <sys/fsext.h>
int __FSEXT_call_open_handlers(__FSEXT_Fnumber _function_number,
! int *rv, va_list _args);
@end example
@subheading Description
--- 41,47 -----
#include <sys/fsext.h>
int __FSEXT_call_open_handlers(__FSEXT_Fnumber _function_number,
! int *rv, va_list _args)
@end example
@subheading Description
***************
*** 44,47
This function is part of the @ref{File System Extensions}. It is used
internally to libc.a to allow extensions to get an opportunity to
! override the @code{_open} and @code{_creat} functions.
--- 48,55 -----
This function is part of the @ref{File System Extensions}. It is used
internally to libc.a to allow extensions to get an opportunity to
! override the @code{_open}, @code{_creat}, @code{_copy} functions.
!
! @subheading Return Value
! Returns true (1) if an extension handled the request, false (0)
! otherwise. @var{errno} is set if no extension handled the request.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="fsext-txh.dif"
diff -c src\libc\fsext\fsext.txh fsext.txh
*** \local\src\libc\fsext\fsext.txh Sun Aug 31 16:39:52 1997
--- \local\ginsu\diffs\fsext.txh Wed Oct 15 16:19:22 1997
***************
*** 15,21
@example
int function(__FSEXT_Fnumber func_number, int *rv, va_list args);
! @end example
The @var{func_number} identifies which function is to be emulated.
The file @code{<sys/fsext.h>} defines the function numbers as follows:
--- 15,21 -----
@example
int function(__FSEXT_Fnumber func_number, int *rv, va_list args);
! @end example
The @var{func_number} identifies which function is to be emulated.
The file @code{<sys/fsext.h>} defines the function numbers as follows:
***************
*** 23,29
@table @code
@item __FSEXT_nop
! A no-op. This is currently unused by the library functions.
@item __FSEXT_open
--- 23,31 -----
@table @code
@item __FSEXT_nop
! A no-op. This is currently unused by the library functions, except
! the function @code{_nop} (@pxref(_nop}). It may be used to provide
! execution time to the file system extension.
@item __FSEXT_open
***************
*** 44,50
A write handler. Called to write data to a ``file''.
On ``text'' files it receives the ORIGINAL (unconverted) buffer.
! @item __FSEXT_read
A ready handler. It is called by @code{select} library function
(@pxref{select}) when it needs to know whether a handle used to
--- 46,52 -----
A write handler. Called to write data to a ``file''.
On ``text'' files it receives the ORIGINAL (unconverted) buffer.
! @item __FSEXT_ready
A ready handler. It is called by @code{select} library function
(@pxref{select}) when it needs to know whether a handle used to
***************
*** 72,78
A close handler. Called when the ``file'' should be closed.
! @end table
@var{rv} points to a temporary return value pointer. If the function is
--- 74,81 -----
A close handler. Called when the ``file'' should be closed.
! @item __FSEXT_fcntl
! A file fcntl handler.
@item __FSEXT_ioctl
A file ioctl handler.
***************
*** 74,79
@end table
@var{rv} points to a temporary return value pointer. If the function is
emulated by the handler, the return value should be stored here, and the
--- 77,84 -----
@item __FSEXT_fcntl
A file fcntl handler.
+ @item __FSEXT_ioctl
+ A file ioctl handler.
@item __FSEXT_lseek
A file lseek handler (@pxref{lseek}).
***************
*** 75,80
@end table
@var{rv} points to a temporary return value pointer. If the function is
emulated by the handler, the return value should be stored here, and the
handler should return a nonzero value. If the handler returns zero, it is
--- 80,109 -----
@item __FSEXT_ioctl
A file ioctl handler.
+ @item __FSEXT_lseek
+ A file lseek handler (@pxref{lseek}).
+
+ @item __FSEXT_link
+ A file link handler (@pxref{link}). This is most relevant to
+ file system extensions that emulate a directory structure.
+
+ @item __FSEXT_unlink
+
+ A file unlink handler (@pxref{unlink}). This is most relevant to
+ file system extensions that emulate a directory structure.
+
+ @item __FSEXT_copy
+
+ A file copy handler (@pxref{_copy}. This is called when you would
+ like to copy a file from one location to another (possibly local)
+ location. This is also called on your behalf if link() fails. This
+ is most relevant to file system extensions that emulate a directory
+ structure.
+
+ @item __FSEXT_dup2
+
+ @end table
+
@var{rv} points to a temporary return value pointer. If the function is
emulated by the handler, the return value should be stored here, and the
handler should return a nonzero value. If the handler returns zero, it is
***************
*** 110,116
@end itemize
! @c ----------------------------------------------------------------------
@node __FSEXT_alloc_fd, file system
@subheading Syntax
--- 139,145 -----
@end itemize
!
@node __FSEXT_alloc_fd, file system
@subheading Syntax
***************
*** 117,123
@example
#include <sys/fsext.h>
! int __FSEXT_alloc_fd(__FSEXT_Function *_function);
@end example
@subheading Description
--- 146,152 -----
@example
#include <sys/fsext.h>
! int __FSEXT_alloc_fd(__FSEXT_Function *_function, void* state)
@end example
@subheading Description
***************
*** 124,131
This function is part of the @ref{File System Extensions}. It is used
by extensions that fully emulate the I/O functions, and thus don't
! have a corresponding DOS file handle. This function opens DOS's
! @samp{NUL} device, so as to allocate a handle that DOS won't then reuse.
It also assigns the handler function for that descriptor.
The module is responsible for calling @code{_close} on the descriptor
--- 153,160 -----
This function is part of the @ref{File System Extensions}. It is used
by extensions that fully emulate the I/O functions, and thus don't
! have a corresponding DOS file handle. It calls _DOS_alloc_fd
! (@ref{_DOS_alloc_fd}) to allocate a handle that DOS won't reuse.
It also assigns the handler function for that descriptor.
The module is responsible for calling @code{_close} on the descriptor
***************
*** 138,144
int socket()
@{
! int fd = __FSEXT_alloc_fd(socket_handler);
init_socket(fd);
return fd;
@}
--- 167,173 -----
int socket()
@{
! int fd = __FSEXT_alloc_fd(socket_handler, NULL);
init_socket(fd);
return fd;
@}
***************
*** 142,148
init_socket(fd);
return fd;
@}
! @end example
@c ----------------------------------------------------------------------
--- 171,177 -----
init_socket(fd);
return fd;
@}
! @end example
***************
*** 145,151
@end example
! @c ----------------------------------------------------------------------
@node __FSEXT_set_function, file system
@subheading Syntax
--- 174,180 -----
@end example
!
@node __FSEXT_set_function, file system
@subheading Syntax
***************
*** 152,158
@example
#include <sys/fsext.h>
! int __FSEXT_set_function(int _fd, __FSEXT_Function *_function);
@end example
@subheading Description
--- 181,187 -----
@example
#include <sys/fsext.h>
! int __FSEXT_set_function(int _fd, __FSEXT_Function *_function, void* state)
@end example
@subheading Description
***************
*** 161,167
to set the handler function for those extensions that use DOS files
for I/O. One situation where you might need this is when you must catch
output to the terminal and play some tricks with it, like colorize it or
! redirect it to another device.
@subheading Return Value
--- 190,197 -----
to set the handler function for those extensions that use DOS files
for I/O. One situation where you might need this is when you must catch
output to the terminal and play some tricks with it, like colorize it or
! redirect it to another device. The @var{state} is an optional pointer
! to the handlers specific data for the file descriptor.
@subheading Return Value
***************
*** 202,208
static void __attribute__((constructor))
install_screen_write_handler (void)
@{
! __FSEXT_set_function (fileno (stdout), my_screen_write);
@}
@end example
--- 232,238 -----
static void __attribute__((constructor))
install_screen_write_handler (void)
@{
! __FSEXT_set_function (fileno (stdout), my_screen_write, NULL);
@}
@end example
***************
*** 205,211
__FSEXT_set_function (fileno (stdout), my_screen_write);
@}
! @end example
@c ----------------------------------------------------------------------
--- 235,241 -----
__FSEXT_set_function (fileno (stdout), my_screen_write, NULL);
@}
! @end example
@subheading See Also
@xref{__FSEXT_get_handler}
***************
*** 207,212
@end example
@c ----------------------------------------------------------------------
@node __FSEXT_get_function, file system
--- 237,244 -----
@end example
+ @subheading See Also
+ @xref{__FSEXT_get_handler}
@node __FSEXT_get_function, file system
***************
*** 208,214
@end example
! @c ----------------------------------------------------------------------
@node __FSEXT_get_function, file system
@subheading Syntax
--- 240,246 -----
@subheading See Also
@xref{__FSEXT_get_handler}
!
@node __FSEXT_get_function, file system
@subheading Syntax
***************
*** 210,215
@c ----------------------------------------------------------------------
@node __FSEXT_get_function, file system
@subheading Syntax
@example
--- 242,248 -----
@node __FSEXT_get_function, file system
+
@subheading Syntax
@example
***************
*** 215,221
@example
#include <sys/fsext.h>
! __FSEXT_Function *__FSEXT_get_function(int _fd);
@end example
This function is part of the @ref{File System Extensions}. It is used
--- 248,254 -----
@example
#include <sys/fsext.h>
! __FSEXT_Function * __FSEXT_get_function(int _fd)
@end example
@subheading Description
***************
*** 218,223
__FSEXT_Function *__FSEXT_get_function(int _fd);
@end example
This function is part of the @ref{File System Extensions}. It is used
internal to libc.a to redirect I/O requests to the appropriate
extensions.
--- 251,257 -----
__FSEXT_Function * __FSEXT_get_function(int _fd)
@end example
+ @subheading Description
This function is part of the @ref{File System Extensions}. It is used
internal to libc.a to redirect I/O requests to the appropriate
extensions.
***************
*** 223,229
extensions.
@subheading Example
-
@example
_read(int fd, void *buf, int len)
@{
--- 257,262 -----
extensions.
@subheading Example
@example
_read(int fd, void *buf, int len)
@{
***************
*** 231,238
if (func)
@{
int rv;
! if (func(__FSEXT_read, &rv, &fd))
! return rv;
@}
/* rest of read() */
@}
--- 264,270 -----
if (func)
@{
int rv;
! if (func(__FSEXT_read, &rv, &fd, NULL)) return rv;
@}
/* rest of read() */
@}
***************
*** 237,239
/* rest of read() */
@}
@end example
--- 269,317 -----
/* rest of read() */
@}
@end example
+
+ @node __FSEXT_get_handler, file system
+ @subheading Syntax
+ @example
+ #include <sys/fsext.h>
+
+ int __FSEXT_get_handler(int _fd, __FSEXT_Function** func, void** state)
+ @end example
+ @subheading Example
+ @example
+ _read(int fd, void *buf, int len)
+ @{
+ void* state;
+ __FSEXT_Function *func;
+
+ if (__FSEXT_get_handler(fd, &func, &state) && func)
+ @{
+ int rv;
+ if (func(__FSEXT_read, &rv, &fd, state)) return rv;
+ @}
+ /* rest of read() */
+ @}
+ @end example
+
+ @subheading Description
+ This function is part of the @ref{File System Extensions}. It is used
+ internal to libc.a to redirect I/O requests to the appropriate
+ extensions.
+
+ @subheading Return Value
+ 1 if the file descriptor has a handler associated with it, 0 otherwise.
+
+
+ @node __FSEXT_close_all, file system
+ @subheading Syntax
+ @example
+
+ void __FSEXT_close_all (void)
+ @end example
+ @subheading Description
+ @code{__FSEXT_close_all} closes all of the currently open handles.
+ This should be called during a programs exit phase, after libc has
+ @code{fclose}'d all of the files it has opened. The reason for this
+ is that not every operating system will close a handle (e.g. file
+ descriptor or socket handle) after a program has exit. This can
+ eventually cause the system to run out of handles until it reboots.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="link-txh.dif"
diff -c src\libc\posix\unistd\link.txh link.txh
*** \local\src\libc\posix\unistd\link.txh Mon Jul 10 01:40:48 1995
--- \local\ginsu\diffs\link.txh Wed Oct 15 16:19:26 1997
***************
*** 2,8
@subheading Syntax
@example
! #include <unistd.h>
int link(const char *exists, const char *new);
@end example
--- 2,8 -----
@subheading Syntax
@example
! #include <unistd.h> // For read(), write(), etc.
int link(const char *exists, const char *new)
***************
*** 4,11
@example
#include <unistd.h>
! int link(const char *exists, const char *new);
! @end example
@subheading Description
--- 4,10 -----
@example
#include <unistd.h> // For read(), write(), etc.
! int link(const char *exists, const char *new)
@end example
@subheading Description
***************
*** 7,12
int link(const char *exists, const char *new);
@end example
@subheading Description
Because of limitations of MS-DOS, this function doesn't really link two
--- 6,12 -----
int link(const char *exists, const char *new)
+ @end example
@subheading Description
Because of limitations of MS-DOS, this function doesn't really link two
***************
*** 10,17
@subheading Description
Because of limitations of MS-DOS, this function doesn't really link two
! files together. However, it simulates a real @code{link} by copying the
! file at @var{exists} to @var{new}.
@subheading Return Value
--- 10,19 -----
@subheading Description
Because of limitations of MS-DOS, this function doesn't really link two
! MSDOS files together. However, it simulates a real @code{link} by copying the
! file at @var{exists} to @var{new}. This can be over-ridden by a
! @xref{file system extension} that emulates the ``link'' operation.
! (This extension must be added via @xref{__FSEXT_add_open_handler}).
@subheading Return Value
***************
*** 21,25
@example
link("foo.c", "foo.bak");
! @end example
--- 23,27 -----
@example
link("foo.c", "foo.bak");
! @end example
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="lseek-txh.dif"
diff -c src\libc\posix\unistd\lseek.txh lseek.txh
*** \local\src\libc\posix\unistd\lseek.txh Mon Jul 10 01:40:48 1995
--- \local\ginsu\diffs\lseek.txh Wed Oct 15 16:19:26 1997
***************
*** 4,11
@example
#include <unistd.h>
! off_t lseek(int fd, off_t offset, int whence);
! @end example
@subheading Description
--- 4,11 -----
@example
#include <unistd.h>
! off_t lseek(int fd, off_t offset, int whence)
! @end example
@subheading Description
***************
*** 25,31
@item SEEK_END
The file pointer is moved to a position @var{offset} bytes from the end
! of the file. The offset is usually nonpositive in this case.
@end table
--- 25,31 -----
@item SEEK_END
The file pointer is moved to a position @var{offset} bytes from the end
! of the file. The offset is usually nonpositive in this case.
@end table
***************
*** 37,41
@example
lseek(fd, 12, SEEK_CUR); /* skip 12 bytes */
! @end example
--- 37,41 -----
@example
lseek(fd, 12, SEEK_CUR); /* skip 12 bytes */
! @end example
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="pipe-txh.dif"
diff -c src\libc\posix\unistd\pipe.txh pipe.txh
*** \local\src\libc\posix\unistd\pipe.txh Sun Aug 31 16:13:20 1997
--- \local\ginsu\diffs\pipe.txh Wed Oct 15 16:19:24 1997
***************
*** 1,10
@node pipe, unix
@subheading Syntax
!
! @example
! #include <unistd.h>
!
! int pipe(int fildes[2]);
@end example
@subheading Description
--- 1,7 -----
@node pipe, unix
@subheading Syntax
! @example
! int pipe(int filedes[2])
@end example
@subheading Description
This creates a bi-directional pipe. @pxref{_pipe} for more details.
***************
*** 6,12
int pipe(int fildes[2]);
@end example
-
@subheading Description
This function is provided only to assist in porting from Unix. It
--- 3,8 -----
@example
int pipe(int filedes[2])
@end example
@subheading Description
This creates a bi-directional pipe. @pxref{_pipe} for more details.
***************
*** 8,14
@end example
@subheading Description
!
! This function is provided only to assist in porting from Unix. It
! always returns an error condition.
--- 4,8 -----
int pipe(int filedes[2])
@end example
@subheading Description
! This creates a bi-directional pipe. @pxref{_pipe} for more details.
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="remove-txh.dif"
diff -c src\libc\ansi\stdio\remove.txh remove.txh
*** \local\src\libc\ansi\stdio\remove.txh Mon Jul 10 01:39:48 1995
--- \local\ginsu\diffs\remove.txh Wed Oct 15 16:19:26 1997
***************
*** 2,8
@subheading Syntax
@example
! #include <stdio.h>
int remove(const char *file);
@end example
--- 2,8 -----
@subheading Syntax
@example
! #include <stdio.h>
int remove(const char *file_name)
@end example
***************
*** 4,10
@example
#include <stdio.h>
! int remove(const char *file);
@end example
@subheading Description
--- 4,10 -----
@example
#include <stdio.h>
! int remove(const char *file_name)
@end example
@subheading Description
***************
*** 8,13
@end example
@subheading Description
This function removes the named @var{file} from the file system. Unless
you have an un-erase program, the file and its contents are gone for
--- 8,16 -----
@end example
@subheading Description
+ This function removes the named @var{file} from the file system.
+ Unless you have an un-erase program, the file and its contents are
+ gone for good. This may be emulated by a @xref{file system extension}.
@subheading Return Value
Zero on success, nonzero on failure.
***************
*** 9,18
@subheading Description
- This function removes the named @var{file} from the file system. Unless
- you have an un-erase program, the file and its contents are gone for
- good.
-
@subheading Return Value
Zero on success, nonzero on failure.
--- 12,17 -----
Unless you have an un-erase program, the file and its contents are
gone for good. This may be emulated by a @xref{file system extension}.
@subheading Return Value
Zero on success, nonzero on failure.
***************
*** 14,20
good.
@subheading Return Value
-
Zero on success, nonzero on failure.
@subheading Example
--- 13,18 -----
gone for good. This may be emulated by a @xref{file system extension}.
@subheading Return Value
Zero on success, nonzero on failure.
@subheading Example
***************
*** 18,24
Zero on success, nonzero on failure.
@subheading Example
-
@example
remove("/tmp/data.tmp");
@end example
--- 16,21 -----
Zero on success, nonzero on failure.
@subheading Example
@example
remove("/tmp/data.tmp");
@end example
***************
*** 22,25
@example
remove("/tmp/data.tmp");
@end example
-
--- 19,21 -----
@example
remove("/tmp/data.tmp");
@end example
--=====================_876969353==_
Content-Type: text/plain; charset="us-ascii"
--=====================_876969353==_--
- Raw text -