X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Sat, 09 Mar 2002 10:41:45 +0000 From: "Richard Dawe" Sender: rich AT phekda DOT freeserve DOT co DOT uk To: djgpp-workers AT delorie DOT com X-Mailer: Emacs 21.0.98 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 Subject: Doc fixes - mktemp, _os_trueversion Message-Id: Reply-To: djgpp-workers AT delorie DOT com Hello. Please find below some documentation fixes for: * The description of the return value wasn't right. mktemp's example also did not check the return value. * The page for _get_dos_version did not describe _os_trueversion. If there are no objections, I'll commit this patch next Saturday. Bye, Rich =] Index: src/libc/compat/stdio/mktemp.txh =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdio/mktemp.txh,v retrieving revision 1.2 diff -p -u -3 -r1.2 mktemp.txh --- src/libc/compat/stdio/mktemp.txh 1998/09/27 15:21:06 1.2 +++ src/libc/compat/stdio/mktemp.txh 2002/03/09 10:35:42 @@ -20,7 +20,8 @@ have two additional characters before th @subheading Return Value -The resulting filename. +If a unique name cannot be chosen, @code{NULL} is returned. Otherwise +the resulting filename is returned. @subheading Portability @@ -30,7 +31,10 @@ The resulting filename. @example char template[] = "/tmp/ccXXXXXX"; -mktemp(template); -FILE *q = fopen(template, "w"); +if (mktemp(template) != NULL) + @{ + FILE *q = fopen(template, "w"); + @dots{} + @} @end example Index: src/libc/dos/dos/getdos_v.txh =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/dos/dos/getdos_v.txh,v retrieving revision 1.2 diff -p -u -3 -r1.2 getdos_v.txh --- src/libc/dos/dos/getdos_v.txh 1998/09/27 15:21:28 1.2 +++ src/libc/dos/dos/getdos_v.txh 2002/03/09 10:35:42 @@ -5,6 +5,7 @@ #include extern unsigned short _osmajor, _osminor; +extern unsigned short _os_trueversion; extern const char * _os_flavor; unsigned short _get_dos_version(int true_version); @@ -19,12 +20,17 @@ number, which is unaffected by possible The external variables @code{_osmajor} and @code{_osminor} will always be set to the major and minor parts of the @cite{advertised} version number, -possibly changed by SETVER, even if @var{true_version} is non-zero. You -typically need the true version when you need an intimate knowledge of the -host OS internals, like when using undocumented features. Note that some -DOS clones (notably, DR-DOS) do not support DOS function required to -report the true DOS version; for these, the version reported might be -affected by SETVER even if @var{true_version} is non-zero. +The external variable @code{_os_trueversion} will always be set to the +true version number. @code{_osmajor}, @code{_osminor} +and @code{_os_trueversion} may possibly be changed by SETVER, +even if @var{true_version} is non-zero. + +You typically need the true version when you need an intimate knowledge +of the host OS internals, like when using undocumented features. Note +that some DOS clones (notably, DR-DOS) do not support DOS function +required to report the true DOS version; for these, the version +reported might be affected by SETVER even if @var{true_version} +is non-zero. The external variable @code{_os_flavor} will point to a string which describes the OEM name of the host OS variety.