Changed multi-line C comments into another style.

The left side doesn't look unbalanced.
This commit is contained in:
Greg King
2014-06-30 05:10:35 -04:00
parent 132d57f1ad
commit 0390c34e88
502 changed files with 8869 additions and 8884 deletions

View File

@@ -82,21 +82,21 @@ struct regs {
#define F6502_C 0x01 /* C flag */
/* Function to call any machine language subroutine. All registers in the
* regs structure are passed into the routine and the results are passed
* out. The B flag is ignored on input. The called routine must end with
* an RTS.
*/
** regs structure are passed into the routine and the results are passed
** out. The B flag is ignored on input. The called routine must end with
** an RTS.
*/
void __fastcall__ _sys (struct regs* r);
/* Set and reset the break vector. The given user function is called if
* a break occurs. The values of the registers may be read from the brk_...
* variables. The value in brk_pc will point to the address that contains
* the brk instruction.
* The set_brk function will install an exit handler that will reset the
* vector if the program ends.
*/
** a break occurs. The values of the registers may be read from the brk_...
** variables. The value in brk_pc will point to the address that contains
** the brk instruction.
** The set_brk function will install an exit handler that will reset the
** vector if the program ends.
*/
extern unsigned char brk_a; /* A register value */
extern unsigned char brk_x; /* X register value */

View File

@@ -36,10 +36,10 @@
/* Define a structure with the 6522 register offsets.
* NOTE: The timer registers are not declared as 16 bit registers, because
* the order in which the two 8 bit halves are written is important, and
* the compiler doesn't guarantee any order when writing 16 bit values.
*/
** NOTE: The timer registers are not declared as 16 bit registers, because
** the order in which the two 8 bit halves are written is important, and
** the compiler doesn't guarantee any order when writing 16 bit values.
*/
struct __6522 {
unsigned char prb; /* Port register B */
unsigned char pra; /* Port register A */

View File

@@ -39,9 +39,9 @@
/* Define a structure with the 6525 register offsets. The shadow registers
* (if port C is unused) are currently not implemented, we would need a
* union to do that, however that would introduce an additional name.
*/
** (if port C is unused) are currently not implemented, we would need a
** union to do that, however that would introduce an additional name.
*/
struct __6525 {
unsigned char pra; /* Port register A */
unsigned char prb; /* Port register B */

View File

@@ -39,10 +39,10 @@
/* Define a structure with the 6526 register offsets.
* NOTE: The timer registers are not declared as 16 bit registers, because
* the order in which the two 8 bit halves are written is important, and
* the compiler doesn't guarantee any order when writing 16 bit values.
*/
** NOTE: The timer registers are not declared as 16 bit registers, because
** the order in which the two 8 bit halves are written is important, and
** the compiler doesn't guarantee any order when writing 16 bit values.
*/
struct __6526 {
unsigned char pra; /* Port register A */
unsigned char prb; /* Port register B */

View File

@@ -1,9 +1,9 @@
/*
* _heap.h
*
* Ullrich von Bassewitz, 1998-06-03, 2004-12-19
*
*/
** _heap.h
**
** Ullrich von Bassewitz, 1998-06-03, 2004-12-19
**
*/
@@ -12,11 +12,11 @@
/* Structure that preceeds a user block in most cases.
* The aligned_malloc function may generate blocks where the start pointer
* and size are splitted to handle a memory hole that is needed for
* alignment.
*/
/* Structure that preceeds a user block in most cases.
** The aligned_malloc function may generate blocks where the start pointer
** and size are splitted to handle a memory hole that is needed for
** alignment.
*/
struct usedblock {
unsigned size;
struct usedblock* start;
@@ -26,8 +26,8 @@ struct usedblock {
#define HEAP_ADMIN_SPACE sizeof (struct usedblock)
/* The data type used to implement the free list.
* Beware: Field order is significant!
*/
** Beware: Field order is significant!
*/
struct freeblock {
unsigned size;
struct freeblock* next;

View File

@@ -39,8 +39,8 @@
/* Define a structure with the vic register offsets. In cc65 mode, there
* are aliases for the field accessible as arrays.
*/
** are aliases for the field accessible as arrays.
*/
#if __CC65_STD__ == __CC65_STD_CC65__
struct __vic2 {
union {

View File

@@ -109,23 +109,23 @@
extern unsigned char _dos_type;
/* Valid _dos_type values:
*
* AppleDOS 3.3 - 0x00
* ProDOS 8 1.0.1 - 0x10
* ProDOS 8 1.0.2 - 0x10
* ProDOS 8 1.1.1 - 0x11
* ProDOS 8 1.2 - 0x12
* ProDOS 8 1.3 - 0x13
* ProDOS 8 1.4 - 0x14
* ProDOS 8 1.5 - 0x15
* ProDOS 8 1.6 - 0x16
* ProDOS 8 1.7 - 0x17
* ProDOS 8 1.8 - 0x18
* ProDOS 8 1.9 - 0x18 (!)
* ProDOS 8 2.0.1 - 0x21
* ProDOS 8 2.0.2 - 0x22
* ProDOS 8 2.0.3 - 0x23
*/
**
** AppleDOS 3.3 - 0x00
** ProDOS 8 1.0.1 - 0x10
** ProDOS 8 1.0.2 - 0x10
** ProDOS 8 1.1.1 - 0x11
** ProDOS 8 1.2 - 0x12
** ProDOS 8 1.3 - 0x13
** ProDOS 8 1.4 - 0x14
** ProDOS 8 1.5 - 0x15
** ProDOS 8 1.6 - 0x16
** ProDOS 8 1.7 - 0x17
** ProDOS 8 1.8 - 0x18
** ProDOS 8 1.9 - 0x18 (!)
** ProDOS 8 2.0.1 - 0x21
** ProDOS 8 2.0.2 - 0x22
** ProDOS 8 2.0.3 - 0x23
*/
@@ -136,9 +136,9 @@ extern unsigned char _dos_type;
/* The file stream implementation and the POSIX I/O functions will use the
* following variables to determine the file type, aux type and creation time
* stamp to use.
*/
** following variables to determine the file type, aux type and creation time
** stamp to use.
*/
extern unsigned char _filetype; /* Default: 6 */
extern unsigned int _auxtype; /* Default: 0 */
extern struct {
@@ -179,18 +179,18 @@ void rebootafterexit (void);
#define ser_apple2_slot(num) ser_ioctl (0, (void*) (num))
/* Select a slot number from 1 to 7 prior to ser_open.
* The default slot number is 2.
*/
** The default slot number is 2.
*/
#define tgi_apple2_mix(onoff) tgi_ioctl (0, (void*) (onoff))
/* If onoff is 1, graphics/text mixed mode is enabled.
* If onoff is 0, graphics/text mixed mode is disabled.
*/
** If onoff is 0, graphics/text mixed mode is disabled.
*/
/* The following #defines will cause the matching functions calls in conio.h
* to be overlaid by macros with the same names, saving the function call
* overhead.
*/
** to be overlaid by macros with the same names, saving the function call
** overhead.
*/
#define _textcolor(color) COLOR_WHITE
#define _bgcolor(color) COLOR_BLACK
#define _bordercolor(color) COLOR_BLACK

View File

@@ -109,8 +109,8 @@ extern void a2e_lo_tgi[];
void __fastcall__ textframe (unsigned char width, unsigned char height,
unsigned char style);
/* Output a frame on the text screen with the given width and height
* starting at the current cursor position and using the given style.
*/
** starting at the current cursor position and using the given style.
*/
void __fastcall__ textframexy (unsigned char x, unsigned char y,
unsigned char width, unsigned char height,
@@ -119,8 +119,8 @@ void __fastcall__ textframexy (unsigned char x, unsigned char y,
unsigned __fastcall__ videomode (unsigned mode);
/* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx
* constants.
*/
** constants.
*/

View File

@@ -141,21 +141,21 @@ extern void c128_vdc2_tgi[];
unsigned __fastcall__ videomode (unsigned Mode);
/* Set the video mode, return the old mode. Call with one of the VIDEOMODE_xx
* constants.
*/
** constants.
*/
void toggle_videomode (void);
/* Toggle the video mode between 40 and 80 chars (calls SWAPPER).
* THIS FUNCTION IS DEPRECATED, please use videomode instead!
*/
** THIS FUNCTION IS DEPRECATED, please use videomode instead!
*/
void c64mode (void);
/* Switch the C128 into C64 mode. Note: This function will not return! */
void fast (void);
/* Switch the CPU into 2MHz mode. Note: This will disable video when in
* 40 column mode.
*/
** 40 column mode.
*/
void slow (void);
/* Switch the CPU into 1MHz mode. */

View File

@@ -82,8 +82,8 @@
/* The file stream implementation and the POSIX I/O functions will
* use the following variable to determine the file type to use.
*/
** use the following variable to determine the file type to use.
*/
extern char _filetype; /* Defaults to 's' */
@@ -162,10 +162,10 @@ unsigned char get_tv (void);
/* Constants to use with cbm_open() for openning a file for reading or
* writing without the need to append ",r" or ",w" to the filename.
*
* e.g., cbm_open(2, 8, CBM_READ, "0:data,s");
*/
** writing without the need to append ",r" or ",w" to the filename.
**
** e.g., cbm_open(2, 8, CBM_READ, "0:data,s");
*/
#define CBM_READ 0 /* default is ",p" */
#define CBM_WRITE 1 /* ditto */
#define CBM_SEQ 2 /* default is ",r" -- or ",s" when writing */
@@ -202,79 +202,79 @@ void cbm_k_unlsn (void);
/* The cbm_* I/O functions below set _oserror (see errno.h),
* in case of an error.
*
* error-code BASIC error
* ---------- -----------
* 1 = too many files
* 2 = file open
* 3 = file not open
* 4 = file not found
* 5 = device not present
* 6 = not input-file
* 7 = not output-file
* 8 = missing file-name
* 9 = illegal device-number
*
* 10 = STOP-key pushed
* 11 = general I/O-error
*/
** in case of an error.
**
** error-code BASIC error
** ---------- -----------
** 1 = too many files
** 2 = file open
** 3 = file not open
** 4 = file not found
** 5 = device not present
** 6 = not input-file
** 7 = not output-file
** 8 = missing file-name
** 9 = illegal device-number
**
** 10 = STOP-key pushed
** 11 = general I/O-error
*/
unsigned int cbm_load (const char* name, unsigned char device, void* data);
/* Loads file "name", from given device, to given address -- or, to the load
* address of the file if "data" is the null pointer (like load"name",8,1
* in BASIC).
* Returns number of bytes that were loaded if loading was successful;
* otherwise 0, "_oserror" contains an error-code, then (see table above).
*/
** address of the file if "data" is the null pointer (like load"name",8,1
** in BASIC).
** Returns number of bytes that were loaded if loading was successful;
** otherwise 0, "_oserror" contains an error-code, then (see table above).
*/
unsigned char __fastcall__ cbm_save (const char* name, unsigned char device,
const void* addr, unsigned int size);
/* Saves "size" bytes, starting at "addr", to a file.
* Returns 0 if saving was successful, otherwise an error-code (see table
* above).
*/
** Returns 0 if saving was successful, otherwise an error-code (see table
** above).
*/
unsigned char __fastcall__ cbm_open (unsigned char lfn, unsigned char device,
unsigned char sec_addr, const char* name);
/* Opens a file. Works just like the BASIC command.
* Returns 0 if openning was successful, otherwise an error-code (see table
* above).
*/
** Returns 0 if openning was successful, otherwise an error-code (see table
** above).
*/
void __fastcall__ cbm_close (unsigned char lfn);
/* Closes a file */
int __fastcall__ cbm_read (unsigned char lfn, void* buffer, unsigned int size);
/* Reads up to "size" bytes from a file into "buffer".
* Returns the number of actually-read bytes, 0 if there are no bytes left.
* -1 in case of an error; then, _oserror contains an error-code (see table
* above). (Remember: 0 means end-of-file; -1 means error.)
*/
** Returns the number of actually-read bytes, 0 if there are no bytes left.
** -1 in case of an error; then, _oserror contains an error-code (see table
** above). (Remember: 0 means end-of-file; -1 means error.)
*/
int __fastcall__ cbm_write (unsigned char lfn, const void* buffer,
unsigned int size);
/* Writes up to "size" bytes from "buffer" to a file.
* Returns the number of actually-written bytes, or -1 in case of an error;
* _oserror contains an error-code, then (see above table).
*/
** Returns the number of actually-written bytes, or -1 in case of an error;
** _oserror contains an error-code, then (see above table).
*/
unsigned char cbm_opendir (unsigned char lfn, unsigned char device, ...);
/* Opens directory listing. Returns 0 if opening directory was successful;
* otherwise, an error-code corresponding to cbm_open(). As an optional
* argument, the name of the directory may be passed to the function. If
* no explicit name is specified, "$" is used.
*/
** otherwise, an error-code corresponding to cbm_open(). As an optional
** argument, the name of the directory may be passed to the function. If
** no explicit name is specified, "$" is used.
*/
unsigned char __fastcall__ cbm_readdir (unsigned char lfn,
struct cbm_dirent* l_dirent);
/* Reads one directory line into cbm_dirent structure.
* Returns 0 if reading directory-line was successful.
* Returns non-zero if reading directory failed, or no more file-names to read.
* Returns 2 on last line. Then, l_dirent->size = the number of "blocks free."
*/
** Returns 0 if reading directory-line was successful.
** Returns non-zero if reading directory failed, or no more file-names to read.
** Returns 2 on last line. Then, l_dirent->size = the number of "blocks free."
*/
void __fastcall__ cbm_closedir (unsigned char lfn);
/* Closes directory by cbm_close(lfn) */

View File

@@ -138,9 +138,9 @@ void __fastcall__ pokewsys (unsigned addr, unsigned val);
/* The following #defines will cause the matching functions calls in conio.h
* to be overlaid by macros with the same names, saving the function call
* overhead.
*/
** to be overlaid by macros with the same names, saving the function call
** overhead.
*/
#define _textcolor(color) COLOR_WHITE
#define _bgcolor(color) COLOR_BLACK
#define _bordercolor(color) COLOR_BLACK

View File

@@ -52,9 +52,9 @@
/* CBM FILE TYPES. The definitions are used within standard headers, so we
* be careful with identifiers in the user name space.
* "Regular" files have a special bit set so it's easier to pick them out.
*/
** be careful with identifiers in the user name space.
** "Regular" files have a special bit set so it's easier to pick them out.
*/
#define _CBM_T_REG 0x10U /* Bit set for regular files */
#define _CBM_T_SEQ 0x10U
#define _CBM_T_PRG 0x11U
@@ -93,12 +93,12 @@
unsigned char __fastcall__ _cbm_filetype (unsigned char c);
/* Map the start character for a file type to one of the file types above.
* Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
* look at the following character to determine if the file type is actually
* CBM_T_DIR.
* This is a function used by the implementation. There is usually no need
* to call it from user code.
*/
** Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
** look at the following character to determine if the file type is actually
** CBM_T_DIR.
** This is a function used by the implementation. There is usually no need
** to call it from user code.
*/

View File

@@ -46,17 +46,17 @@
long __fastcall__ cc65_idiv32by16r16 (long rhs, int lhs);
/* Divide a 32 bit signed value by a 16 bit signed value yielding a 16
* bit result and a 16 bit remainder. The former is returned in the lower 16
* bit of the result, the latter in the upper. If you don't need the
* remainder, just assign (or cast) to an int.
*/
** bit result and a 16 bit remainder. The former is returned in the lower 16
** bit of the result, the latter in the upper. If you don't need the
** remainder, just assign (or cast) to an int.
*/
unsigned long __fastcall__ cc65_udiv32by16r16 (unsigned long rhs, unsigned lhs);
/* Divide a 32 bit unsigned value by a 16 bit unsigned value yielding a 16
* bit result and a 16 bit remainder. The former is returned in the lower 16
* bit of the result, the latter in the upper. If you don't need the
* remainder, just assign (or cast) to an unsigned.
*/
** bit result and a 16 bit remainder. The former is returned in the lower 16
** bit of the result, the latter in the upper. If you don't need the
** remainder, just assign (or cast) to an unsigned.
*/
int __fastcall__ cc65_imul8x8r16 (signed char lhs, signed char rhs);
/* Multiplicate two signed 8 bit to yield an signed 16 bit result */
@@ -69,21 +69,21 @@ unsigned __fastcall__ cc65_umul8x8r16 (unsigned char lhs, unsigned char rhs);
unsigned long __fastcall__ cc65_umul16x8r32 (unsigned lhs, unsigned char rhs);
/* Multiplicate an unsigned 16 bit by an unsigned 8 bit number yielding a 24
* bit unsigned result that is extended to 32 bits for easier handling from C.
*/
** bit unsigned result that is extended to 32 bits for easier handling from C.
*/
unsigned long __fastcall__ cc65_umul16x16r32 (unsigned lhs, unsigned rhs);
/* Multiplicate two unsigned 16 bit to yield an unsigned 32 bit result */
int __fastcall__ cc65_sin (unsigned x);
/* Return the sine of the argument, which must be in range 0..360. The result
* is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00.
*/
** is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00.
*/
int __fastcall__ cc65_cos (unsigned x);
/* Return the cosine of the argument, which must be in range 0..360. The result
* is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00.
*/
** is in 8.8 fixed point format, which means that 1.0 = $100 and -1.0 = $FF00.
*/

View File

@@ -34,18 +34,18 @@
/*
* This is the direct console interface for cc65. I do not like the function
* names very much, but the first version started as a rewrite of Borland's
* conio, and, even if the interface has changed, the names did not.
*
* The interface does direct screen I/O, so it is fast enough for most
* programs. I did not implement text windows, since many applications do
* not need them and should not pay for the additional overhead. It should
* be easy to add text windows on a higher level if needed,
*
* Most routines do not check the parameters. This may be unfortunate but is
* also related to speed. The coordinates are always 0/0 based.
*/
** This is the direct console interface for cc65. I do not like the function
** names very much, but the first version started as a rewrite of Borland's
** conio, and, even if the interface has changed, the names did not.
**
** The interface does direct screen I/O, so it is fast enough for most
** programs. I did not implement text windows, since many applications do
** not need them and should not pay for the additional overhead. It should
** be easy to add text windows on a higher level if needed,
**
** Most routines do not check the parameters. This may be unfortunate but is
** also related to speed. The coordinates are always 0/0 based.
*/
@@ -128,9 +128,9 @@ int __fastcall__ vcprintf (const char* format, va_list ap);
char cgetc (void);
/* Return a character from the keyboard. If there is no character available,
* the function waits until the user does press a key. If cursor is set to
* 1 (see below), a blinking cursor is displayed while waiting.
*/
** the function waits until the user does press a key. If cursor is set to
** 1 (see below), a blinking cursor is displayed while waiting.
*/
int cscanf (const char* format, ...);
/* Like scanf(), but uses direct keyboard input */
@@ -140,14 +140,14 @@ int __fastcall__ vcscanf (const char* format, va_list ap);
unsigned char __fastcall__ cursor (unsigned char onoff);
/* If onoff is 1, a cursor is displayed when waiting for keyboard input. If
* onoff is 0, the cursor is hidden when waiting for keyboard input. The
* function returns the old cursor setting.
*/
** onoff is 0, the cursor is hidden when waiting for keyboard input. The
** function returns the old cursor setting.
*/
unsigned char __fastcall__ revers (unsigned char onoff);
/* Enable/disable reverse character display. This may not be supported by
* the output device. Return the old setting.
*/
** the output device. Return the old setting.
*/
unsigned char __fastcall__ textcolor (unsigned char color);
/* Set the color for text output. The old color setting is returned. */
@@ -160,16 +160,16 @@ unsigned char __fastcall__ bordercolor (unsigned char color);
void __fastcall__ chline (unsigned char length);
/* Output a horizontal line with the given length starting at the current
* cursor position.
*/
** cursor position.
*/
void __fastcall__ chlinexy (unsigned char x, unsigned char y, unsigned char length);
/* Same as "gotoxy (x, y); chline (length);" */
void __fastcall__ cvline (unsigned char length);
/* Output a vertical line with the given length at the current cursor
* position.
*/
** position.
*/
void __fastcall__ cvlinexy (unsigned char x, unsigned char y, unsigned char length);
/* Same as "gotoxy (x, y); cvline (length);" */
@@ -196,14 +196,14 @@ void __fastcall__ cputhex16 (unsigned val);
/* On some platforms, functions are not available or are dummys. To suppress
* the call to these functions completely, the platform header files may
* define macros for these functions that start with an underline. If such a
* macro exists, a new macro is defined here, that expands to the one with the
* underline. The reason for this two stepped approach is that it is sometimes
* necessary to take the address of the function, which is not possible when
* using a macro. Since the function prototype is still present, #undefining
* the macro will give access to the actual function.
*/
** the call to these functions completely, the platform header files may
** define macros for these functions that start with an underline. If such a
** macro exists, a new macro is defined here, that expands to the one with the
** underline. The reason for this two stepped approach is that it is sometimes
** necessary to take the address of the function, which is not possible when
** using a macro. Since the function prototype is still present, #undefining
** the macro will give access to the actual function.
*/
#if defined(_textcolor)
# define textcolor(x) _textcolor(x)

View File

@@ -85,12 +85,12 @@ unsigned char __fastcall__ toascii (unsigned char c);
/* When inlining-of-known-functions is enabled, overload most of the above
* functions by macroes. The function prototypes are available again after
* #undef'ing the macroes.
* Please note that the following macroes do NOT handle EOF correctly, as
* stated in the manual. If you need correct behaviour for EOF, don't
* use -Os, or #undefine the following macroes.
*/
** functions by macroes. The function prototypes are available again after
** #undef'ing the macroes.
** Please note that the following macroes do NOT handle EOF correctly, as
** stated in the manual. If you need correct behaviour for EOF, don't
** use -Os, or #undefine the following macroes.
*/
#ifdef __OPT_s__
#define isalnum(c) (__AX__ = (c), \

View File

@@ -34,24 +34,24 @@
/*
* This is the interface to the cc65 debugger. Since many of the functions
* used for the debugger are quite usable even in another context, they
* are declared here.
*
* To use the debugger, just call DbgInit in your application. Once it has
* been called, the debugger will catch any BRK opcode. Use the BREAK macro
* defined below to insert breakpoints into your code.
*
* There are currently a lot of things that cannot be debugged, graphical
* applications are an example. The debugger does not save your screen
* contents, so even your text screen gets destroyed. However, you can
* debug the C and runtime library, even if the debugger is using this
* stuff itself.
*
* Note: When using the debugger, there are some other identifiers with
* external linkage, that start with Dbg. Avoid those names if you use the
* module.
*/
** This is the interface to the cc65 debugger. Since many of the functions
** used for the debugger are quite usable even in another context, they
** are declared here.
**
** To use the debugger, just call DbgInit in your application. Once it has
** been called, the debugger will catch any BRK opcode. Use the BREAK macro
** defined below to insert breakpoints into your code.
**
** There are currently a lot of things that cannot be debugged, graphical
** applications are an example. The debugger does not save your screen
** contents, so even your text screen gets destroyed. However, you can
** debug the C and runtime library, even if the debugger is using this
** stuff itself.
**
** Note: When using the debugger, there are some other identifiers with
** external linkage, that start with Dbg. Avoid those names if you use the
** module.
*/
@@ -68,35 +68,35 @@
unsigned __fastcall__ DbgDisAsm (unsigned Addr, char* Buf, unsigned char Len);
/* Disassemble one instruction at address addr into the given buffer.
* The resulting line has the format, "AAAA__BB_BB_BB___OPC_OPERAND",
* where AAAA is the hexadecimal representation of addr, BB are the
* bytes (in hex) that make the instruction, OPC is the mnemonic, and
* OPERAND is an operand for the instruction.
* The buffer is filled with spaces up to the given length and terminated as
* a usual C string. NOTE: Buf must be able to hold Len+1 characters.
* The function returns the length of the disassembled instruction, so,
* to disassemble the next instruction, add the return value to addr
* and call the function again.
*/
** The resulting line has the format, "AAAA__BB_BB_BB___OPC_OPERAND",
** where AAAA is the hexadecimal representation of addr, BB are the
** bytes (in hex) that make the instruction, OPC is the mnemonic, and
** OPERAND is an operand for the instruction.
** The buffer is filled with spaces up to the given length and terminated as
** a usual C string. NOTE: Buf must be able to hold Len+1 characters.
** The function returns the length of the disassembled instruction, so,
** to disassemble the next instruction, add the return value to addr
** and call the function again.
*/
unsigned __fastcall__ DbgDisAsmLen (unsigned Addr);
/* Disassemble one instruction, but do only return the length, do not
* create a visible representation. This function is useful when
* disassembling backwards, it is much faster than DbgDisAsm.
*/
** create a visible representation. This function is useful when
** disassembling backwards, it is much faster than DbgDisAsm.
*/
int __fastcall__ DbgIsRAM (unsigned Addr);
/* Return true if we can read and write the given address */
char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len);
/* Create a line of a memory dump in the given buffer. The buffer contains
* the starting address (4 digits hex), then Len bytes in this format:
* "AAAA__XX_YY_ZZ_...". The passed char buffer must hold Len*3+5 bytes
* plus a terminator byte.
* The function does not work correctly if the created string is longer
* than 255 bytes.
* The return value is Buf.
*/
** the starting address (4 digits hex), then Len bytes in this format:
** "AAAA__XX_YY_ZZ_...". The passed char buffer must hold Len*3+5 bytes
** plus a terminator byte.
** The function does not work correctly if the created string is longer
** than 255 bytes.
** The return value is Buf.
*/
@@ -108,8 +108,8 @@ char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len);
void __fastcall__ DbgInit (unsigned unused);
/* Initialize the debugger. Use 0 as parameter. The debugger will popup on
* next brk encountered.
*/
** next brk encountered.
*/
#define BREAK() __asm__ ("brk")
/* Use this to insert breakpoints into your code */

View File

@@ -36,10 +36,10 @@
/* Please note: All functions in this file will set _oserror *and* return its
* value. The only exception is dio_open, which will return NULL, but _oserror
* will be set. All function will also set _oserror in case of successful
* execution, effectively clearing it.
*/
** value. The only exception is dio_open, which will return NULL, but _oserror
** will be set. All function will also set _oserror in case of successful
** execution, effectively clearing it.
*/

View File

@@ -56,10 +56,10 @@
#define EM_ERR_INSTALLED 5 /* A driver is already installed */
/* Parameters for the em_copy_... functions. NOTE: The first seven bytes
* have the same order and alignment as needed for the Commodore REU, so
* don't change the order without changing the assembler file that defines
* the struct offsets and the code in the REU driver.
*/
** have the same order and alignment as needed for the Commodore REU, so
** don't change the order without changing the assembler file that defines
** the struct offsets and the code in the REU driver.
*/
struct em_copy {
void* buf; /* Memory buffer to copy from or to */
unsigned char offs; /* Offset into page */
@@ -87,44 +87,44 @@ unsigned char __fastcall__ em_install (void* driver);
unsigned char em_uninstall (void);
/* Uninstall the currently loaded driver and return an error code.
* Note: This call does not free allocated memory.
*/
** Note: This call does not free allocated memory.
*/
unsigned em_pagecount (void);
/* Return the total number of 256 byte pages available in extended memory. */
void* __fastcall__ em_map (unsigned page);
/* Unmap the current page from memory and map a new one. The function returns
* a pointer to the location of the page in memory. Note: Without calling
* em_commit, the old contents of the memory window may be lost!
*/
** a pointer to the location of the page in memory. Note: Without calling
** em_commit, the old contents of the memory window may be lost!
*/
void* __fastcall__ em_use (unsigned page);
/* Tell the driver that the memory window is associated with a given page.
* This call is very similar to em_map. The difference is that the driver
* does not necessarily transfer the current contents of the extended
* memory into the returned window. If you're going to just write to the
* window and the current contents of the window are invalid or no longer
* use, this call may perform better than em_map.
*/
** This call is very similar to em_map. The difference is that the driver
** does not necessarily transfer the current contents of the extended
** memory into the returned window. If you're going to just write to the
** window and the current contents of the window are invalid or no longer
** use, this call may perform better than em_map.
*/
void em_commit (void);
/* Commit changes in the memory window to extended storage. If the contents
* of the memory window have been changed, these changes may be lost if
* em_map, em_copyfrom or em_copyto are called without calling em_commit
* first. Note: Not calling em_commit does not mean that the changes are
* discarded, it does just mean that some drivers will discard the changes.
*/
** of the memory window have been changed, these changes may be lost if
** em_map, em_copyfrom or em_copyto are called without calling em_commit
** first. Note: Not calling em_commit does not mean that the changes are
** discarded, it does just mean that some drivers will discard the changes.
*/
void __fastcall__ em_copyfrom (const struct em_copy* copy_data);
/* Copy from extended into linear memory. Note: This may invalidate the
* currently mapped page.
*/
** currently mapped page.
*/
void __fastcall__ em_copyto (const struct em_copy* copy_data);
/* Copy from linear into extended memory. Note: This may invalidate the
* currently mapped page.
*/
** currently mapped page.
*/

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 2002-2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -45,8 +45,8 @@
/* A structure that describes the header of an extended memory driver loaded
* into memory.
*/
** into memory.
*/
typedef struct {
/* Driver header */

View File

@@ -84,23 +84,23 @@ extern int _errno;
int __fastcall__ _osmaperrno (unsigned char oserror);
/* Map an operating system specific error code (for example from _oserror)
* into one of the E... codes above. It is user callable.
*/
** into one of the E... codes above. It is user callable.
*/
unsigned char __fastcall__ _seterrno (unsigned char code);
/* Set errno to a specific error code and return zero. Used by the library */
int __fastcall__ _directerrno (unsigned char code);
/* Set errno to a specific error code, clear _oserror and return -1. Used
* by the library.
*/
** by the library.
*/
int __fastcall__ _mappederrno (unsigned char code);
/* Set _oserror to the given platform specific error code. If it is a real
* error code (not zero) set errno to the corresponding system error code
* and return -1. Otherwise return zero.
* Used by the library.
*/
** error code (not zero) set errno to the corresponding system error code
** and return -1. Otherwise return zero.
** Used by the library.
*/

View File

@@ -34,9 +34,9 @@
/* Note: This file is not fully ISO 9899-1999 compliant because cc65 lacks
* a 64 bit data types and is not able to return structs > 4 bytes. The
* declarations have been adjusted accordingly or left out.
*/
** a 64 bit data types and is not able to return structs > 4 bytes. The
** declarations have been adjusted accordingly or left out.
*/

View File

@@ -99,8 +99,8 @@ unsigned char __fastcall__ joy_install (void* driver);
unsigned char joy_uninstall (void);
/* Uninstall the currently loaded driver and return an error code.
* Note: This call does not free allocated memory.
*/
** Note: This call does not free allocated memory.
*/
unsigned char joy_count (void);
/* Return the number of joysticks supported by the driver */

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 2002-2006, Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -45,8 +45,8 @@
/* A structure that describes the header of a joystick driver loaded into
* memory.
*/
** memory.
*/
typedef struct {
/* Driver header */
@@ -88,4 +88,3 @@ void joy_clear_ptr (void);

View File

@@ -34,8 +34,8 @@
/* Exports structures and functions to load relocatable o65 modules at
* runtime.
*/
** runtime.
*/
@@ -45,22 +45,22 @@
/* The following struct is passed to the module loader. It contains stuff,
* the loader needs to work, and another area where the loader will place
* informational data if it was successful. You will have to check the return
* code of mod_load before accessing any of these additional struct members.
*/
** the loader needs to work, and another area where the loader will place
** informational data if it was successful. You will have to check the return
** code of mod_load before accessing any of these additional struct members.
*/
struct mod_ctrl {
/* Parameters passed into the loader routine. The member callerdata
* is an opaque 16 bit datatype that may be used by the caller to
* pass data through to the read routine. The read routine is used by the
* loader to load any required data. There are several calls where the
* read routine is passed a count of 1, so you may choose to make this
* a special case when implementing read(). The read() should return the
* number of bytes actually read. If the return value differs from the
* passed count, this is considered an error.
* NOTE: read() is designed so that the POSIX read() routine can be used
* for this vector, if you're loading from disk.
*/
** is an opaque 16 bit datatype that may be used by the caller to
** pass data through to the read routine. The read routine is used by the
** loader to load any required data. There are several calls where the
** read routine is passed a count of 1, so you may choose to make this
** a special case when implementing read(). The read() should return the
** number of bytes actually read. If the return value differs from the
** passed count, this is considered an error.
** NOTE: read() is designed so that the POSIX read() routine can be used
** for this vector, if you're loading from disk.
*/
int __fastcall__ (*read) (int callerdata, void* buffer, unsigned count);
int callerdata;
@@ -74,15 +74,15 @@ struct mod_ctrl {
unsigned char __fastcall__ mod_load (struct mod_ctrl* ctrl);
/* Load a module into memory and relocate it. The function will return an
* error code (see below). If MLOAD_OK is returned, the outgoing fields in
* the passed mod_ctrl struct contain information about the module just
* loaded.
*/
** error code (see below). If MLOAD_OK is returned, the outgoing fields in
** the passed mod_ctrl struct contain information about the module just
** loaded.
*/
void __fastcall__ mod_free (void* module);
/* Free a loaded module. Note: The given pointer is the pointer to the
* module memory, not a pointer to a control structure.
*/
** module memory, not a pointer to a control structure.
*/

View File

@@ -79,9 +79,9 @@ struct mouse_box {
};
/* Structure containing mouse callback functions. These functions are declared
* in C notation here, but they cannot be C functions (at least not easily),
* since they may be called from within an interrupt.
*/
** in C notation here, but they cannot be C functions (at least not easily),
** since they may be called from within an interrupt.
*/
struct mouse_callbacks {
void (*hide) (void);
@@ -92,23 +92,23 @@ struct mouse_callbacks {
void (*prep) (void);
/* Prepare to move the mouse cursor. This function is called,
* even when the cursor is currently invisible.
*/
** even when the cursor is currently invisible.
*/
void (*draw) (void);
/* Draw the mouse cursor. This function is called,
* even when the cursor is currently invisible.
*/
** even when the cursor is currently invisible.
*/
void __fastcall__ (*movex) (int x);
/* Move the mouse cursor to the new X coordinate. This function is called,
* even when the cursor is currently invisible.
*/
** even when the cursor is currently invisible.
*/
void __fastcall__ (*movey) (int y);
/* Move the mouse cursor to the new Y coordinate. This function is called,
* even when the cursor is currently invisible.
*/
** even when the cursor is currently invisible.
*/
};
@@ -155,43 +155,43 @@ const char* __fastcall__ mouse_geterrormsg (unsigned char code);
void mouse_hide (void);
/* Hide the mouse. The function manages a counter and may be called more than
* once. For each call to mouse_hide there must be a call to mouse_show to make
* the mouse visible again.
*/
** once. For each call to mouse_hide there must be a call to mouse_show to make
** the mouse visible again.
*/
void mouse_show (void);
/* Show the mouse. See mouse_hide() for more information. */
void __fastcall__ mouse_setbox (const struct mouse_box* box);
/* Set the bounding box for the mouse pointer movement. The mouse X and Y
* coordinates will never go outside the given box.
* NOTE: The function does *not* check if the mouse is currently inside the
* given margins. The proper way to use this function therefore is:
*
* - Hide the mouse
* - Set the bounding box
* - Place the mouse at the desired position
* - Show the mouse again.
*
* NOTE2: When setting the box to something that is larger than the actual
* screen, the positioning of the mouse cursor can fail. If such margins
* are really what you want, you have to use your own cursor routines.
*/
** coordinates will never go outside the given box.
** NOTE: The function does *not* check if the mouse is currently inside the
** given margins. The proper way to use this function therefore is:
**
** - Hide the mouse
** - Set the bounding box
** - Place the mouse at the desired position
** - Show the mouse again.
**
** NOTE2: When setting the box to something that is larger than the actual
** screen, the positioning of the mouse cursor can fail. If such margins
** are really what you want, you have to use your own cursor routines.
*/
void __fastcall__ mouse_getbox (struct mouse_box* box);
/* Get the current bounding box for the mouse pointer movement. */
void __fastcall__ mouse_move (int x, int y);
/* Set the mouse cursor to the given position. If a mouse cursor is defined
* and currently visible, the mouse cursor is also moved.
* NOTE: This function does not check if the given position is valid and
* inside the bounding box.
*/
** and currently visible, the mouse cursor is also moved.
** NOTE: This function does not check if the given position is valid and
** inside the bounding box.
*/
unsigned char mouse_buttons (void);
/* Return a bit mask encoding the states of the mouse buttons. Use the
* MOUSE_BTN_XXX flags to decode a specific button.
*/
** MOUSE_BTN_XXX flags to decode a specific button.
*/
void __fastcall__ mouse_pos (struct mouse_pos* pos);
/* Return the current mouse position. */
@@ -201,8 +201,8 @@ void __fastcall__ mouse_info (struct mouse_info* info);
unsigned char __fastcall__ mouse_ioctl (unsigned char code, void* data);
/* Call the driver-specific ioctl function. Return an error code.
* NON-PORTABLE!
*/
** NON-PORTABLE!
*/

View File

@@ -34,12 +34,12 @@
/* This files exports structures and constants to handle the o65 relocatable
* file format as defined by Andre Fachat. See the original document under
*
* http://www.6502.org/users/andre/o65/fileformat.html
*
* for more information.
*/
** file format as defined by Andre Fachat. See the original document under
**
** http://www.6502.org/users/andre/o65/fileformat.html
**
** for more information.
*/

View File

@@ -54,20 +54,20 @@ extern void __fastcall__ (*pen_adjuster) (unsigned char *pValue);
void __fastcall__ pen_calibrate (unsigned char *XOffset);
/* Ask the user to help to calibrate a lightpen. Changes the screen!
* A pointer to this function can be put into pen_adjuster.
*/
** A pointer to this function can be put into pen_adjuster.
*/
void __fastcall__ pen_adjust (const char *filename);
/* Get a lightpen calibration value from a file if it exists. Otherwise, call
* pen_calibrate() to create a value; then, write it into a file, so that it
* will be available at the next time that the lightpen is used.
* Might change the screen.
* pen_adjust() is optional; if you want to use its feature,
* then it must be called before a driver is installed.
* Note: This function merely saves the file-name pointer, and sets
* the pen_adjuster pointer. The file will be read only when a driver
* is installed, and only if that driver wants to be calibrated.
*/
** pen_calibrate() to create a value; then, write it into a file, so that it
** will be available at the next time that the lightpen is used.
** Might change the screen.
** pen_adjust() is optional; if you want to use its feature,
** then it must be called before a driver is installed.
** Note: This function merely saves the file-name pointer, and sets
** the pen_adjuster pointer. The file will be read only when a driver
** is installed, and only if that driver wants to be calibrated.
*/

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 1998-2005 Ullrich von Bassewitz */
/* R<EFBFBD>merstra<EFBFBD>e 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -92,9 +92,9 @@ extern void pet_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
/* The following #defines will cause the matching functions calls in conio.h
* to be overlaid by macros with the same names, saving the function call
* overhead.
*/
** to be overlaid by macros with the same names, saving the function call
** overhead.
*/
#define _textcolor(color) COLOR_WHITE
#define _bgcolor(color) COLOR_BLACK
#define _bordercolor(color) COLOR_BLACK

View File

@@ -92,8 +92,8 @@
#define SER_HS_SW 0x02 /* Software handshake */
/* Bit masks to mask out things from the status returned by ser_status.
* These are 6551 specific and must be mapped by drivers for other chips.
*/
** These are 6551 specific and must be mapped by drivers for other chips.
*/
#define SER_STATUS_PE 0x01 /* Parity error */
#define SER_STATUS_FE 0x02 /* Framing error */
#define SER_STATUS_OE 0x04 /* Overrun error */
@@ -141,8 +141,8 @@ unsigned char __fastcall__ ser_install (void* driver);
unsigned char ser_uninstall (void);
/* Uninstall the currently loaded driver and return an error code.
* Note: This call does not free allocated memory.
*/
** Note: This call does not free allocated memory.
*/
unsigned char __fastcall__ ser_open (const struct ser_params* params);
/* "Open" the port by setting the port parameters and enable interrupts. */
@@ -152,14 +152,14 @@ unsigned char ser_close (void);
unsigned char __fastcall__ ser_get (char* b);
/* Get a character from the serial port. If no characters are available, the
* function will return SER_ERR_NO_DATA, so this is not a fatal error.
*/
** function will return SER_ERR_NO_DATA, so this is not a fatal error.
*/
unsigned char __fastcall__ ser_put (char b);
/* Send a character via the serial port. There is a transmit buffer, but
* transmitting is not done via interrupt. The function returns
* SER_ERR_OVERFLOW if there is no space left in the transmit buffer.
*/
** transmitting is not done via interrupt. The function returns
** SER_ERR_OVERFLOW if there is no space left in the transmit buffer.
*/
unsigned char __fastcall__ ser_status (unsigned char* status);
/* Return the serial port status. */

View File

@@ -34,8 +34,8 @@
/* Note: This file is not fully ISO 9899-1999 compliant because cc65 lacks
* a 64 bit data types. The declarations have been adjusted accordingly.
*/
** a 64 bit data types. The declarations have been adjusted accordingly.
*/

View File

@@ -71,13 +71,13 @@ void __fastcall__ free (void* block);
#if __CC65_STD__ == __CC65_STD_CC65__
int __fastcall__ posix_memalign (void** memptr, size_t alignment, size_t size);
/* Allocate a block of memory with the given "size", which is aligned to a
* memory address that is a multiple of "alignment". "alignment" MUST NOT be
* zero, and MUST be a power of two; otherwise, this function will return
* EINVAL. The function returns ENOMEM if not enough memory is available
* to satisfy the request. "memptr" must point to a variable; that variable
* will return the address of the allocated memory. Use free() to release that
* allocated block.
*/
** memory address that is a multiple of "alignment". "alignment" MUST NOT be
** zero, and MUST be a power of two; otherwise, this function will return
** EINVAL. The function returns ENOMEM if not enough memory is available
** to satisfy the request. "memptr" must point to a variable; that variable
** will return the address of the allocated memory. Use free() to release that
** allocated block.
*/
#endif
void __fastcall__ _heapadd (void* mem, size_t size);

View File

@@ -65,8 +65,8 @@ void* __fastcall__ memmove (void* dest, const void* src, size_t count);
void* __fastcall__ memset (void* s, int c, size_t count);
/* The following is an internal function, the compiler will replace memset
* with it if the fill value is zero. Never use this one directly!
*/
** with it if the fill value is zero. Never use this one directly!
*/
void* __fastcall__ _bzero (void* ptr, size_t n);
/* Non standard: */

View File

@@ -98,9 +98,9 @@ struct __sv_dma {
/* Counters incremented asynchronously!
* If you want more complex, copy the crt0.s file from the libsrc/supervision
* directory and code them yourself (in assembler)
*/
** If you want more complex, copy the crt0.s file from the libsrc/supervision
** directory and code them yourself (in assembler)
*/
extern unsigned char sv_nmi_counter;
extern unsigned char sv_timer_irq_counter;
extern unsigned char sv_timer_dma_counter;

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 2003 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -45,30 +45,30 @@
/*
* Suggested field contents:
*
* sysname
* Should contain the name of the underlying operating system, or "cc65"
* if the program runs on the bare machine.
*
* nodename
* Is empty or may be defined by the implementor.
*
* release
* Contains the operating system release or the major/minor cc65 version
* if sysname contains "cc65".
*
* version
* Contains the operating system version or the cc65 patch version if
* sysname contains "cc65".
*
* machine
* Contains the complete name of the machine, like "Commodore 64",
* "Oric Atmos" or similar.
*
* Beware: The library sources written in assembler have knowledge about this
* struct!
*/
** Suggested field contents:
**
** sysname
** Should contain the name of the underlying operating system, or "cc65"
** if the program runs on the bare machine.
**
** nodename
** Is empty or may be defined by the implementor.
**
** release
** Contains the operating system release or the major/minor cc65 version
** if sysname contains "cc65".
**
** version
** Contains the operating system version or the cc65 patch version if
** sysname contains "cc65".
**
** machine
** Contains the complete name of the machine, like "Commodore 64",
** "Oric Atmos" or similar.
**
** Beware: The library sources written in assembler have knowledge about this
** struct!
*/
struct utsname {
char sysname[17];
char nodename[9];

View File

@@ -80,44 +80,44 @@ void __fastcall__ tgi_load_driver (const char* name);
void tgi_unload (void);
/* Uninstall, then unload the currently loaded driver. Will call tgi_done if
* necessary.
*/
** necessary.
*/
void __fastcall__ tgi_install (void* driver);
/* Install an already loaded driver. */
void tgi_uninstall (void);
/* Uninstall the currently loaded driver but do not unload it. Will call
* tgi_done if necessary.
*/
** tgi_done if necessary.
*/
void tgi_init (void);
/* Initialize the already loaded graphics driver. */
void tgi_done (void);
/* End graphics mode, switch back to text mode. Will NOT uninstall or unload
* the driver!
*/
** the driver!
*/
const tgi_vectorfont* __fastcall__ tgi_load_vectorfont (const char* name);
/* Load a vector font into memory and return it. In case of errors, NULL is
* returned and an error is set, which can be retrieved using tgi_geterror.
* To use the font, it has to be installed using tgi_install_vectorfont.
*/
** returned and an error is set, which can be retrieved using tgi_geterror.
** To use the font, it has to be installed using tgi_install_vectorfont.
*/
void __fastcall__ tgi_install_vectorfont (const tgi_vectorfont* font);
/* Install a vector font for use. More than one vector font can be loaded,
* but only one can be active. This function is used to tell which one. Call
* with a NULL pointer to uninstall the currently installed font.
*/
** but only one can be active. This function is used to tell which one. Call
** with a NULL pointer to uninstall the currently installed font.
*/
void __fastcall__ tgi_free_vectorfont (const tgi_vectorfont* font);
/* Free a vector font that was previously loaded into memory. */
unsigned char tgi_geterror (void);
/* Return the error code for the last operation. This will also clear the
* error.
*/
** error.
*/
const char* __fastcall__ tgi_geterrormsg (unsigned char code);
/* Get an error message describing the error in code. */
@@ -139,8 +139,8 @@ unsigned char tgi_getcolorcount (void);
unsigned char tgi_getmaxcolor (void);
/* Return the maximum supported color number (the number of colors would
* then be getmaxcolor()+1).
*/
** then be getmaxcolor()+1).
*/
void __fastcall__ tgi_setcolor (unsigned char color);
/* Set the current drawing color. */
@@ -150,8 +150,8 @@ unsigned char tgi_getcolor (void);
void __fastcall__ tgi_setpalette (const unsigned char* palette);
/* Set the palette (not available with all drivers/hardware). palette is
* a pointer to as many entries as there are colors.
*/
** a pointer to as many entries as there are colors.
*/
const unsigned char* tgi_getpalette (void);
/* Return the current palette. */
@@ -164,26 +164,26 @@ unsigned tgi_getxres (void);
unsigned tgi_getmaxx (void);
/* Return the maximum x coordinate. The resolution in x direction is
* getmaxx() + 1
*/
** getmaxx() + 1
*/
unsigned tgi_getyres (void);
/* Return the resolution in Y direction. */
unsigned tgi_getmaxy (void);
/* Return the maximum y coordinate. The resolution in y direction is
* getmaxy() + 1
*/
** getmaxy() + 1
*/
unsigned tgi_getaspectratio (void);
/* Returns the aspect ratio for the loaded driver. The aspect ratio is an
* 8.8 fixed point value.
*/
** 8.8 fixed point value.
*/
void __fastcall__ tgi_setaspectratio (unsigned aspectratio);
/* Set a new aspect ratio for the loaded driver. The aspect ratio is an
* 8.8 fixed point value.
*/
** 8.8 fixed point value.
*/
unsigned char __fastcall__ tgi_getpixel (int x, int y);
/* Get the color value of a pixel. */
@@ -196,89 +196,89 @@ void __fastcall__ tgi_gotoxy (int x, int y);
void __fastcall__ tgi_line (int x1, int y1, int x2, int y2);
/* Draw a line in the current drawing color. The graphics cursor will
* be set to x2/y2 by this call.
*/
** be set to x2/y2 by this call.
*/
void __fastcall__ tgi_lineto (int x2, int y2);
/* Draw a line in the current drawing color from the graphics cursor to the
* new end point. The graphics cursor will be updated to x2/y2.
*/
** new end point. The graphics cursor will be updated to x2/y2.
*/
void __fastcall__ tgi_circle (int x, int y, unsigned char radius);
/* Draw a circle in the current drawing color. */
void __fastcall__ tgi_ellipse (int x, int y, unsigned char rx, unsigned char ry);
/* Draw a full ellipse with center at x/y and radii rx/ry using the current
* drawing color.
*/
** drawing color.
*/
void __fastcall__ tgi_arc (int x, int y, unsigned char rx, unsigned char ry,
unsigned sa, unsigned ea);
/* Draw an ellipse arc with center at x/y and radii rx/ry using the current
* drawing color. The arc covers the angle between sa and ea (startangle and
* endangle), which must be in the range 0..360 (otherwise the function may
* bevave unextectedly).
*/
** drawing color. The arc covers the angle between sa and ea (startangle and
** endangle), which must be in the range 0..360 (otherwise the function may
** bevave unextectedly).
*/
void __fastcall__ tgi_pieslice (int x, int y, unsigned char rx, unsigned char ry,
unsigned sa, unsigned ea);
/* Draw an ellipse pie slice with center at x/y and radii rx/ry using the
* current drawing color. The pie slice covers the angle between sa and ea
* (startangle and endangle), which must be in the range 0..360 (otherwise the
* function may behave unextectedly).
*/
** current drawing color. The pie slice covers the angle between sa and ea
** (startangle and endangle), which must be in the range 0..360 (otherwise the
** function may behave unextectedly).
*/
void __fastcall__ tgi_bar (int x1, int y1, int x2, int y2);
/* Draw a bar (a filled rectangle) using the current color. */
void __fastcall__ tgi_settextdir (unsigned char dir);
/* Set the direction for text output. dir is one of the TGI_TEXT_XXX
* constants.
*/
** constants.
*/
void __fastcall__ tgi_settextscale (unsigned width, unsigned height);
/* Set the scaling for text output. The scaling factors for width and height
* are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
*/
** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
*/
void __fastcall__ tgi_settextstyle (unsigned width, unsigned height,
unsigned char dir, unsigned char font);
/* Set the style for text output. The scaling factors for width and height
* are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
* dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX
* constants.
*/
** are 8.8 fixed point values. This means that $100 = 1 $200 = 2 etc.
** dir is one of the TGI_TEXT_XXX constants. font is one of the TGI_FONT_XXX
** constants.
*/
unsigned __fastcall__ tgi_gettextwidth (const char* s);
/* Calculate the width of the text in pixels according to the current text
* style.
*/
** style.
*/
unsigned __fastcall__ tgi_gettextheight (const char* s);
/* Calculate the height of the text in pixels according to the current text
* style.
*/
** style.
*/
void __fastcall__ tgi_outtext (const char* s);
/* Output text at the current graphics cursor position. The graphics cursor
* is moved to the end of the text.
*/
** is moved to the end of the text.
*/
void __fastcall__ tgi_outtextxy (int x, int y, const char* s);
/* Output text at the given cursor position. The graphics cursor is moved to
* the end of the text.
*/
** the end of the text.
*/
unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);
/* Call the driver specific control function. What this function does for
* a specific code depends on the driver. The driver will set an error
* for unknown codes or values.
*/
** a specific code depends on the driver. The driver will set an error
** for unknown codes or values.
*/
int __fastcall__ tgi_imulround (int rhs, int lhs);
/* Helper function for functions using sine/cosine: Multiply two values, one
* being an 8.8 fixed point one, and return the rounded and scaled result.
*/
** being an 8.8 fixed point one, and return the rounded and scaled result.
*/

View File

@@ -78,8 +78,8 @@ struct tgi_vectorfont {
void __fastcall__ tgi_vectorchar (char C);
/* Draw one character of the vector font at the current graphics cursor
* position using the current font magnification.
*/
** position using the current font magnification.
*/

View File

@@ -7,7 +7,7 @@
/* */
/* */
/* (C) 1998-2012 Ullrich von Bassewitz */
/* R<EFBFBD>merstrasse 52 */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -104,7 +104,8 @@ unsigned _clocks_per_sec (void);
# define CLOCKS_PER_SEC 1 /* ANSI */
#elif defined(__LYNX__)
/* The clock-rate depends on the video scan-rate;
** so, read it at run-time. */
** so, read it at run-time.
*/
extern clock_t _clk_tck (void);
# define CLK_TCK _clk_tck()
# define CLOCKS_PER_SEC _clk_tck()
@@ -114,10 +115,10 @@ extern clock_t _clk_tck (void);
time_t _systime (void);
/* Similar to time(), but:
* - Is not ISO C
* - Does not take the additional pointer
* - Does not set errno when returning -1
*/
** - Is not ISO C
** - Does not take the additional pointer
** - Does not set errno when returning -1
*/
/* ISO C function prototypes */
char* __fastcall__ asctime (const struct tm* timep);