1238582Smm/*
2238582Smm * CDDL HEADER START
3238582Smm *
4238582Smm * The contents of this file are subject to the terms of the
5238582Smm * Common Development and Distribution License (the "License").
6238582Smm * You may not use this file except in compliance with the License.
7238582Smm *
8238582Smm * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9238582Smm * or http://www.opensolaris.org/os/licensing.
10238582Smm * See the License for the specific language governing permissions
11238582Smm * and limitations under the License.
12238582Smm *
13238582Smm * When distributing Covered Code, include this CDDL HEADER in each
14238582Smm * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15238582Smm * If applicable, add the following below this CDDL HEADER, with the
16238582Smm * fields enclosed by brackets "[]" replaced with your own identifying
17238582Smm * information: Portions Copyright [yyyy] [name of copyright owner]
18238582Smm *
19238582Smm * CDDL HEADER END
20238582Smm */
21238582Smm
22238582Smm/*
23238582Smm * Copyright (c) 2011, Joyent, Inc. All rights reserved.
24238582Smm */
25238582Smm
26238582Smm#pragma D option quiet
27238582Smm
28238582Smmint64_t val[int];
29238582Smm
30238582SmmBEGIN
31238582Smm{
32238582Smm	base = -2;
33238582Smm	i = 0;
34238582Smm	val[i++] = -10;
35238582Smm	val[i++] = -1;
36238582Smm	val[i++] = 0;
37238582Smm	val[i++] = 10;
38238582Smm	val[i++] = 100;
39238582Smm	val[i++] = 1000;
40238582Smm	val[i++] = (1LL << 62);
41238582Smm	maxval = i;
42238582Smm	i = 0;
43238582Smm}
44238582Smm
45238582Smmtick-1ms
46238582Smm/i < maxval/
47238582Smm{
48238582Smm	printf("base %2d of %20d:  ", base, val[i]);
49238582Smm}
50238582Smm
51238582Smmtick-1ms
52238582Smm/i < maxval/
53238582Smm{
54238582Smm	printf("  %s\n", lltostr(val[i], base));
55238582Smm}
56238582Smm
57238582SmmERROR
58238582Smm{
59238582Smm	printf("  <error>\n");
60238582Smm}
61238582Smm
62238582Smmtick-1ms
63238582Smm/i < maxval/
64238582Smm{
65238582Smm	i++;
66238582Smm}
67238582Smm
68238582Smmtick-1ms
69238582Smm/i == maxval/
70238582Smm{
71238582Smm	i = 0;
72238582Smm	base++;
73238582Smm}
74238582Smm
75238582Smmtick-1ms
76238582Smm/base > 40/
77238582Smm{
78238582Smm	exit(0);
79238582Smm}
80238582Smm
81