Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / cns / cnsptype.c
1 /*
2 * This file is part of the Alliance CAD System
3 * Copyright (C) Laboratoire LIP6 - D\8epartement ASIM
4 * Universite Pierre et Marie Curie
5 *
6 * Home page : http://www-asim.lip6.fr/alliance/
7 * E-mail support : mailto:alliance-support@asim.lip6.fr
8 *
9 * This library is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Library General Public License as published
11 * by the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
13 *
14 * Alliance VLSI CAD System is distributed in the hope that it will be
15 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with the GNU C Library; see the file COPYING. If not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24 /* 10/26/95 Cone Netlist Structure functions: cnsptype.c */
25
26 #include"cnsall.h"
27
28 /*============================================================================*
29 | function viewcnsptype(); |
30 | display the content of a given ptype structure |
31 *============================================================================*/
32 void
33 viewcnsptype(ptptype)
34 ptype_list *ptptype;
35
36 {
37 char *margin = (char *) mbkalloc(80);
38 int k = 1;
39
40 if (CNS_TRACE_MODE >= CNS_TRACE)
41 (void) printf("TRA_cns viewcnsptype\n");
42
43 if (ptptype == NULL) {
44 (void) fflush(stdout);
45 (void) fprintf(stderr, "*** cns error ***");
46 (void) fprintf(stderr, " viewcnsptype() impossible: NULL pointer !\n");
47 if (CNS_TRACE_MODE >= CNS_TRACE)
48 (void) printf("TRA_cns viewcnsptype out\n");
49 EXIT(-1);
50 }
51
52 margin = strcpy(margin, " ");
53 while (k <= CNS_VIEW_LEVEL) {
54 margin = strcat(margin, " ");
55 k++;
56 }
57
58 CNS_VIEW_LEVEL++;
59 printf("%sptype->NEXT = 0x%lx\n", margin, (unsigned long)ptptype->NEXT);
60 printf("%sptype->TYPE = 0x%lx\n", margin, (unsigned long)ptptype->TYPE);
61 printf("%sptype->DATA = 0x%lx\n", margin, (unsigned long)ptptype->DATA);
62 printf("\n");
63 CNS_VIEW_LEVEL--;
64 mbkfree((void *) margin);
65 }