Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/intl/finddomain.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* Handle list of needed message catalogs
    2    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
     2   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    33   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
    44
     
    7171   established bindings.  */
    7272struct loaded_l10nfile *
     73internal_function
    7374_nl_find_domain (dirname, locale, domainname)
    7475     const char *dirname;
     
    9697        language[_territory][+audience][+special][,[sponsor][_revision]]
    9798
    98      Beside the first all of them are allowed to be missing.  If the
    99      full specified locale is not found, the less specific one are
    100      looked for.  The various part will be stripped of according to
     99     Beside the first part all of them are allowed to be missing.  If
     100     the full specified locale is not found, the less specific one are
     101     looked for.  The various parts will be stripped off according to
    101102     the following order:
    102103                (1) revision
     
    143144  if (alias_value != NULL)
    144145    {
     146#if defined _LIBC || defined HAVE_STRDUP
     147      locale = strdup (alias_value);
     148      if (locale == NULL)
     149        return NULL;
     150#else
    145151      size_t len = strlen (alias_value) + 1;
    146152      locale = (char *) malloc (len);
     
    149155
    150156      memcpy (locale, alias_value, len);
     157#endif
    151158    }
    152159
     
    188195  return retval;
    189196}
     197
     198
     199#ifdef _LIBC
     200static void __attribute__ ((unused))
     201free_mem (void)
     202{
     203  struct loaded_l10nfile *runp = _nl_loaded_domains;
     204
     205  while (runp != NULL)
     206    {
     207      struct loaded_l10nfile *here = runp;
     208      if (runp->data != NULL)
     209        _nl_unload_domain ((struct loaded_domain *) runp->data);
     210      runp = runp->next;
     211      free (here);
     212    }
     213}
     214
     215text_set_element (__libc_subfreeres, free_mem);
     216#endif
Note: See TracChangeset for help on using the changeset viewer.