aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 70f4a9dd7ea..b52236769e0 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1408,7 +1408,7 @@ reset_sys_modes (struct tty_display_info *tty_out)
1408{ 1408{
1409 if (noninteractive) 1409 if (noninteractive)
1410 { 1410 {
1411 fflush (stdout); 1411 fflush_unlocked (stdout);
1412 return; 1412 return;
1413 } 1413 }
1414 if (!tty_out->term_initted) 1414 if (!tty_out->term_initted)
@@ -1428,17 +1428,14 @@ reset_sys_modes (struct tty_display_info *tty_out)
1428 } 1428 }
1429 else 1429 else
1430 { /* have to do it the hard way */ 1430 { /* have to do it the hard way */
1431 int i;
1432 tty_turn_off_insert (tty_out); 1431 tty_turn_off_insert (tty_out);
1433 1432
1434 for (i = cursorX (tty_out); i < FrameCols (tty_out) - 1; i++) 1433 for (int i = cursorX (tty_out); i < FrameCols (tty_out) - 1; i++)
1435 { 1434 fputc_unlocked (' ', tty_out->output);
1436 fputc (' ', tty_out->output);
1437 }
1438 } 1435 }
1439 1436
1440 cmgoto (tty_out, FrameRows (tty_out) - 1, 0); 1437 cmgoto (tty_out, FrameRows (tty_out) - 1, 0);
1441 fflush (tty_out->output); 1438 fflush_unlocked (tty_out->output);
1442 1439
1443 if (tty_out->terminal->reset_terminal_modes_hook) 1440 if (tty_out->terminal->reset_terminal_modes_hook)
1444 tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal); 1441 tty_out->terminal->reset_terminal_modes_hook (tty_out->terminal);
@@ -3079,7 +3076,7 @@ procfs_ttyname (int rdev)
3079 char minor[25]; /* 2 32-bit numbers + dash */ 3076 char minor[25]; /* 2 32-bit numbers + dash */
3080 char *endp; 3077 char *endp;
3081 3078
3082 for (; !feof (fdev) && !ferror (fdev); name[0] = 0) 3079 for (; !feof_unlocked (fdev) && !ferror_unlocked (fdev); name[0] = 0)
3083 { 3080 {
3084 if (fscanf (fdev, "%*s %s %u %s %*s\n", name, &major, minor) >= 3 3081 if (fscanf (fdev, "%*s %s %u %s %*s\n", name, &major, minor) >= 3
3085 && major == MAJOR (rdev)) 3082 && major == MAJOR (rdev))
@@ -3129,7 +3126,7 @@ procfs_get_total_memory (void)
3129 break; 3126 break;
3130 3127
3131 case 0: 3128 case 0:
3132 while ((c = getc (fmem)) != EOF && c != '\n') 3129 while ((c = getc_unlocked (fmem)) != EOF && c != '\n')
3133 continue; 3130 continue;
3134 done = c == EOF; 3131 done = c == EOF;
3135 break; 3132 break;