diff --git a/src/homemade_speedstep.c b/src/homemade_speedstep.c index e8ef509..28d5529 100644 --- a/src/homemade_speedstep.c +++ b/src/homemade_speedstep.c @@ -51,6 +51,14 @@ int stringtoint(char number[], int length){ return result; } +int stringlength(char string[]){ + int i = 0; + while(string[i]!='\0'){ + i++; + } + return i; +} + int main(int argc, char** argv){ if (argc == 1 || comparestrings(argv[1], "-h") == 0 || comparestrings(argv[1], "--help") == 0){ @@ -64,6 +72,8 @@ int main(int argc, char** argv){ printf(" see homemade_speedstep --help\n"); return 1; } + int maxtemp = stringtoint(argv[1], stringlength(argv[1])); + int mintemp = stringtoint(argv[2], stringlength(argv[2])); char gov[20]; FILE *govfile = fopen(CURGOV, "r"); getfilec(govfile, gov);