Personal tools
You are here: Home Projects C++ Cfront releases Release 3.0.3 source libSC G2++ g2++lib g2debug.c
Document Actions

g2debug.c

by Michael L Powell last modified 2007-01-26 03:23

Click here to get the file

Size 2.2 kB - File type text/plain

File contents

/*ident	"@(#)G2++:g2++lib/g2debug.c	3.1" */
/******************************************************************************
*
* C++ Standard Components, Release 3.0.
*
* Copyright (c) 1991, 1992 AT&T and Unix System Laboratories, Inc.
* Copyright (c) 1988, 1989, 1990 AT&T.  All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T and Unix System
* Laboratories, Inc.  The copyright notice above does not evidence
* any actual or intended publication of such source code.
*
******************************************************************************/

#include <g2debug.h>
#include <g2desc.h>
#include <g2tree.h>
#include <stream.h>

void showbuf_ATTLC(G2BUF* bp){
    if(bp!=-0){
	cerr 
	    << "    tattoo = "
	    << bp->tattoo 
	    << "\n"
	    << "    root = "
	    << (void*)bp->root
	    << "\n"
	    << "    (G2NODE*)buf = "
	    << (void*)(G2NODE*)bp->buf
	    << "\n"
	    << "    base = "
	    << (void*)bp->base
	    << "\n"
	    << "    ptr = "
	    << (void*)bp->ptr
	    << "\n"
	    << "    end = "
	    << (void*)bp->end
	    << "\n"
	;
	for( 
	    G2NODE* n=bp->base; 
	    n<bp->ptr; 
	    n++ 
	){
	    cerr << "        " << (void*)n << ":\n";
	    shownode_ATTLC(n);
	}
    }
}
void showdesc_ATTLC(
    G2DESC* rd
){
    cerr 
	<< "    rd->name="
	<< rd->name
	<< "\n"
	<< "    rd->type="
	<< char(rd->type)
	<< "\n"
	<< "    rd->offset="
	<< rd->offset
	<< "\n"
	<< "    rd->size="
	<< rd->size
	<< "\n"
	<< "    rd->nel="
	<< rd->nel
	<< "\n"
	<< "    rd->pfn="
	<< (void*)rd->pfn
	<< "\n"
	<< "    rd->gfn="
	<< (void*)rd->gfn
	<< "\n"
	<< "    rd->nfn="
	<< (void*)rd->nfn
	<< "\n"
    ;
}

void shownode_ATTLC(
    G2NODE* n
){
    if( n!=0 ){
	cerr 
	    << "            name="
	    << n->name
	    << "\n"
	    << "            val="
	    << n->val
	    << "\n"
	    << "            next="
	    << (void*)n->next
	    << "\n"
	    << "            child="
	    << (void*)n->child
	    << "\n"
	;
    }
}

void showtree_ATTLC(
    G2NODE* t,
    int level
){
    if(t==0)return;

    for(int i=0;i<level;i++){
	cerr << "    ";
    }
    cerr << t->name << "    " << t->val << "\n";

    for(
	G2NODE* c=t->child;
	c;
	c=c->next
    ){
	showtree_ATTLC(c,level+1);
    }
}

« May 2024 »
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: