Debian Codegraph @

testsuite/systemtap.string/strtol.stp

raw
1 probe begin
2 {
3 teststr1 = "1"
4 teststr2 = "-1"
5 teststr3 = "123456789"
6 teststr4 = "-123456789"
7 teststr5 = "abcdef"
8 teststr6 = "123456789abcdef"
9 teststr7 = " 1 2 3 4"
10 teststr8 = ""
11 teststr9 = "1000"
12 teststr6 = "1a2b3c4d5e6f7g8h9"
13
14 printf("%d\n", strtol(teststr1, 10))
15 printf("%d\n", strtol(teststr2, 10))
16 printf("%d\n", strtol(teststr3, 10))
17 printf("%d\n", strtol(teststr4, 10))
18 printf("%d\n", strtol(teststr5, 10))
19 printf("%d\n", strtol(teststr6, 10))
20 printf("%d\n", strtol(teststr7, 10))
21 printf("%d\n", strtol(teststr8, 10))
22 printf("%d\n", strtol(teststr9, 10))
23 printf("%d\n", strtol(teststr9, 16))
24 printf("%d\n", strtol(teststr9, 8))
25 printf("%d\n", strtol(teststr9, 2))
26
27 exit()
28 }