48 |
/* We assume to have `unsigned long int' value with at least 32 bits. */ |
/* We assume to have `unsigned long int' value with at least 32 bits. */ |
49 |
#define HASHWORDBITS 32 |
#define HASHWORDBITS 32 |
50 |
|
|
|
/* The so called `hashpjw' function by P.J. Weinberger |
|
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, |
|
|
1986, 1987 Bell Telephone Laboratories, Inc.] */ |
|
|
|
|
51 |
/* Header for binary .mo file format. */ |
/* Header for binary .mo file format. */ |
52 |
struct mo_file_header { |
struct mo_file_header { |
53 |
DWORD magic; /* The magic number. */ |
DWORD magic; /* The magic number. */ |
97 |
} |
} |
98 |
|
|
99 |
|
|
100 |
/* Missing W32 functions. */ |
/* The so called `hashpjw' function by P.J. Weinberger |
101 |
static char* |
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, |
102 |
w32_stpcpy (char *a,const char *b) |
1986, 1987 Bell Telephone Laboratories, Inc.] */ |
|
{ |
|
|
while (*b) |
|
|
*a++ = *b++; |
|
|
*a = 0; |
|
|
return (char*)a; |
|
|
} |
|
|
|
|
|
|
|
103 |
|
|
104 |
static DWORD |
static DWORD |
105 |
hash_string (const char *str_param) |
hash_string (const char *str_param) |
120 |
return hval; |
return hval; |
121 |
} |
} |
122 |
|
|
123 |
|
/* Missing W32 functions. */ |
124 |
|
static char* |
125 |
|
w32_stpcpy (char *a,const char *b) |
126 |
|
{ |
127 |
|
while (*b) |
128 |
|
*a++ = *b++; |
129 |
|
*a = 0; |
130 |
|
return (char*)a; |
131 |
|
} |
132 |
|
|
133 |
|
|
134 |
|
|
135 |
static struct loaded_domain * |
static struct loaded_domain * |
136 |
load_domain( const char *filename ) |
load_domain( const char *filename ) |
284 |
size_t act = 0; |
size_t act = 0; |
285 |
size_t top, bottom; |
size_t top, bottom; |
286 |
|
|
287 |
if( !(domain = the_domain) ) |
if (!(domain = the_domain)) |
288 |
goto not_found; |
goto not_found; |
289 |
|
|
290 |
/* Locate the MSGID and its translation. */ |
/* Locate the MSGID and its translation. */ |