The R Project SVN R

Rev

Rev 41539 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 41539 Rev 43972
Line 1... Line 1...
1
/* Load needed message catalogs.
1
/* Load needed message catalogs.
2
   Copyright (C) 1995-1999, 2000-2005 Free Software Foundation, Inc.
2
   Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
3
 
3
 
4
   This program is free software; you can redistribute it and/or modify it
4
   This program is free software; you can redistribute it and/or modify it
5
   under the terms of the GNU Library General Public License as published
5
   under the terms of the GNU Library General Public License as published
6
   by the Free Software Foundation; either version 2, or (at your option)
6
   by the Free Software Foundation; either version 2, or (at your option)
7
   any later version.
7
   any later version.
Line 974... Line 974...
974
		  W (domain->must_swap, data->n_sysdep_segments);
974
		  W (domain->must_swap, data->n_sysdep_segments);
975
		sysdep_segments = (const struct sysdep_segment *)
975
		sysdep_segments = (const struct sysdep_segment *)
976
		  ((char *) data
976
		  ((char *) data
977
		   + W (domain->must_swap, data->sysdep_segments_offset));
977
		   + W (domain->must_swap, data->sysdep_segments_offset));
978
		sysdep_segment_values =
978
		sysdep_segment_values =
-
 
979
		  (const char **)
979
		  alloca (n_sysdep_segments * sizeof (const char *));
980
		  alloca (n_sysdep_segments * sizeof (const char *));
980
		for (i = 0; i < n_sysdep_segments; i++)
981
		for (i = 0; i < n_sysdep_segments; i++)
981
		  {
982
		  {
982
		    const char *name =
983
		    const char *name =
983
		      (char *) data
984
		      (char *) data
Line 1272... Line 1273...
1272
    }
1273
    }
1273
 
1274
 
1274
  /* No caches of converted translations so far.  */
1275
  /* No caches of converted translations so far.  */
1275
  domain->conversions = NULL;
1276
  domain->conversions = NULL;
1276
  domain->nconversions = 0;
1277
  domain->nconversions = 0;
-
 
1278
  gl_rwlock_init (domain->conversions_lock);
1277
 
1279
 
1278
  /* Get the header entry and look for a plural specification.  */
1280
  /* Get the header entry and look for a plural specification.  */
1279
#ifdef IN_LIBGLOCALE
1281
#ifdef IN_LIBGLOCALE
1280
  nullentry =
1282
  nullentry =
1281
    _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen);
1283
    _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen);
Line 1301... Line 1303...
1301
_nl_unload_domain (struct loaded_domain *domain)
1303
_nl_unload_domain (struct loaded_domain *domain)
1302
{
1304
{
1303
  size_t i;
1305
  size_t i;
1304
 
1306
 
1305
  if (domain->plural != &__gettext_germanic_plural)
1307
  if (domain->plural != &__gettext_germanic_plural)
1306
    __gettext_free_exp (domain->plural);
1308
    __gettext_free_exp ((struct expression *) domain->plural);
1307
 
1309
 
1308
  for (i = 0; i < domain->nconversions; i++)
1310
  for (i = 0; i < domain->nconversions; i++)
1309
    {
1311
    {
1310
      struct converted_domain *convd = &domain->conversions[i];
1312
      struct converted_domain *convd = &domain->conversions[i];
1311
 
1313
 
Line 1315... Line 1317...
1315
      if (convd->conv != (__gconv_t) -1)
1317
      if (convd->conv != (__gconv_t) -1)
1316
	__gconv_close (convd->conv);
1318
	__gconv_close (convd->conv);
1317
    }
1319
    }
1318
  if (domain->conversions != NULL)
1320
  if (domain->conversions != NULL)
1319
    free (domain->conversions);
1321
    free (domain->conversions);
-
 
1322
  __libc_rwlock_fini (domain->conversions_lock);
1320
 
1323
 
1321
  if (domain->malloced)
1324
  if (domain->malloced)
1322
    free (domain->malloced);
1325
    free (domain->malloced);
1323
 
1326
 
1324
# ifdef _POSIX_MAPPED_FILES
1327
# ifdef _POSIX_MAPPED_FILES