Back to index

plt-scheme  4.2.1
Defines | Functions | Variables
bindtextdom.c File Reference
#include <strings.h>
#include "libgettext.h"
#include "gettext.h"
#include "gettextP.h"

Go to the source code of this file.

Defines

#define BINDTEXTDOMAIN   bindtextdomain__

Functions

void free ()
 if (domainname==NULL||domainname[0]== '\0')
 if (dirname==NULL)

Variables

const char _nl_default_dirname []
struct binding_nl_domain_bindings
char *const char * domainname
const char * dirname
struct bindingbinding

Define Documentation

#define BINDTEXTDOMAIN   bindtextdomain__

Definition at line 62 of file bindtextdom.c.


Function Documentation

void free ( )
if ( domainname  = NULL || domainname[0] == '\0')

Definition at line 75 of file bindtextdom.c.

    {
      int compare = strcmp (domainname, binding->domainname);
      if (compare == 0)
       /* We found it!  */
       break;
      if (compare < 0)
       {
         /* It is not in the list.  */
         binding = NULL;
         break;
       }
    }

Here is the call graph for this function:

if ( dirname  = NULL)

Definition at line 92 of file bindtextdom.c.

                                                          : binding->dirname;

  if (binding != NULL)
    {
      /* The domain is already bound.  Replace the old binding.  */
      char *new_dirname;

      if (strcmp (dirname, _nl_default_dirname) == 0)
       new_dirname = (char *) _nl_default_dirname;
      else
       {
         size_t len = strlen (dirname) + 1;
         new_dirname = (char *) malloc (len);
         if (new_dirname == NULL)
           return NULL;

         memcpy (new_dirname, dirname, len);
       }

      if (strcmp (binding->dirname, _nl_default_dirname) != 0)
        free (binding->dirname);

      binding->dirname = new_dirname;
    }

Variable Documentation

Definition at line 154 of file dcgettext.c.

Definition at line 158 of file dcgettext.c.

Definition at line 72 of file bindtextdom.c.

const char* dirname

Definition at line 70 of file bindtextdom.c.

char* const char* domainname

Definition at line 69 of file bindtextdom.c.