Skip to content

Commit 90b0bce

Browse files
authored
Merge pull request #47 from zfi/BlocklyProp
Terminal Echo Patch
2 parents c182064 + 1411c73 commit 90b0bce

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed
-352 Bytes
Binary file not shown.

Learn/Simple Libraries/TextDevices/libsimpletext/putChar.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ void putChar(char c)
2727
void putChar(char c)
2828
{
2929
extern text_t *dport_ptr;
30-
if(c == '\n')
31-
dport_ptr->txChar(dport_ptr, '\r');
30+
31+
/* This is EVIL
32+
* if(c == '\n')
33+
* dport_ptr->txChar(dport_ptr, '\r');
34+
*/
35+
3236
dport_ptr->txChar(dport_ptr, c);
3337
}
3438

Learn/Simple Libraries/TextDevices/libsimpletext/safe_gets.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,23 @@ char* _safe_gets(text_t *text, char* origBuf, int count)
2727
{
2828
if (buf > origBuf)
2929
{
30-
text->txChar(text, '\010');
31-
text->txChar(text, ' ');
32-
text->txChar(text, '\010');
30+
/* These are EVIL - for now */
31+
// text->txChar(text, '\010');
32+
// text->txChar(text, ' ');
33+
// text->txChar(text, '\010');
3334
count += 1;
3435
buf--;
3536
}
3637
count += 1;
3738
continue;
3839
}
3940

40-
text->txChar(text, ch);
41-
if (ch == '\r')
42-
text->txChar(text, '\n');
41+
/*
42+
* More EVIL
43+
* text->txChar(text, ch);
44+
* if (ch == '\r')
45+
* text->txChar(text, '\n');
46+
*/
4347

4448
if (ch == '\r' || ch == '\n')
4549
break;

Learn/Simple Libraries/TextDevices/libsimpletext/writeStr.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ int writeStr(text_t *p, char *str)
1111
{
1212
int n = 0;
1313
while(*str) {
14-
if(*str == '\n')
15-
writeChar(p, '\r');
14+
15+
/* This is EVIL
16+
* if(*str == '\n')
17+
* writeChar(p, '\r');
18+
*/
19+
1620
writeChar(p, *str);
1721
str++;
1822
n++;

0 commit comments

Comments
 (0)