version 1.43, 2005/06/26 15:19:12 |
version 1.44, 2006/01/20 23:10:19 |
|
|
*/ |
*/ |
|
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/types.h> |
|
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <dirent.h> |
#include <dirent.h> |
#include <limits.h> |
#include <limits.h> |
#include <stddef.h> |
#include <stddef.h> |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdint.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include "config.h" |
#include "config.h" |
|
|
static void add_file(Path *, const char *); |
static void add_file(Path *, const char *); |
/* n = find_file_hashi(p, name, end, hv): retrieve name in a path hash |
/* n = find_file_hashi(p, name, end, hv): retrieve name in a path hash |
* structure. */ |
* structure. */ |
static char *find_file_hashi(Path *, const char *, const char *, u_int32_t); |
static char *find_file_hashi(Path *, const char *, const char *, uint32_t); |
|
|
/* stamp = find_stampi(name, end): look for (name, end) in the global |
/* stamp = find_stampi(name, end): look for (name, end) in the global |
* cache. */ |
* cache. */ |
|
|
} |
} |
|
|
static char * |
static char * |
find_file_hashi(Path *p, const char *file, const char *efile, u_int32_t hv) |
find_file_hashi(Path *p, const char *file, const char *efile, uint32_t hv) |
{ |
{ |
struct ohash *h = &p->files; |
struct ohash *h = &p->files; |
|
|
|
|
bool hasSlash; |
bool hasSlash; |
struct stat stb; /* Buffer for stat, if necessary */ |
struct stat stb; /* Buffer for stat, if necessary */ |
struct file_stamp *entry; /* Entry for mtimes table */ |
struct file_stamp *entry; /* Entry for mtimes table */ |
u_int32_t hv; /* hash value for last component in file name */ |
uint32_t hv; /* hash value for last component in file name */ |
char *q; /* Str_dupi(name, ename) */ |
char *q; /* Str_dupi(name, ename) */ |
|
|
/* Find the final component of the name and note whether name has a |
/* Find the final component of the name and note whether name has a |