Lines 127-132
static int process_file(struct saved_data *data, const char *filename)
Link Here
|
127 |
* |
127 |
* |
128 |
* u32 - magic number |
128 |
* u32 - magic number |
129 |
* u32 - version |
129 |
* u32 - version |
|
|
130 |
* u32 - length of pcre version EXCLUDING nul |
131 |
* char - pcre version string EXCLUDING nul |
130 |
* u32 - number of stems |
132 |
* u32 - number of stems |
131 |
* ** Stems |
133 |
* ** Stems |
132 |
* u32 - length of stem EXCLUDING nul |
134 |
* u32 - length of stem EXCLUDING nul |
Lines 172-177
static int write_binary_file(struct saved_data *data, int fd)
Link Here
|
172 |
if (len != 1) |
174 |
if (len != 1) |
173 |
goto err; |
175 |
goto err; |
174 |
|
176 |
|
|
|
177 |
/* write the pcre version */ |
178 |
section_len = strlen(pcre_version()); |
179 |
len = fwrite(§ion_len, sizeof(uint32_t), 1, bin_file); |
180 |
if (len != 1) |
181 |
goto err; |
182 |
len = fwrite(pcre_version(), sizeof(char), section_len, bin_file); |
183 |
if (len != section_len) |
184 |
goto err; |
185 |
|
175 |
/* write the number of stems coming */ |
186 |
/* write the number of stems coming */ |
176 |
section_len = data->num_stems; |
187 |
section_len = data->num_stems; |
177 |
len = fwrite(§ion_len, sizeof(uint32_t), 1, bin_file); |
188 |
len = fwrite(§ion_len, sizeof(uint32_t), 1, bin_file); |
178 |
- |
|
|