Lines Matching full:stamp
470 static char const kStampName[] = "STAMP";
478 /** Hash the data to create the stamp. */
496 /** Check if the stamp matches the stamp in the cache directory. */
498 char* stamp = cat3(dir, "/", kStampName); in stamp_check() local
504 if (stamp == NULL) in stamp_check()
506 if (!UTIL_isRegularFile(stamp)) { in stamp_check()
507 fprintf(stderr, "stamp does not exist: recreating the data cache\n"); in stamp_check()
511 stampfile = fopen(stamp, "rb"); in stamp_check()
513 fprintf(stderr, "could not open stamp: recreating the data cache\n"); in stamp_check()
519 fprintf(stderr, "invalid stamp: recreating the data cache\n"); in stamp_check()
525 fprintf(stderr, "stamp matches: reusing the cached data\n"); in stamp_check()
527 fprintf(stderr, "stamp does not match: recreating the data cache\n"); in stamp_check()
530 free(stamp); in stamp_check()
536 /** On success write a new stamp, on failure delete the old stamp. */
539 char* stamp = cat3(dir, "/", kStampName); in stamp_write() local
543 if (stamp == NULL) in stamp_write()
554 stampfile = fopen(stamp, "wb"); in stamp_write()
564 unlink(stamp); in stamp_write()
565 free(stamp); in stamp_write()
591 /* If the stamp matches then we are good to go. in data_init()
593 * After this point, we MUST call stamp_write() to update the STAMP, in data_init()