From 82bdc77e41b4e46471ce26be3580f641afe730ac Mon Sep 17 00:00:00 2001 From: Wayne Parham Date: Wed, 16 Jun 2021 16:47:38 -0500 Subject: [PATCH] puts() whitespace style change --- targettest/sym1/symDisplay.c | 10 ++++---- targettest/sym1/symHello.c | 2 +- targettest/sym1/symIO.c | 26 ++++++++++---------- targettest/sym1/symNotepad.c | 46 ++++++++++++++++++------------------ targettest/sym1/symTiny.c | 8 +++---- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/targettest/sym1/symDisplay.c b/targettest/sym1/symDisplay.c index 9176b5234..350d261f9 100644 --- a/targettest/sym1/symDisplay.c +++ b/targettest/sym1/symDisplay.c @@ -30,22 +30,22 @@ int main (void) { buffer[i] = c; i++; if( i == 40 ) { - puts( "\n\n--- Reached 40 character limit. ---" ); + puts ("\n\n--- Reached 40 character limit. ---"); } } i--; // index is one past end while( z == 0 ) { - puts( "\n\nHow many times (0 for forever) to repeat?" ); + puts ("\n\nHow many times (0 for forever) to repeat?"); c = getchar(); if( (c >= '0') && (c <= '9') ) { // between 1 and 9 loops allowed z = 1; // a number was pressed t = c - '0'; // convert char to int - puts( "\n\nLook at the front panel.\n" ); + puts ("\n\nLook at the front panel.\n"); } else { - puts( "\nWhat?" ); + puts ("\nWhat?"); z = 0; // keep asking for a number } } @@ -352,7 +352,7 @@ int main (void) { } } - puts( "\n\nEnjoy your day!\n\n" ); + puts ("\n\nEnjoy your day!\n\n"); return 0; } diff --git a/targettest/sym1/symHello.c b/targettest/sym1/symHello.c index a37bc1994..8ca3ac4aa 100644 --- a/targettest/sym1/symHello.c +++ b/targettest/sym1/symHello.c @@ -9,7 +9,7 @@ #include #include -int main(void) { +int main (void) { char c = 0x00; int d = 0x00; int l = 0x00; diff --git a/targettest/sym1/symIO.c b/targettest/sym1/symIO.c index 0659b71f3..65bd6e2e1 100644 --- a/targettest/sym1/symIO.c +++ b/targettest/sym1/symIO.c @@ -11,7 +11,7 @@ #include #include -int main(void) { +int main (void) { unsigned char ddr1a = 0x00; unsigned char ior1a = 0x00; unsigned char ddr1b = 0x00; @@ -51,21 +51,21 @@ int main(void) { ddr3b = VIA3.ddrb; ior3b = VIA3.prb; - puts( "================== Digital I/O Status ==================" ); - puts( " Port1A Port1B Port2A Port2B Port3A Port3B" ); + puts ("================== Digital I/O Status =================="); + puts (" Port1A Port1B Port2A Port2B Port3A Port3B" ); printf( "DDR %02X %02X %02X %02X %02X %02X\n\r",ddr1a,ddr1b,ddr2a,ddr2b,ddr3a,ddr3b ); printf( "IOR %02X %02X %02X %02X %02X %02X\n\r",ior1a,ior1b,ior2a,ior2b,ior3a,ior3b ); - puts( "========================================================\n" ); + puts ("========================================================\n"); if( instr ) { - puts( "You can set any register by typing 'register value' so" ); - puts( "as an example, to set register IOR2A with the top five" ); - puts( "bits off and the bottom three on, type 'IOR2A 07'." ); - puts( "Press ENTER without any command to see register values" ); - puts( "without changing any of them. Type 'help' to see these" ); - puts( "instructions again and type 'quit' to end the program.\n"); - puts( "Available registers: DDR1A, IOR1A, DDR1B, IOR1B, DDR2A" ); - puts( "IOR2A, DDR2B, IOR2B, DDR3A, IOR3A, DDR3B and IOR3B." ); + puts ("You can set any register by typing 'register value' so"); + puts ("as an example, to set register IOR2A with the top five"); + puts ("bits off and the bottom three on, type 'IOR2A 07'."); + puts ("Press ENTER without any command to see register values"); + puts ("without changing any of them. Type 'help' to see these"); + puts ("instructions again and type 'quit' to end the program.\n"); + puts ("Available registers: DDR1A, IOR1A, DDR1B, IOR1B, DDR2A"); + puts ("IOR2A, DDR2B, IOR2B, DDR3A, IOR3A, DDR3B and IOR3B."); instr = 0; } @@ -166,7 +166,7 @@ int main(void) { } } - puts( "\n\nEnjoy your day!\n\n" ); + puts ("\n\nEnjoy your day!\n\n"); return 0; } diff --git a/targettest/sym1/symNotepad.c b/targettest/sym1/symNotepad.c index f2e923bb5..7a603bd93 100644 --- a/targettest/sym1/symNotepad.c +++ b/targettest/sym1/symNotepad.c @@ -20,7 +20,7 @@ #define TAPIO_ADDRESS 0xE000 #define TAPIO_MAX_SIZE 0x0FFF -int main(void) { +int main (void) { char c = 0x00; int l = 0x00; int p = 0x00; @@ -42,7 +42,7 @@ int main(void) { memset( buffer, 0x00, heap_size ); if( buffer == 0x00 ) { - puts( "Memory full." ); + puts ("Memory full."); running = 0; } @@ -78,16 +78,16 @@ int main(void) { putchar( '\n' ); } - puts( "===================== Sym-1 Notepad ====================" ); + puts ("===================== Sym-1 Notepad ===================="); if( instruction_needed ) { - puts( "Enter text and you can save it to tape for reloading" ); - puts( "later. There are four special 'command' characters:\n" ); - puts( " Control-S Save to tape" ); - puts( " Control-L Load from tape" ); - puts( " Control-C Clear memory" ); - puts( " Control-X Exit" ); - puts( "========================================================\n" ); + puts ("Enter text and you can save it to tape for reloading"); + puts ("later. There are four special 'command' characters:\n"); + puts (" Control-S Save to tape"); + puts (" Control-L Load from tape"); + puts (" Control-C Clear memory"); + puts (" Control-X Exit"); + puts ("========================================================\n"); } while( writing ) { @@ -101,18 +101,18 @@ int main(void) { } } else if( c == 0x13 ) { // Save - puts( "\n========================= Save =========================" ); - puts( "\nPress any key to save." ); + puts ("\n========================= Save ========================="); + puts ("\nPress any key to save."); c = getchar(); for( l = 0; l <= p; l++ ) { tapio[l] = buffer[l]; } l++; tapio[l] = 0x00; - puts( "Saving to tape." ); + puts ("Saving to tape."); error = dumpt( 'N', tapio, tapio+p ); if( error ) { - puts( "\nTape error." ); + puts ("\nTape error."); } else { @@ -121,20 +121,20 @@ int main(void) { putchar( '\n' ); } } - puts( "===================== Sym-1 Notepad ====================\n" ); + puts ("===================== Sym-1 Notepad ====================\n"); for( l = 0; l <= p; l++ ) { putchar( buffer[l] ); } } else if( c == 0x0C ) { // Load p = 0; - puts( "\nLoading from tape." ); + puts ("\nLoading from tape."); memset( buffer, 0, heap_size ); memset( tapio, 0, TAPIO_MAX_SIZE ); error = loadt( 'N' ); if( error ) { - puts( "\nTape error." ); - puts( "===================== Sym-1 Notepad ====================\n" ); + puts ("\nTape error."); + puts ("===================== Sym-1 Notepad ====================\n"); } else { @@ -148,7 +148,7 @@ int main(void) { for( l = 0; l < 25; l++ ) { putchar( '\n' ); } - puts( "===================== Sym-1 Notepad ====================\n" ); + puts ("===================== Sym-1 Notepad ====================\n"); for( l = 0; l <= p; l++ ) { putchar( buffer[l] ); @@ -162,7 +162,7 @@ int main(void) { for( l = 0; l < 25; l++ ) { putchar( '\n' ); } - puts( "===================== Sym-1 Notepad ====================\n" ); + puts ("===================== Sym-1 Notepad ====================\n"); } else if( c == 0x18 ) { // Exit writing = 0; @@ -170,8 +170,8 @@ int main(void) { } else { if( p >= heap_size - 1 ) { - puts( "\n========================= End =========================" ); - puts( "Buffer full." ); + puts ("\n========================= End ========================="); + puts ("Buffer full."); } else { if( c == '\n' ) { @@ -186,7 +186,7 @@ int main(void) { free( buffer ); - puts( "\nEnjoy your day!\n" ); + puts ("\nEnjoy your day!\n"); return 0; } diff --git a/targettest/sym1/symTiny.c b/targettest/sym1/symTiny.c index 27b8840d8..be7d02824 100644 --- a/targettest/sym1/symTiny.c +++ b/targettest/sym1/symTiny.c @@ -11,14 +11,14 @@ #include #include -int main(void) { +int main (void) { char c = 0x00; int d = 0x00; int l = 0x00; - puts( "Hello World!\n" ); + puts ("Hello World!\n"); - puts( "Type a line and press ENTER, please:\n" ); + puts ("Type a line and press ENTER, please:\n"); for( l = 0; l < 2; l++ ) { beep(); @@ -30,7 +30,7 @@ int main(void) { c = getchar(); } - puts( "\n\nThanks!\n" ); + puts ("\n\nThanks!\n"); for( l = 0; l < 5; l++ ) { beep();