-/*
- * Print out a 64-bit integer. This appears to be different on each system,
- * try to make the best of it. The integer stored as 2 consecutive XDR
- * encoded 32-bit integers, to which a pointer is passed.
- *
- * Assume that a system that has INT64_FORMAT defined, has a 64-bit
- * integer datatype and can print it.
- */
-
-#define UNSIGNED 0
-#define SIGNED 1
-#define HEX 2
-
-static int print_int64(const u_int32_t *dp, int how)
-{
-#ifdef INT64_FORMAT
- u_int64_t res;
-
- res = ((u_int64_t)EXTRACT_32BITS(&dp[0]) << 32) | (u_int64_t)EXTRACT_32BITS(&dp[1]);
- switch (how) {
- case SIGNED:
- printf(INT64_FORMAT, res);
- break;
- case UNSIGNED:
- printf(U_INT64_FORMAT, res);
- break;
- case HEX:
- printf(HEX_INT64_FORMAT, res);
- break;
- default:
- return (0);
- }
-#else
- u_int32_t high;
-
- high = EXTRACT_32BITS(&dp[0]);
-
- switch (how) {
- case SIGNED:
- case UNSIGNED:
- case HEX:
- if (high != 0)
- printf("0x%x%08x", high, EXTRACT_32BITS(&dp[1]));
- else
- printf("0x%x", EXTRACT_32BITS(&dp[1]));
- break;
- default:
- return (0);
- }
-#endif
- return 1;
-}
-