-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes and updates by Carl Troein and Matthew Sheets
Fixes/updates initiated by Carl were taken from the non-PowerFunctions updates posted to https://sourceforge.net/p/brickos/patches/27/
- Loading branch information
Showing
12 changed files
with
91 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,13 @@ | |
* Contributor(s): Taiichi Yuasa <[email protected]> | ||
*/ | ||
|
||
#ifdef RCX | ||
#include <config.h> | ||
// Due to the size of XS, we will allow building without CONF_ASCII and instead just limit character and string functionality | ||
#if defined(RCX) && !defined(CONF_ASCII) | ||
#ifndef CONF_ASCII | ||
#warning CONF_ASCII is disabled, so string and character functions will only output preset characters on the RCX | ||
#endif | ||
#endif | ||
|
||
#ifndef RCX | ||
#include <stdio.h> | ||
|
@@ -1352,15 +1355,17 @@ object eval(object e) { | |
break; | ||
|
||
case Lputs: { | ||
#if (defined(RCX) && defined(CONF_ASCII)) || (!defined(RCX)) | ||
int i; | ||
for (i = 4, e = base[0]; i >=0 && PAIRP(e); i--, e = CDR(e)) | ||
for (i = 4, e = base[0]; i >=0 && PAIRP(e); i--, e = CDR(e)) { | ||
#if ((defined(RCX) && defined(CONF_ASCII)) || (!defined(RCX)) | ||
cputc(INTval(CAR(e)), i); | ||
#else | ||
// ASCII is not enabled on the RCX, so we cannot display the string | ||
// Display a default text message instead | ||
cputc_native_user(CHAR_A, CHAR_S, CHAR_C, CHAR_PARALLEL); // ASCII | ||
#elif (defined(RCX) && defined(CONF_CONIO)) | ||
// ASCII is not enabled on the RCX, so we cannot display the string | ||
// Display a default text message instead: "-ASCII" | ||
cputc_native_5(CHAR_DASH); | ||
cputc_native_user(CHAR_A, CHAR_S, CHAR_C, CHAR_PARALLEL); // ASCII | ||
#endif | ||
} | ||
#ifndef RCX | ||
show_lcd(); | ||
#endif | ||
|
@@ -1369,11 +1374,12 @@ object eval(object e) { | |
case Lputc: | ||
if (check_int_args(base)) goto LERROR; | ||
// the second arg is between 0 (right-most) and 4 (left-most) | ||
#if (defined(RCX) && defined(CONF_ASCII)) || (!defined(RCX)) | ||
#if ((defined(RCX) && defined(CONF_ASCII)) || (!defined(RCX)) | ||
cputc(INTval(e = base[0]), INTval(base[1])); | ||
#else | ||
// ASCII is not enabled on the RCX, so we cannot display the string | ||
#elif (defined(RCX) && defined(CONF_CONIO)) | ||
// ASCII is not enabled on the RCX, so we cannot display the ASCII character | ||
// Display a generic '-' in the requested position instead | ||
e = base[0]; | ||
cputc_native(CHAR_DASH, INTval(base[1])); | ||
#endif | ||
#ifndef RCX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters