static char *SccsId = "@(#)dmstat.c 3.4 (TU-Delft) 03/26/91";
/**********************************************************

Name/Version      : The Design Data Management Project

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000/S500

Author(s)         : S. de Graaf
                    A. van der Hoeven
                    T.G.R. van Leuken
                    N. van der Meijs
		    T. Vogel
		    P. van der Wolf
Creation date     : 04-Dec-1986
Modified by       : 
Modification date : 


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1985-1987 , All rights reserved
**********************************************************/
#include "dmstd.h"

/* 
** This function does a stat on the database file
*/
dmStat (key, file, buf)
DM_CELL * key;
char   *file;
struct stat *buf;
{
    char    path[MAXLINE];

    if (_dmCh_key (key)) {
	dmError ("dmStat");
	return (-1);
    }

    if (strcmp (file, "info2") == 0 || strcmp (file, "info3") == 0)
	file = "info";

    _dmSprintf (path, "%s/%s/%s/%s", key -> dmproject -> dmpath,
		    key -> view, key -> cell, file);

    if (stat (path, buf)) {
	dmerrno = DME_SYS;
	return (-1);
    }
    return (0);
}
