example.c: use `atoi` instead of `atol` to parse into `int`
This commit is contained in:
parent
c63a09fabe
commit
283ed3f851
|
@ -14,7 +14,7 @@ int main(int argc, char **argv) {
|
||||||
ARGH_NEXT();
|
ARGH_NEXT();
|
||||||
if ARGH_BOOL("-p", "--prefix") { prefix = true;}
|
if ARGH_BOOL("-p", "--prefix") { prefix = true;}
|
||||||
else if ARGH_BOOL("-l", "--lz4") { lz4 = true; }
|
else if ARGH_BOOL("-l", "--lz4") { lz4 = true; }
|
||||||
else if ARGH_FLAG("-h", "--head") { head = atol(ARGH_VAL()); }
|
else if ARGH_FLAG("-h", "--head") { head = atoi(ARGH_VAL()); }
|
||||||
}
|
}
|
||||||
printf("head: %d, prefix: %d, lz4: %d\n", head, prefix, lz4);
|
printf("head: %d, prefix: %d, lz4: %d\n", head, prefix, lz4);
|
||||||
for (int i = 0; i < ARGH_ARGC; i++)
|
for (int i = 0; i < ARGH_ARGC; i++)
|
||||||
|
|
Loading…
Reference in New Issue