printlist.c (7c478bd9) printlist.c (92ed1782)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 5 unchanged lines hidden (view full) ---

14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *

--- 5 unchanged lines hidden (view full) ---

14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22
22/*
23/*
23 * Copyright (c) 1990-1997, by Sun Microsystems, Inc.
24 * All rights reserved.
24 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
25 */
26
27#pragma ident "%Z%%M% %I% %E% SMI"
28
29#include "gprof.h"
30
31/*
32 * these are the lists of names:

--- 10 unchanged lines hidden (view full) ---

43struct stringlist Ehead = { 0, 0 };
44struct stringlist *Elist = &Ehead;
45
46void
47addlist(struct stringlist *listp, char *funcname)
48{
49 struct stringlist *slp;
50
26 */
27
28#pragma ident "%Z%%M% %I% %E% SMI"
29
30#include "gprof.h"
31
32/*
33 * these are the lists of names:

--- 10 unchanged lines hidden (view full) ---

44struct stringlist Ehead = { 0, 0 };
45struct stringlist *Elist = &Ehead;
46
47void
48addlist(struct stringlist *listp, char *funcname)
49{
50 struct stringlist *slp;
51
51 slp = (struct stringlist *)malloc(sizeof (struct stringlist));
52 slp = malloc(sizeof (struct stringlist));
52
53 if (slp == NULL) {
53
54 if (slp == NULL) {
54 fprintf(stderr, "gprof: ran out room for printlist\n");
55 (void) fprintf(stderr, "gprof: ran out room for printlist\n");
55 exit(1);
56 }
57
58 slp->next = listp->next;
59 slp->string = funcname;
60 listp->next = slp;
61}
62

--- 15 unchanged lines hidden ---
56 exit(1);
57 }
58
59 slp->next = listp->next;
60 slp->string = funcname;
61 listp->next = slp;
62}
63

--- 15 unchanged lines hidden ---