MCPcopy Create free account
hub / github.com/Eliovp/amdmemorytweak / ParseNumericArg

Function ParseNumericArg

win/WinAMDTweak.cpp:485–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485static bool ParseNumericArg(int argc, const char* argv[], int& i, const char* arg, u32 & value)
486{
487 if (!strcasecmp(arg, argv[i]))
488 {
489 if (i == (argc - 1))
490 {
491 printf("Argument \"%s\" requires a parameter.\n", argv[i]);
492 exit(EXIT_FAILURE);
493 }
494 i++;
495 value = strtoul(argv[i], 0, 10);
496 if ((errno == EINVAL) || (errno == ERANGE))
497 {
498 printf("Failed to parse parameter %s %s\n", argv[i - 1], argv[i]);
499 exit(EXIT_FAILURE);
500 }
501 return true;
502 }
503 return false;
504}
505
506static void PrintCurrentValues(VGAChip * chip, GPU * gpu)
507{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected