FreeCalypso > hg > freecalypso-sw
comparison target-utils/libcommon/cmdentry.c @ 125:17c1e2a38418
target-utils command input: don't emit BEL on error conditions
with the new binary-safe fc-iram these BELs get printed as ^G
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Thu, 31 Oct 2013 07:15:32 +0000 |
| parents | 165040ce4929 |
| children |
comparison
equal
deleted
inserted
replaced
| 124:dfd3110d84e3 | 125:17c1e2a38418 |
|---|---|
| 34 if (ch >= ' ' && ch <= '~') { | 34 if (ch >= ' ' && ch <= '~') { |
| 35 if (inlen < MAXCMD) { | 35 if (inlen < MAXCMD) { |
| 36 command[inlen++] = ch; | 36 command[inlen++] = ch; |
| 37 putchar(ch); | 37 putchar(ch); |
| 38 } else | 38 } else |
| 39 putchar(7); | 39 /* putchar(7) */; |
| 40 continue; | 40 continue; |
| 41 } | 41 } |
| 42 switch (ch) { | 42 switch (ch) { |
| 43 case '\r': | 43 case '\r': |
| 44 case '\n': | 44 case '\n': |
| 51 putchar('\b'); | 51 putchar('\b'); |
| 52 putchar(' '); | 52 putchar(' '); |
| 53 putchar('\b'); | 53 putchar('\b'); |
| 54 inlen--; | 54 inlen--; |
| 55 } else | 55 } else |
| 56 putchar(7); | 56 /* putchar(7) */; |
| 57 continue; | 57 continue; |
| 58 case 0x03: /* ^C */ | 58 case 0x03: /* ^C */ |
| 59 putchar('^'); | 59 putchar('^'); |
| 60 putchar('C'); | 60 putchar('C'); |
| 61 putchar('\n'); | 61 putchar('\n'); |
| 64 putchar('^'); | 64 putchar('^'); |
| 65 putchar('U'); | 65 putchar('U'); |
| 66 putchar('\n'); | 66 putchar('\n'); |
| 67 return(0); | 67 return(0); |
| 68 default: | 68 default: |
| 69 putchar(7); | 69 /* putchar(7) */; |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 } | 72 } |
