8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / dtrace / test / tst / common / java_api / tst.ProbeData.c
blob0833912ad94c621145cdfafe45daa1792d245f51
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #pragma ident "%Z%%M% %I% %E% SMI"
29 typedef void f(char *);
31 static void
32 f_a(char *a)
36 static void
37 f_b(char *a)
41 static void
42 f_c(char *a)
46 static void
47 f_d(char *a)
51 static void
52 f_e(char *a)
56 static void
57 fN(f func, char *a, int i)
59 func(a);
62 static void
63 fN2(f func, char *a, int i)
65 func(a);
68 int
69 main()
72 * Avoid length of 1, 2, 4, or 8 bytes so DTrace will treat the data as
73 * a byte array.
75 char a[] = {(char)-7, (char)201, (char)0, (char)0, (char)28, (char)1};
76 char b[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)0};
77 char c[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)1};
78 char d[] = {(char)-7, (char)201, (char)0, (char)0, (char)29, (char)0};
79 char e[] = {(char)84, (char)69, (char)0, (char)0, (char)28, (char)0};
81 fN(f_a, a, 1);
82 fN(f_b, b, 0);
83 fN(f_d, d, 102);
84 fN2(f_e, e, -2);
85 fN(f_c, c, 0);
86 fN(f_a, a, -1);
87 fN(f_d, d, 101);
88 fN(f_e, e, -2);
89 fN(f_e, e, 2);
90 fN2(f_e, e, 2);
92 return (0);