+static void check_input(void) {
+ struct stat newstab;
+ int r;
+
+ r= stat(input_filename, &newstab);
+ if (r<0) diee("could not check input");
+
+#define CI(x) if (newstab.st_##x == input_stab.st_##x) ; else goto changed
+ CI(dev);
+ CI(ino);
+ CI(size);
+ CI(mtime);
+#undef CI
+ return;
+
+ changed:
+ show();
+}
+
+static void topocheck(void) {
+ int v1,e,v2,eprime,v1prime, count;
+ FOR_EDGE(v1,e,v2) {
+ count= 0;
+ FOR_VEDGE(v2,eprime,v1prime)
+ if (v1prime==v1) count++;
+ if (count!=1) {
+ fprintf(stderr,"%02x -%d-> %02x reverse edge count = %d!\n",
+ v1,e,v2, count);
+ FOR_VEDGE(v2,eprime,v1prime)
+ fprintf(stderr,"%02x -%d-> %02x -> %d -> %02x\n",
+ v1,e,v2,eprime,v1prime);
+ exit(-1);
+ }
+ }
+}
+