MCPcopy Create free account
hub / github.com/TASEmulators/fceux / Get8

Function Get8

src/drivers/common/cheat.cpp:62–74  ·  view source on GitHub ↗

Get unsigned 8-bit integer from stdin in decimal. */

Source from the content-addressed store, hash-verified

60
61/* Get unsigned 8-bit integer from stdin in decimal. */
62static uint8 Get8(unsigned int def)
63{
64 char buf[32];
65
66 if ( fgets(buf,ARRAY_SIZE(buf),stdin) == nullptr )
67 {
68 return def;
69 }
70 if(buf[0]=='\n')
71 return(def);
72 sscanf(buf,"%u",&def);
73 return def;
74}
75
76static int GetI(int def)
77{

Callers 3

ModifyCheatFunction · 0.85
AddCheatParamFunction · 0.85
DoSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected