Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/tests/strtoimax.c
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 338 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 338 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* |
2 | * strtoimaxtest.c |
3 | */ |
4 | |
5 | #include <stdio.h> |
6 | #include <stdlib.h> |
7 | #include <inttypes.h> |
8 | |
9 | int main(int argc, char *argv[]) |
10 | { |
11 | int i; |
12 | char *ep; |
13 | intmax_t iv; |
14 | |
15 | for (i = 1; i < argc; i++) { |
16 | iv = strtoimax(argv[i], &ep, 0); |
17 | printf("strtoimax(\"%s\") = %jd\n", argv[i], iv); |
18 | if (*ep) |
19 | printf(" ep = \"%s\"\n", ep); |
20 | } |
21 | |
22 | return 0; |
23 | } |