/*********************************************************************** * * * This software is part of the ast package * * Copyright (c) 1982-2011 AT&T Intellectual Property * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Intellectual Property * * * * A copy of the License is available at * * http://www.opensource.org/licenses/cpl1.0.txt * * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * * * * Information and Software Systems Research * * AT&T Research * * Florham Park NJ * * * * David Korn * * * ***********************************************************************/ /* * AT&T Bell Laboratories * make abstract machine file state support * * mamstate reference [ file ... | pairs where delta * is diff between reference and file times * non-existent files are not listed */ #if !lint static char id[] = "\n@(#)$Id: mamstate (AT&T Bell Laboratories) 1989-06-26 $\0\n"; #endif #include #include #include main(argc, argv) int argc; register char** argv; { register char* s; register int c; long ref; struct stat st; char buf[1024]; if (!(s = *++argv) || stat(s, &st)) { fprintf(stderr, "Usage: mamstate reference [ file ... | buf) { *s = 0; if (!stat(buf, &st)) printf("%s %ld\n", buf, (long)st.st_mtime - ref); } } while (c != EOF); exit(0); }