Message-Id: <3.0.1.32.19970923144519.006b0534@yacker.xiotech.com> Date: Tue, 23 Sep 1997 14:45:19 -0500 To: djgpp-workers AT delorie DOT com From: Randy Maas Subject: Rev c. of the proposed fsext changes (part 1) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_875061919==_" Precedence: bulk --=====================_875061919==_ Content-Type: text/plain; charset="us-ascii" I'm going to send the proposed changes to the file system extension. I believe I got the "diff" parameters proper this time :-) The diff's of the soruce files are done on files with inline doc's stripped. I'll break it down in 5 (!) parts so that it'll clear the hurdles of the mail system. I'll also post a zip file ftp.delorie.com of these files. Here's the manifest Part 1 (this part) The changes to existing TXH files (except fsext): fse_open, _creat, _open, _close, _read, _write Part 2: The diff for fsext.txh Part 3: The txh files for: _fs_call, _io_api, _lseek, _def_fs, pread, pwrite Part 4: The diff files for: crt1.c select.c fse_open.c fsext.c fsext.h, _creat.c, _open.c _read.c, _close.c, _write.c, link.c , remove.c, lseek.c Part 5: The "new" source files: pwrite.c pread.c _DOS_fd. _DOS_fsext.c _lseek.c FSEMU.c _io_api.c _def_fs.c Randy Maas randym AT acm DOT org --=====================_875061919==_ 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 Mon Jul 10 01:40:14 1995 --- \local\ginsu\diffs\_close.txh Tue Sep 23 14:38:14 1997 *************** *** 4,10 @example #include ! int _close(int fd); @end example @subheading Description --- 4,10 ----- @example #include ! int _close(int handle) @end example @subheading Description *************** *** 9,16 @subheading Description ! This is a direct connection to the MS-DOS close function call, int ! 0x21, %ah = 0x3e. @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 *************** *** 14,17 @subheading Return Value ! Zero if the file was closed, else nonzero. --- 15,19 ----- @subheading Return Value ! Zero if the file was closed, else nonzero. ! --=====================_875061919==_ 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 Mon Jul 10 01:40:16 1995 --- \local\ginsu\diffs\_creat.txh Tue Sep 23 14:38:10 1997 *************** *** 4,10 @example #include ! int _creat(const char *path, int attrib); @end example @subheading Description --- 4,10 ----- @example #include ! int _creat(const char* path, int attrib) @end example @subheading Description *************** *** 9,16 @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. @subheading Return Value --- 9,15 ----- @subheading Description ! This function has the File System Extension create the named file. @subheading Return Value *************** *** 15,17 @subheading Return Value The new file descriptor, else -1 on error. --- 14,17 ----- @subheading Return Value The new file descriptor, else -1 on error. + --=====================_875061919==_ 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 Mon Jul 10 01:40:16 1995 --- \local\ginsu\diffs\_open.txh Tue Sep 23 14:38:12 1997 *************** *** 4,10 @example #include ! int _open(const char *path, int attrib); @end example @subheading Description --- 4,10 ----- @example #include ! int _open(const char* filename, int attrib) @end example @subheading Description *************** *** 8,13 @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. --- 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 *************** *** 9,17 @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. - @subheading Return Value The new file descriptor, else -1 on error. --- 11,16 ----- This is a standard interface into File Extension. It will find the proper extension to open the specified file name. @subheading Return Value The new file descriptor, else -1 on error. *************** *** 15,17 @subheading Return Value The new file descriptor, else -1 on error. --- 14,17 ----- @subheading Return Value The new file descriptor, else -1 on error. + --=====================_875061919==_ 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 Mon Jul 10 01:40:16 1995 --- \local\ginsu\diffs\_read.txh Tue Sep 23 14:38:18 1997 *************** *** 4,10 @example #include ! ssize_t _read(int fildes, void *buf, size_t nbyte); @end example @subheading Description --- 4,10 ----- @example #include ! ssize_t _read(int handle, void* buf, size_t nbytes) @end example @subheading Description *************** *** 9,17 @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. @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 *************** *** 15,19 @subheading Return Value ! The number of bytes read. --- 16,20 ----- @subheading Return Value ! The number of bytes read, or -1 on error. --=====================_875061919==_ 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 Mon Jul 10 01:40:16 1995 --- \local\ginsu\diffs\_write.txh Tue Sep 23 14:38:20 1997 *************** *** 4,10 @example #include ! ssize_t _write(int fildes, void *buf, size_t nbyte); @end example @subheading Description --- 4,10 ----- @example #include ! ssize_t _write(int handle, const void* buf, size_t nbytes) @end example @subheading Description *************** *** 9,17 @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. @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 *************** *** 15,19 @subheading Return Value ! The number of bytes written. --- 16,20 ----- @subheading Return Value ! The number of bytes written, or -1 on error. --=====================_875061919==_ 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 Tue Sep 23 14:38:04 1997 *************** *** 4,10 @example #include ! int __FSEXT_add_open_handler(__FSEXT_Function *_function); @end example @subheading Description --- 4,10 ----- @example #include ! int __FSEXT_add_open_handler(__FSEXT_Function *_function) @end example @subheading Description *************** *** 29,35 @end example ! @c ---------------------------------------------------------------------- @node __FSEXT_call_open_handlers, file system @subheading Syntax --- 29,38 ----- @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 int __FSEXT_call_open_handlers(__FSEXT_Fnumber _function_number, ! int *rv, va_list _args); @end example @subheading Description --- 40,46 ----- #include 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. --- 47,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. ! --=====================_875061919==_ Content-Type: text/plain; charset="us-ascii" --=====================_875061919==_--