1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-21 20:29:24 +00:00

Merge pull request #2558 from polluks/cpp

Clean-up preprocessor syntax
This commit is contained in:
Bob Andrews 2024-12-15 23:02:35 +01:00 committed by GitHub
commit a53524b9de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 25 additions and 25 deletions

View File

@ -1370,7 +1370,7 @@ sequences of the input.
Example: Example:
<tscreen><verb> <tscreen><verb>
/* Use a space wherever an 'a' occurs in ISO-8859-1 source */ /* Use a space wherever an 'a' occurs in ISO-8859-1 source */
#pragma charmap (0x61, 0x20); #pragma charmap (0x61, 0x20)
</verb></tscreen> </verb></tscreen>

View File

@ -40,7 +40,7 @@
/* Use static local variables for speed */ /* Use static local variables for speed */
#pragma static-locals (on); #pragma static-locals (on)

View File

@ -56,7 +56,7 @@
/* Use static local variables for speed */ /* Use static local variables for speed */
#pragma static-locals (1); #pragma static-locals (1)

View File

@ -51,7 +51,7 @@
/* Use static local variables for speed */ /* Use static local variables for speed */
#pragma static-locals (1); #pragma static-locals (1)
static const unsigned char sinustable[0x100] = { static const unsigned char sinustable[0x100] = {

View File

@ -27,7 +27,7 @@ void show(char *name)
** rather place the all the code of certain source files into the overlay by ** rather place the all the code of certain source files into the overlay by
** compiling them with --code-name OVERLAY1. ** compiling them with --code-name OVERLAY1.
*/ */
#pragma code-name(push, "OVERLAY1"); #pragma code-name(push, "OVERLAY1")
void foo(void) void foo(void)
{ {
@ -39,27 +39,27 @@ void foo(void)
show("One"); show("One");
} }
#pragma code-name(pop); #pragma code-name(pop)
#pragma code-name(push, "OVERLAY2"); #pragma code-name(push, "OVERLAY2")
void bar(void) void bar(void)
{ {
show("Two"); show("Two");
} }
#pragma code-name(pop); #pragma code-name(pop)
#pragma code-name(push, "OVERLAY3"); #pragma code-name(push, "OVERLAY3")
void foobar (void) void foobar (void)
{ {
show("Three"); show("Three");
} }
#pragma code-name(pop); #pragma code-name(pop)
void main(int /*argc*/, char *argv[]) void main(int /*argc*/, char *argv[])

View File

@ -26,7 +26,7 @@
#define divfp(_a,_b) ((((signed long)_a)<<fpshift)/(_b)) #define divfp(_a,_b) ((((signed long)_a)<<fpshift)/(_b))
/* Use static local variables for speed */ /* Use static local variables for speed */
#pragma static-locals (1); #pragma static-locals (1)

View File

@ -41,7 +41,7 @@
#endif #endif
/* Use static local variables for speed */ /* Use static local variables for speed */
#pragma static-locals (1); #pragma static-locals (1)

View File

@ -64,34 +64,34 @@ void log (char *msg)
** rather place all the code of certain source files into the overlay by ** rather place all the code of certain source files into the overlay by
** compiling them with --code-name OVERLAY1. ** compiling them with --code-name OVERLAY1.
*/ */
#pragma code-name (push, "OVERLAY1"); #pragma code-name (push, "OVERLAY1")
void foo (void) void foo (void)
{ {
log ("Calling main from overlay 1"); log ("Calling main from overlay 1");
} }
#pragma code-name (pop); #pragma code-name (pop)
#pragma code-name (push, "OVERLAY2"); #pragma code-name (push, "OVERLAY2")
void bar (void) void bar (void)
{ {
log ("Calling main from overlay 2"); log ("Calling main from overlay 2");
} }
#pragma code-name (pop); #pragma code-name (pop)
#pragma code-name (push, "OVERLAY3"); #pragma code-name (push, "OVERLAY3")
void foobar (void) void foobar (void)
{ {
log ("Calling main from overlay 3"); log ("Calling main from overlay 3");
} }
#pragma code-name(pop); #pragma code-name(pop)
unsigned char loademdriver (void) unsigned char loademdriver (void)

View File

@ -39,7 +39,7 @@ void log (char *msg)
** rather place all the code of certain source files into the overlay by ** rather place all the code of certain source files into the overlay by
** compiling them with --code-name OVERLAY1. ** compiling them with --code-name OVERLAY1.
*/ */
#pragma code-name (push, "OVERLAY1"); #pragma code-name (push, "OVERLAY1")
void foo (void) void foo (void)
{ {
@ -51,27 +51,27 @@ void foo (void)
log ("Calling main from overlay 1"); log ("Calling main from overlay 1");
} }
#pragma code-name (pop); #pragma code-name (pop)
#pragma code-name (push, "OVERLAY2"); #pragma code-name (push, "OVERLAY2")
void bar (void) void bar (void)
{ {
log ("Calling main from overlay 2"); log ("Calling main from overlay 2");
} }
#pragma code-name (pop); #pragma code-name (pop)
#pragma code-name (push, "OVERLAY3"); #pragma code-name (push, "OVERLAY3")
void foobar (void) void foobar (void)
{ {
log ("Calling main from overlay 3"); log ("Calling main from overlay 3");
} }
#pragma code-name(pop); #pragma code-name(pop)
unsigned char loadfile (char *name, void *addr, void *size) unsigned char loadfile (char *name, void *addr, void *size)

View File

@ -38,7 +38,7 @@ static unsigned char Sieve[COUNT];
#pragma static-locals(1); #pragma static-locals(1)