qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / src / numberstr.c
blobccfeaff14fd8793e30b1c9a57805eba8317c84e6
1 /*
2 * Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
3 */
5 #include <pcp/pmapi.h>
6 #include <pcp/impl.h>
8 int
9 main(int argc, char *argv[])
11 double d;
12 char *endptr;
14 __pmSetProgname(argv[0]);
15 if (argc != 2) {
16 fprintf(stderr, "Usage: %s double\n", pmProgname);
17 exit(1);
20 d = strtod(argv[1], &endptr);
21 if (endptr != NULL && endptr[0] != '\0') {
22 fprintf(stderr, "%s does not smell like a double, bozo!\n", argv[1]);
23 exit(1);
26 printf("%s\n", pmNumberStr(d));
28 return 0;