DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T s

⟦332a8ad1d⟧ TextFile

    Length: 1001 (0x3e9)
    Types: TextFile
    Names: »stat.c«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/rman/daemon/stat.c« 

TextFile

#ifndef lint
static char *RCSid = "$Header: stat.c,v 1.2 85/08/27 15:17:30 broome Exp $";
#endif

/*
 * $Log:    stat.c,v $
 * Revision 1.2  85/08/27  15:17:30  broome
 * Last cleanup before release.
 * 
 * Revision 1.1  85/08/03  18:36:20  broome
 * Initial revision
 */

#include "defs.h"
#include "response.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>

dostat (argc, argv)
int   argc;
char *argv[];
{
    struct  stat statb;
    struct  where *wp;
    long    date;

    argc--, argv++;
    wp = find (argc, argv);
    if (wp->found) {
        stat (wp->man, &statb);  /* stat the unformatted form */
        date = statb.st_mtime;

        if (stat (wp->cat, &statb) < 0 || statb.st_size == 0 || 
           statb.st_mtime < date)    /* have to create/update it */
            printf ("%d-No formatted file found for %s.\r\n", ERR_STAT, wp->name);
        else
            printf ("%d-Have formatted page for %s.\r\n", OK_STAT, wp->name);
    } else
        notfound (wp);
}