Add Atari version of of doesclrscrafterexit().

- Update documentation.
- Update atari.h and apple2.h header files.
- Adapt Atari test/target programs.
- Fix a typo in "div" entry in funcref.sgml.
This commit is contained in:
Christian Groessler
2016-06-07 00:42:51 +02:00
parent 13482984ca
commit c7874b9f60
8 changed files with 71 additions and 39 deletions

View File

@@ -949,27 +949,7 @@ id="malloc" name="malloc"> may still return <tt/NULL/.
<tag/Declaration/<tt/unsigned char _is_cmdline_dos (void);/
<tag/Description/The function returns 0 if the DOS doesn't support command line arguments.
It returns 1 if it does.
<tag/Notes/<itemize>
<item>Many Atari DOSes which don't support command line arguments immediately clear the screen
and display their menu after a program exits. Therefore it might be difficult to read
the last messages printed by the program prior to its exit. This function can be used
to decide if a delay or wait for a key press should be executed when then program
exits.
</itemize>
<tag/Availability/cc65 (<tt/atari/ and <tt/atarixl/ platforms)
<tag/Example/<verb>
/* Hello World for Atari */
#include <stdio.h>
#include <unistd.h>
#include <atari.h>
int main(void)
{
printf("Hello World\n");
if (! _is_cmdline_dos())
sleep(5);
return 0;
}
</verb>
</descrip>
</quote>
@@ -2572,8 +2552,8 @@ used in presence of a prototype.
<descrip>
<tag/Function/Divide two ints and return quotient and remainder.
<tag/Header/<tt/<ref id="stdlib.h" name="stdlib.h">/
<tag/Declaration/<tt/div_t __fastcall__ div (int numer, int denom);/
<tag/Description/<tt/div/ divides <tt/numer/ by <tt/denom/ and returns the
<tag/Declaration/<tt/div_t __fastcall__ div (int number, int denom);/
<tag/Description/<tt/div/ divides <tt/number/ by <tt/denom/ and returns the
quotient and remainder in a <tt/div_t/ structure.
<tag/Notes/<itemize>
<item>The function is only available as fastcall function, so it may only
@@ -2587,6 +2567,40 @@ ldiv
</quote>
<sect1>doesclrscrafterexit<label id="doesclrscrafterexit"><p>
<quote>
<descrip>
<tag/Function/Determines whether the screen is going to be cleared after program exit.
<tag/Header/<tt/<ref id="atari.h" name="atari.h">, <ref id="apple2.h" name="apple2.h">/
<tag/Declaration/<tt/unsigned char doesclrscrafterexit (void);/
<tag/Description/The function returns 0 if the screen won't be cleared immediately after
program termination. It returns 1 if it will.
<tag/Notes/<itemize>
<item>Some systems, maybe depending on configuration, immediately clear the screen
after a program exits. Therefore it might be difficult to read
the last messages printed by the program prior to its exit. This function can be used
to decide if a delay or wait for a key press should be executed when then program
exits.
</itemize>
<tag/Availability/cc65 (<tt/atari/, <tt/atarixl/, <tt/apple2/, and <tt/apple2enh/ platforms)
<tag/Example/<verb>
/* Hello World */
#include <stdio.h>
#include <unistd.h>
#include <atari.h>
int main(void)
{
printf("Hello World\n");
if (doesclrscrafterexit())
sleep(5);
return 0;
}
</verb>
</descrip>
</quote>
<sect1>em_commit<label id="em_commit"><p>
<quote>