ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/numeric.c
(Generate patch)

Comparing ircd-hybrid-8/src/numeric.c (file contents):
Revision 1309 by michael, Sun Mar 25 11:24:18 2012 UTC vs.
Revision 1325 by michael, Sat Mar 31 10:29:02 2012 UTC

# Line 28 | Line 28
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"
# Line 120 | Line 119 | set_locale(const char *locale)
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! ;> */
# Line 143 | Line 142 | set_locale(const char *locale)
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] == ';')
# Line 210 | Line 209 | set_locale(const char *locale)
209        res = 0;
210      }
211    }
212 <  fbclose(f);
212 >  fclose(f);
213  
214    strlcpy(used_locale, locale, sizeof(used_locale));
215    if (!res)

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)