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/dcgettext.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    1 /* Implementation of the dcgettext(3) function
    2    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
     1/* Implementation of the dcgettext(3) function.
     2   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    33
    44   This program is free software; you can redistribute it and/or modify
     
    9292   file and the name space must not be polluted.  */
    9393# define getcwd __getcwd
    94 # define stpcpy __stpcpy
     94# ifndef stpcpy
     95#  define stpcpy __stpcpy
     96# endif
    9597#else
    9698# if !defined HAVE_GETCWD
     
    163165/* Prototypes for local functions.  */
    164166static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
    165                                const char *msgid));
    166 static const char *category_to_name PARAMS ((int category));
     167                               const char *msgid)) internal_function;
     168static const char *category_to_name PARAMS ((int category)) internal_function;
    167169static const char *guess_category_value PARAMS ((int category,
    168                                                  const char *categoryname));
     170                                                 const char *categoryname))
     171     internal_function;
    169172
    170173
     
    389392
    390393static char *
     394internal_function
    391395find_msg (domain_file, msgid)
    392396     struct loaded_l10nfile *domain_file;
     
    477481/* Return string representation of locale CATEGORY.  */
    478482static const char *
     483internal_function
    479484category_to_name (category)
    480485     int category;
     
    536541/* Guess value of current locale from value of the environment variables.  */
    537542static const char *
     543internal_function
    538544guess_category_value (category, categoryname)
    539545     int category;
     
    592598}
    593599#endif
     600
     601
     602#ifdef _LIBC
     603/* If we want to free all resources we have to do some work at
     604   program's end.  */
     605static void __attribute__ ((unused))
     606free_mem (void)
     607{
     608  struct binding *runp;
     609
     610  for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
     611    {
     612      free (runp->domainname);
     613      if (runp->dirname != _nl_default_dirname)
     614        /* Yes, this is a pointer comparison.  */
     615        free (runp->dirname);
     616    }
     617
     618  if (_nl_current_default_domain != _nl_default_default_domain)
     619    /* Yes, again a pointer comparison.  */
     620    free ((char *) _nl_current_default_domain);
     621}
     622
     623text_set_element (__libc_subfreeres, free_mem);
     624#endif
Note: See TracChangeset for help on using the changeset viewer.