dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / dtrace / test / tst / common / print / tst.array.d
blob9650bf7c0f5e1c8e99281e4b0edf233f210f538c
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 (c) 2011 by Delphix. All rights reserved.
26 #pragma D option quiet
28 typedef struct bar {
29 int alpha;
30 } bar_t;
32 typedef struct foo {
33 int a[3];
34 char b[30];
35 bar_t c[2];
36 char d[3];
37 } foo_t;
39 BEGIN
41 this->f = (foo_t *)alloca(sizeof (foo_t));
43 this->f->a[0] = 1;
44 this->f->a[1] = 2;
45 this->f->a[2] = 3;
46 this->f->b[0] = 'a';
47 this->f->b[1] = 'b';
48 this->f->b[2] = 0;
49 this->f->c[0].alpha = 5;
50 this->f->c[1].alpha = 6;
51 this->f->c[2].alpha = 7;
52 this->f->d[0] = 4;
53 this->f->d[1] = 0;
54 this->f->d[2] = 0;
56 print(this->f->a);
57 print(this->f->b);
58 print(this->f->c);
59 print(*this->f);
61 exit(0);