summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-14 08:48:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:46 +0200
commit01f8f60cf06e180b2b5eb96ceb162473c0cb196a (patch)
treeb792cbe498d9143e263704f7ce3fa79031790bdf /commands
parent70bbeea7b227866bdbdef0b249ff7f8644713f15 (diff)
downloadbarebox-01f8f60cf06e180b2b5eb96ceb162473c0cb196a.tar.gz
barebox-01f8f60cf06e180b2b5eb96ceb162473c0cb196a.tar.xz
stdio: rename getc to getchar
The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/edit.c2
-rw-r--r--commands/loads.c6
-rw-r--r--commands/mmc_extcsd.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/commands/edit.c b/commands/edit.c
index c014892fc4..a5415a6e5b 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -367,7 +367,7 @@ static void getwinsize(void)
printf(ESC "7" ESC "[r" ESC "[999;999H" ESC "[6n");
- while ((r = getc()) != 'R') {
+ while ((r = getchar()) != 'R') {
buf[i] = r;
i++;
}
diff --git a/commands/loads.c b/commands/loads.c
index aa3095ee8c..eb3e109b0b 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -59,7 +59,7 @@ static int do_load_serial(int argc, char *argv[])
*/
for (i=0; i<100; ++i) {
if (tstc()) {
- (void) getc();
+ (void) getchar();
}
udelay(1000);
}
@@ -142,7 +142,7 @@ static int read_record(char *buf, ulong len)
--len; /* always leave room for terminating '\0' byte */
for (p=buf; p < buf+len; ++p) {
- c = getc(); /* read character */
+ c = getchar(); /* read character */
if (do_echo)
putchar(c);
@@ -180,7 +180,7 @@ static int do_save_serial(int argc, char *argv[])
printf ("## Ready for S-Record upload, press ENTER to proceed ...\n");
for (;;) {
- if (getc() == '\r')
+ if (getchar() == '\r')
break;
}
if (save_serial(offset, size)) {
diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
index d05128c6e7..fa4e29c3da 100644
--- a/commands/mmc_extcsd.c
+++ b/commands/mmc_extcsd.c
@@ -1867,14 +1867,14 @@ static int request_write_operation(void)
int c;
printf("This is a one time programmable field!\nDo you want to write? [y/N] ");
- c = getc();
+ c = getchar();
/* default is N */
if (c == 0xD) {
printf("\n");
return 0;
}
printf("%c", c);
- getc(); /* wait for carriage return */
+ getchar(); /* wait for carriage return */
printf("\n");
if (c == 'y' || c == 'Y')
return 1;