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

⟦3f31ca1db⟧ TextFile

    Length: 739 (0x2e3)
    Types: TextFile
    Names: »statcomp.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/cfs/statcomp.c« 

TextFile

/*
 *  Compare two stat structures
 */

#include "cfs.h"

statcomp (old, new)
struct stat *old;
struct stat *new;
{
    int     errflg = 0;
    register u_short mode;

    errflg += (old -> st_ino	!= new -> st_ino);
    errflg += (old -> st_mode	!= new -> st_mode);
    errflg += (old -> st_nlink	!= new -> st_nlink);
    errflg += (old -> st_uid	!= new -> st_uid);
    errflg += (old -> st_gid	!= new -> st_gid);
    errflg += (old -> st_ctime	!= new -> st_ctime);

    mode = old -> st_mode & S_IFMT;
    if (mode == S_IFCHR || mode == S_IFBLK) {
	errflg += (old -> st_rdev	!= new -> st_rdev);
    }
    else {
	errflg += (old -> st_size	!= new -> st_size);
	errflg += (old -> st_mtime	!= new -> st_mtime);
    }

    return (errflg);
}