delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/03/11/08:09:52

Date: Tue, 11 Mar 2003 11:44:19 +0000
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: Update to _get_dev_info docs [PATCH]
Message-Id: <E18si85-0000WK-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Below is a patch to update the docs for _get_dev_info:

* Mention <libc/getdinfo.h> and list the constants in the table
  describing the bits.

* Add concept index entries for 'cooked mode' & 'raw mode'.

* Add an entry for !_DEV_RAW for cooked mode. Cooked mode was defined,
  but there was no entry in the character-device table for it.

OK to commit?

Bye, Rich =]

--- /develop/djgpp/src/libc/dos/dos/getdinfo.txh	2003-01-30 19:43:48.000000000 +0000
+++ /develop/djgpp.rw3/src/libc/dos/dos/getdinfo.txh	2003-03-11 11:41:06.000000000 +0000
@@ -1,5 +1,7 @@
 @node _get_dev_info, io
 @findex _get_dev_info
+@cindex cooked mode
+@cindex raw mode
 @subheading Syntax
 
 @example
@@ -17,39 +19,108 @@ to an open file or device, otherwise the
 
 In case of success, the returned value is the coded information from the
 system about the character device or the file which is referenced by the
-file handle @var{handle}.  The following table shows the meaning of the
-individual bits in the return value:
+file handle @var{handle}.  The header @code{<libc/getdinfo.h>} defines
+constants for the individual bits in the return value.  The following table
+shows the meaning of the individual bits in the return value:
 
 For a character device:
 
-@multitable {Bit(s)} {Device can process IOCTL functions 02h and 03h}
-@item Bit(s) @tab Description
-@item 14 @tab Device can process IOCTL functions 02h and 03h
-@item 13 @tab Device supports output-until-busy
-@item 11 @tab Device supports OPEN/CLOSE calls
-@item 8  @tab Unknown; set by MS-DOS 6.2x @file{KEYB AT var{xx}.COM}
-@item 7  @tab Always set for character devices
-@item 6  @tab End of file on input
-@item 5  @tab Device is in @strong{raw} (binary) mode
-@item 4  @tab Device uses Int 29h
-@item 3  @tab Clock device
-@item 2  @tab NUL device
-@item 1  @tab Standard output device
-@item 0  @tab Standard input device
+@multitable {Bit(s)} {@code{_DEV_STDOUT}} {Device can process IOCTL functions 02h and 03h}
+@item Bit(s)
+@tab Constant
+@tab Description
+
+@item 14
+@tab @code{_DEV_IOCTRL}
+@tab Device can process IOCTL functions 02h and 03h
+
+@item 13
+@tab
+@tab Device supports output-until-busy
+
+@item 11
+@tab
+@tab Device supports OPEN/CLOSE calls
+
+@item 8
+@tab
+@tab Unknown; set by MS-DOS 6.2x @file{KEYB AT var{xx}.COM}
+
+@item 7
+@tab @code{_DEV_CDEV}
+@tab Always set for character devices
+
+@item 6
+@tab
+@tab End of file on input
+
+@item 5
+@tab @code{_DEV_RAW}
+@tab If set, device is in @strong{raw} (binary) mode
+
+@item 5
+@tab @code{_DEV_RAW}
+@tab If clear, device is in @strong{cooked} (text) mode
+
+@item 4
+@tab
+@tab Device uses Int 29h
+
+@item 3
+@tab @code{_DEV_CLOCK}
+@tab Clock device
+
+@item 2
+@tab @code{_DEV_NUL}
+@tab NUL device
+
+@item 1
+@tab @code{_DEV_STDOUT}
+@tab Standard output device
+
+@item 0
+@tab @code{_DEV_STDIN}
+@tab Standard input device
 @end multitable
 
 For a block device (a disk file):
 
-@multitable {Bit(s)} {Generate Int 24h if full disk or read past EOF}
-@item Bit(s) @tab Description
-@item 15 @tab Device is remote (networked drive)
-@item 14 @tab Don't set file time stamp on close
-@item 11 @tab If set, non-removable media
-@item 11 @tab If clear, media is removable (e.g. floppy disk)
-@item 8  @tab Generate Int 24h if full disk or read past EOF
-@item 7  @tab Always clear for disk files
-@item 6  @tab File has not been written to
-@item 5-0 @tab Drive number (0 = A:)
+@multitable {Bit(s)} {@code{_DEV_STDOUT}} {Generate Int 24h if full disk or read past EOF}
+@item Bit(s)
+@tab Constant
+@tab Description
+
+@item 15
+@tab @code{_DEV_REMOTE}
+@tab Device is remote (networked drive)
+
+@item 14
+@tab
+@tab Don't set file time stamp on close
+
+@item 11
+@tab
+@tab If set, non-removable media
+
+@item 11
+@tab
+@tab If clear, media is removable (e.g. floppy disk)
+
+@item 8
+@tab
+@tab Generate Int 24h if full disk or read past EOF
+
+@item 7
+@tab @code{_DEV_CDEV}
+@tab Always clear for disk files
+
+@item 6
+@tab
+@tab File has not been written to
+
+@item 5-0
+@tab
+@tab Drive number (0 = A:)
 @end multitable
 
 Note that the functionality indicated by bit 8 for the block devices is

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019