/* dmpmem.f -- translated by f2c (version of 3 February 1990  3:36:42).
   You must link the resulting object file with the libraries:
	-lF77 -lI77 -lm -lc   (in that order)
*/

#include "f2c.h"

/* Common Block Declarations */

struct {
    integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
	    nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
	    junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
	    numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
	    iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
	    lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
	    nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
	    irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
	    lvntmp;
} tabinf_;

#define tabinf_1 tabinf_

struct {
    doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
	    sfactr;
    integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
	    itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
} status_;

#define status_1 status_

struct {
    doublereal cpyknt;
    integer istack[1], lorg, icore, maxcor, maxuse, memavl, ldval, numblk, 
	    loctab, ltab, ifwa, nwoff, ntab, maxmem, memerr, nwd4, nwd8, 
	    nwd16;
} memmgr_;

#define memmgr_1 memmgr_

/* Table of constant values */

static integer c__1 = 1;

/*<       subroutine dmpmem(ipntr) >*/
/* Subroutine */ int dmpmem_(ipntr)
integer *ipntr;
{
    /* Initialized data */

    static struct {
	char e_1[600];
	doublereal e_2;
	} equiv_18 = { {'i', 'e', 'l', 'm', 'n', 't', ' ', ' ', 'i', 's', 'b',
		 'c', 'k', 't', ' ', ' ', 'n', 's', 'b', 'c', 'k', 't', ' ', 
		' ', 'i', 'u', 'n', 's', 'a', 't', ' ', ' ', 'n', 'u', 'n', 
		's', 'a', 't', ' ', ' ', 'i', 't', 'e', 'm', 'p', 's', ' ', 
		' ', 'n', 'u', 'm', 't', 'e', 'm', ' ', ' ', 'i', 's', 'e', 
		'n', 's', ' ', ' ', ' ', 'n', 's', 'e', 'n', 's', ' ', ' ', 
		' ', 'i', 'f', 'o', 'u', 'r', ' ', ' ', ' ', 'n', 'f', 'o', 
		'u', 'r', ' ', ' ', ' ', 'i', 'f', 'i', 'e', 'l', 'd', ' ', 
		' ', 'i', 'c', 'o', 'd', 'e', ' ', ' ', ' ', 'i', 'd', 'e', 
		'l', 'i', 'm', ' ', ' ', 'i', 'c', 'o', 'l', 'u', 'm', ' ', 
		' ', 'i', 'n', 's', 'i', 'z', 'e', ' ', ' ', 'j', 'u', 'n', 
		'o', 'd', 'e', ' ', ' ', 'l', 's', 'b', 'k', 'p', 't', ' ', 
		' ', 'n', 'u', 'm', 'b', 'k', 'p', ' ', ' ', 'i', 'o', 'r', 
		'd', 'e', 'r', ' ', ' ', 'j', 'm', 'n', 'o', 'd', 'e', ' ', 
		' ', 'i', 'u', 'r', ' ', ' ', ' ', ' ', ' ', 'i', 'u', 'c', 
		' ', ' ', ' ', ' ', ' ', 'i', 'l', 'c', ' ', ' ', ' ', ' ', 
		' ', 'i', 'l', 'r', ' ', ' ', ' ', ' ', ' ', 'n', 'u', 'm', 
		'o', 'f', 'f', ' ', ' ', 'i', 's', 'r', ' ', ' ', ' ', ' ', 
		' ', 'n', 'm', 'o', 'f', 'f', 'c', ' ', ' ', 'i', 's', 'e', 
		'q', ' ', ' ', ' ', ' ', 'i', 's', 'e', 'q', '1', ' ', ' ', 
		' ', 'n', 'e', 'q', 'n', ' ', ' ', ' ', ' ', 'n', 'o', 'd', 
		'e', 'v', 's', ' ', ' ', 'n', 'd', 'i', 'a', 'g', ' ', ' ', 
		' ', 'i', 's', 'w', 'a', 'p', ' ', ' ', ' ', 'i', 'e', 'q', 
		'u', 'a', ' ', ' ', ' ', 'm', 'a', 'c', 'i', 'n', 's', ' ', 
		' ', 'l', 'v', 'n', 'i', 'm', '1', ' ', ' ', 'l', 'x', '0', 
		' ', ' ', ' ', ' ', ' ', 'l', 'v', 'n', ' ', ' ', ' ', ' ', 
		' ', 'l', 'y', 'n', 'l', ' ', ' ', ' ', ' ', 'l', 'y', 'u', 
		' ', ' ', ' ', ' ', ' ', 'l', 'y', 'l', ' ', ' ', ' ', ' ', 
		' ', 'l', 'x', '1', ' ', ' ', ' ', ' ', ' ', 'l', 'x', '2', 
		' ', ' ', ' ', ' ', ' ', 'l', 'x', '3', ' ', ' ', ' ', ' ', 
		' ', 'l', 'x', '4', ' ', ' ', ' ', ' ', ' ', 'l', 'x', '5', 
		' ', ' ', ' ', ' ', ' ', 'l', 'x', '6', ' ', ' ', ' ', ' ', 
		' ', 'l', 'x', '7', ' ', ' ', ' ', ' ', ' ', 'l', 'd', '0', 
		' ', ' ', ' ', ' ', ' ', 'l', 'd', '1', ' ', ' ', ' ', ' ', 
		' ', 'l', 't', 'd', ' ', ' ', ' ', ' ', ' ', 'i', 'm', 'y', 
		'n', 'l', ' ', ' ', ' ', 'i', 'm', 'v', 'n', ' ', ' ', ' ', 
		' ', 'l', 'c', 'v', 'n', ' ', ' ', ' ', ' ', 'n', 's', 'n', 
		'o', 'd', ' ', ' ', ' ', 'n', 's', 'm', 'a', 't', ' ', ' ', 
		' ', 'n', 's', 'v', 'a', 'l', ' ', ' ', ' ', 'i', 'c', 'n', 
		'o', 'd', ' ', ' ', ' ', 'i', 'c', 'm', 'a', 't', ' ', ' ', 
		' ', 'i', 'c', 'v', 'a', 'l', ' ', ' ', ' ', 'l', 'o', 'u', 
		't', 'p', 't', ' ', ' ', 'l', 'p', 'o', 'l', ' ', ' ', ' ', 
		' ', 'l', 'z', 'e', 'r', ' ', ' ', ' ', ' ', 'i', 'r', 's', 
		'w', 'p', 'f', ' ', ' ', 'i', 'r', 's', 'w', 'p', 'r', ' ', 
		' ', 'i', 'c', 's', 'w', 'p', 'f', ' ', ' ', 'i', 'c', 's', 
		'w', 'p', 'r', ' ', ' ', 'i', 'r', 'p', 't', ' ', ' ', ' ', 
		' ', 'j', 'c', 'p', 't', ' ', ' ', ' ', ' ', 'i', 'r', 'o', 
		'w', 'n', 'o', ' ', ' ', 'j', 'c', 'o', 'l', 'n', 'o', ' ', 
		' ', 'n', 't', 't', 'b', 'r', ' ', ' ', ' ', 'n', 't', 't', 
		'a', 'r', ' ', ' ', ' ', 'l', 'v', 'n', 't', 'm', 'p', ' ', 
		' '}, 0. };

#define aptr ((doublereal *)&equiv_18)

    static struct {
	char e_1[8];
	doublereal e_2;
	} equiv_19 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };

#define ablnk (*(doublereal *)&equiv_19)


    /* Format strings */
    static char fmt_5[] = "(\0020current pointer \002,a6,\002@ = z\002,i6,\
/\002 corsiz=\002,i7,/\002 maxmem=\002,i7,/\002 avlspc=\002,i7,/\002 ldval\
=\002,i7,/\0020\002,24x,\002memory allocation map\002/14x,\002blknum memorg \
memsiz\002,\002  memuse usrptr  addr    name\002)";
    static char fmt_11[] = "(13x,5i7,3x,i7,\002z\002,1x,a6)";
    static char fmt_21[] = "(\0020\002,24x,\002end of allocation map\002/)";

    /* System generated locals */
    integer i_1;

    /* Builtin functions */
    integer s_wsfe(), do_fio(), e_wsfe();

    /* Local variables */
    static doublereal anam;
    static integer iadr;
    extern integer locf_();
    static integer madr, morg, muse, ndex, jptr, msiz, ltab1, i, iaddr, itemp;


    /* Fortran I/O blocks */
    static cilist io__7 = { 0, 0, 0, fmt_5, 0 };
    static cilist io__16 = { 0, 0, 0, fmt_11, 0 };
    static cilist io__17 = { 0, 0, 0, fmt_21, 0 };


    /* Parameter adjustments */
    --ipntr;

    /* Function Body */
/*<       implicit double precision (a-h,o-z) >*/

/*      this routine prints out the current memory allocation map. */
/* *ipntr* is the table pointer of the current memory manager call */

/* spice version 2g.6  sccsid=tabinf 3/15/83 */
/*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
/*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
/*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
/*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
/*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
/*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
/*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
/*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
/* spice version 2g.6  sccsid=status 3/15/83 */
/*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
/*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
/*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
/* spice version 2g.6  sccsid=memmgr 3/15/83 */
/*<       common /memmgr/ cpyknt,istack(1),lorg,icore,maxcor,maxuse,memavl, >*/
/*<      1   ldval,numblk,loctab,ltab,ifwa,nwoff,ntab,maxmem,memerr,nwd4, >*/
/*<      2   nwd8,nwd16 >*/
/*<       dimension ipntr(1) >*/
/*<       dimension aptr(75) >*/
/*<       data aptr /6hielmnt,6hisbckt,6hnsbckt,6hiunsat,6hnunsat,6hitemps, >*/
/*<      1 6hnumtem,6hisens ,6hnsens ,6hifour ,6hnfour ,6hifield, >*/
/*<      2 6hicode ,6hidelim,6hicolum,6hinsize, >*/
/*<      3 6hjunode,6hlsbkpt,6hnumbkp,6hiorder,6hjmnode, >*/
/*<      4 6hiur   ,6hiuc   ,6hilc   ,6hilr   ,6hnumoff,6hisr   , >*/
/*<      5 6hnmoffc,6hiseq  ,6hiseq1  ,6hneqn  ,6hnodevs, >*/
/*<      6 6hndiag ,6hiswap ,6hiequa ,6hmacins,6hlvnim1, >*/
/*<      7 6hlx0   ,6hlvn   ,6hlynl  ,6hlyu   ,6hlyl   , >*/
/*<      8 6hlx1   ,6hlx2   ,6hlx3   ,6hlx4   ,6hlx5   ,6hlx6   , >*/
/*<      9 6hlx7   ,6hld0   ,6hld1   ,6hltd   ,6himynl ,6himvn  ,6hlcvn  , >*/
/*<      * 6hnsnod ,6hnsmat ,6hnsval ,6hicnod ,6hicmat ,6hicval ,6hloutpt, >*/
/*<      * 6hlpol  ,6hlzer  ,6hirswpf,6hirswpr,6hicswpf,6hicswpr,6hirpt  , >*/
/*<      * 6hjcpt  ,6hirowno,6hjcolno,6hnttbr ,6hnttar ,6hlvntmp/ >*/
/*<       data ablnk /1h / >*/

/*<       iaddr=locf(ielmnt)-1 >*/
    iaddr = locf_(&tabinf_1.ielmnt) - 1;
/*<       itemp=locf(ipntr(1))-iaddr >*/
    itemp = locf_(&ipntr[1]) - iaddr;
/*<       anam=ablnk >*/
    anam = ablnk;
/*<       if(itemp.gt.0.and.itemp.le.75) anam=aptr(itemp) >*/
    if (itemp > 0 && itemp <= 75) {
	anam = aptr[itemp - 1];
    }
/*<       iadr=locf(ipntr(1)) >*/
    iadr = locf_(&ipntr[1]);
/*<       write (iofile,5) anam,iadr,icore,maxmem,memavl,ldval >*/
    io__7.ciunit = status_1.iofile;
    s_wsfe(&io__7);
    do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
    do_fio(&c__1, (char *)&iadr, (ftnlen)sizeof(integer));
    do_fio(&c__1, (char *)&memmgr_1.icore, (ftnlen)sizeof(integer));
    do_fio(&c__1, (char *)&memmgr_1.maxmem, (ftnlen)sizeof(integer));
    do_fio(&c__1, (char *)&memmgr_1.memavl, (ftnlen)sizeof(integer));
    do_fio(&c__1, (char *)&memmgr_1.ldval, (ftnlen)sizeof(integer));
    e_wsfe();
/*<     5 format('0current pointer ',a6,'@ = z',i6,/' corsiz=',i7, >*/
/*<      1  /' maxmem=',i7,/' avlspc=',i7,/' ldval=',i7, >*/
/*<      2  /1h0,24x,'memory allocation map'/14x,'blknum memorg memsiz', >*/
/*<      3  '  memuse usrptr  addr    name') >*/
/*<       ltab1=loctab >*/
    ltab1 = memmgr_1.loctab;
/*<       do 20 i=1,numblk >*/
    i_1 = memmgr_1.numblk;
    for (i = 1; i <= i_1; ++i) {
/*<       morg=istack(ltab1+1) >*/
	morg = memmgr_1.istack[ltab1];
/*<       msiz=istack(ltab1+2) >*/
	msiz = memmgr_1.istack[ltab1 + 1];
/*<       muse=istack(ltab1+3) >*/
	muse = memmgr_1.istack[ltab1 + 2];
/*<       madr=istack(ltab1+4) >*/
	madr = memmgr_1.istack[ltab1 + 3];
/*<       anam=ablnk >*/
	anam = ablnk;
/*<       ndex=madr-iaddr >*/
	ndex = madr - iaddr;
/*<       if(ndex.gt.0.and.ndex.le.75) anam=aptr(ndex) >*/
	if (ndex > 0 && ndex <= 75) {
	    anam = aptr[ndex - 1];
	}
/*<       jptr=0 >*/
	jptr = 0;
/*<       if (madr.gt.0) jptr=istack(lorg+madr) >*/
	if (madr > 0) {
	    jptr = memmgr_1.istack[memmgr_1.lorg + madr - 1];
	}
/*<       write (iofile,11) i,morg,msiz,muse,jptr,madr,anam >*/
	io__16.ciunit = status_1.iofile;
	s_wsfe(&io__16);
	do_fio(&c__1, (char *)&i, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&morg, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&msiz, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&muse, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&jptr, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&madr, (ftnlen)sizeof(integer));
	do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
	e_wsfe();
/*<    11 format(13x,5i7,3x,i7,'z',1x,a6) >*/
/*<       ltab1=ltab1+ntab >*/
	ltab1 += memmgr_1.ntab;
/*<    20 continue >*/
/* L20: */
    }
/*<       write (iofile,21) >*/
    io__17.ciunit = status_1.iofile;
    s_wsfe(&io__17);
    e_wsfe();
/*<    21 format(1h0,24x,'end of allocation map'/) >*/
/*<       return >*/
    return 0;
/*<       end >*/
} /* dmpmem_ */

#undef ablnk
#undef aptr


