MCPcopy Create free account
hub / github.com/RPISEC/MBE / clear_stdin

Function clear_stdin

include/utils.h:25–34  ·  view source on GitHub ↗

clears stdin up until newline */

Source from the content-addressed store, hash-verified

23
24/* clears stdin up until newline */
25void clear_stdin(void)
26{
27 char x = 0;
28 while(1)
29 {
30 x = getchar();
31 if(x == '\n' || x == EOF)
32 break;
33 }
34}
35
36/* gets a number from stdin and cleans up after itself */
37unsigned int get_unum(void)

Callers 1

get_unumFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected