MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / readbinx

Function readbinx

src/debug.cpp:869–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869static bool readbinx (TCHAR **c, uae_u32 *valp)
870{
871 uae_u32 val = 0;
872 bool first = true;
873 bool negative = false;
874
875 ignore_ws (c);
876 negative = checkisneg(c);
877 for (;;) {
878 TCHAR nc = **c;
879 if (nc != '1' && nc != '0' && nc != '`') {
880 if (first)
881 return false;
882 break;
883 }
884 first = false;
885 (*c)++;
886 if (nc != '`') {
887 val <<= 1;
888 if (nc == '1') {
889 val |= 1;
890 }
891 }
892 }
893 *valp = val * (negative ? -1 : 1);
894 return true;
895}
896
897static bool readhexx (TCHAR **c, uae_u32 *valp)
898{

Callers 1

checkvaltype2Function · 0.85

Calls 2

ignore_wsFunction · 0.85
checkisnegFunction · 0.85

Tested by

no test coverage detected