| 28 |
|
#include "irc_string.h" |
| 29 |
|
#include "memory.h" |
| 30 |
|
#include "log.h" |
| 31 |
– |
#include "fileio.h" |
| 31 |
|
#include "send.h" |
| 32 |
|
#include "client.h" |
| 33 |
|
#include "messages.tab" |
| 119 |
|
int i, res = 1, linecnt = 0; |
| 120 |
|
char buffer[IRCD_BUFSIZE + 1]; |
| 121 |
|
char *ident, *reply; |
| 122 |
< |
FBFILE *f; |
| 122 |
> |
FILE *f; |
| 123 |
|
|
| 124 |
|
/* Restore standard replies */ |
| 125 |
|
for (i = 0; i <= ERR_LAST_ERR_MSG; i++) /* 0 isn't a magic number! ;> */ |
| 142 |
|
* of MSGPATH. |
| 143 |
|
*/ |
| 144 |
|
snprintf(buffer, sizeof(buffer), "%s/%s.lang", MSGPATH, locale); |
| 145 |
< |
if ((f = fbopen(buffer, "r")) == NULL) |
| 145 |
> |
if ((f = fopen(buffer, "r")) == NULL) |
| 146 |
|
{ |
| 147 |
|
strlcpy(used_locale, "standard", sizeof(used_locale)); /* XXX */ |
| 148 |
|
return; |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
/* Process the language file */ |
| 152 |
< |
while (fbgets(buffer, sizeof(buffer), f)) |
| 152 |
> |
while (fgets(buffer, sizeof(buffer), f)) |
| 153 |
|
{ |
| 154 |
|
++linecnt; |
| 155 |
|
if (buffer[0] == ';') |
| 209 |
|
res = 0; |
| 210 |
|
} |
| 211 |
|
} |
| 212 |
< |
fbclose(f); |
| 212 |
> |
fclose(f); |
| 213 |
|
|
| 214 |
|
strlcpy(used_locale, locale, sizeof(used_locale)); |
| 215 |
|
if (!res) |