OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [intl/] [l10nflist.c] - Diff between revs 578 and 1765

Only display areas with differences | Details | Blame | View Log

Rev 578 Rev 1765
/* Handle list of needed message catalogs
/* Handle list of needed message catalogs
   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   the Free Software Foundation; either version 2, or (at your option)
   any later version.
   any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <config.h>
#endif
#endif
 
 
 
 
#if defined HAVE_STRING_H || defined _LIBC
#if defined HAVE_STRING_H || defined _LIBC
# ifndef _GNU_SOURCE
# ifndef _GNU_SOURCE
#  define _GNU_SOURCE   1
#  define _GNU_SOURCE   1
# endif
# endif
# include <string.h>
# include <string.h>
#else
#else
# include <strings.h>
# include <strings.h>
# ifndef memcpy
# ifndef memcpy
#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
# endif
#endif
#endif
#if !HAVE_STRCHR && !defined _LIBC
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# ifndef strchr
#  define strchr index
#  define strchr index
# endif
# endif
#endif
#endif
 
 
#if defined _LIBC || defined HAVE_ARGZ_H
#if defined _LIBC || defined HAVE_ARGZ_H
# include <argz.h>
# include <argz.h>
#endif
#endif
#include <ctype.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/types.h>
 
 
#if defined STDC_HEADERS || defined _LIBC
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
# include <stdlib.h>
#endif
#endif
 
 
#include "loadinfo.h"
#include "loadinfo.h"
 
 
/* On some strange systems still no definition of NULL is found.  Sigh!  */
/* On some strange systems still no definition of NULL is found.  Sigh!  */
#ifndef NULL
#ifndef NULL
# if defined __STDC__ && __STDC__
# if defined __STDC__ && __STDC__
#  define NULL ((void *) 0)
#  define NULL ((void *) 0)
# else
# else
#  define NULL 0
#  define NULL 0
# endif
# endif
#endif
#endif
 
 
/* @@ end of prolog @@ */
/* @@ end of prolog @@ */
 
 
#ifdef _LIBC
#ifdef _LIBC
/* Rename the non ANSI C functions.  This is required by the standard
/* Rename the non ANSI C functions.  This is required by the standard
   because some ANSI C functions will require linking with this object
   because some ANSI C functions will require linking with this object
   file and the name space must not be polluted.  */
   file and the name space must not be polluted.  */
# define stpcpy(dest, src) __stpcpy(dest, src)
# define stpcpy(dest, src) __stpcpy(dest, src)
#else
#else
# ifndef HAVE_STPCPY
# ifndef HAVE_STPCPY
static char *stpcpy PARAMS ((char *dest, const char *src));
static char *stpcpy PARAMS ((char *dest, const char *src));
# endif
# endif
#endif
#endif
 
 
/* Define function which are usually not available.  */
/* Define function which are usually not available.  */
 
 
#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
/* Returns the number of strings in ARGZ.  */
/* Returns the number of strings in ARGZ.  */
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
static size_t argz_count__ PARAMS ((const char *argz, size_t len));
 
 
static size_t
static size_t
argz_count__ (argz, len)
argz_count__ (argz, len)
     const char *argz;
     const char *argz;
     size_t len;
     size_t len;
{
{
  size_t count = 0;
  size_t count = 0;
  while (len > 0)
  while (len > 0)
    {
    {
      size_t part_len = strlen (argz);
      size_t part_len = strlen (argz);
      argz += part_len + 1;
      argz += part_len + 1;
      len -= part_len + 1;
      len -= part_len + 1;
      count++;
      count++;
    }
    }
  return count;
  return count;
}
}
# undef __argz_count
# undef __argz_count
# define __argz_count(argz, len) argz_count__ (argz, len)
# define __argz_count(argz, len) argz_count__ (argz, len)
#endif  /* !_LIBC && !HAVE___ARGZ_COUNT */
#endif  /* !_LIBC && !HAVE___ARGZ_COUNT */
 
 
#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
   except the last into the character SEP.  */
   except the last into the character SEP.  */
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
 
 
static void
static void
argz_stringify__ (argz, len, sep)
argz_stringify__ (argz, len, sep)
     char *argz;
     char *argz;
     size_t len;
     size_t len;
     int sep;
     int sep;
{
{
  while (len > 0)
  while (len > 0)
    {
    {
      size_t part_len = strlen (argz);
      size_t part_len = strlen (argz);
      argz += part_len;
      argz += part_len;
      len -= part_len + 1;
      len -= part_len + 1;
      if (len > 0)
      if (len > 0)
        *argz++ = sep;
        *argz++ = sep;
    }
    }
}
}
# undef __argz_stringify
# undef __argz_stringify
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
#endif  /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
#endif  /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
 
 
#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
                                  const char *entry));
                                  const char *entry));
 
 
static char *
static char *
argz_next__ (argz, argz_len, entry)
argz_next__ (argz, argz_len, entry)
     char *argz;
     char *argz;
     size_t argz_len;
     size_t argz_len;
     const char *entry;
     const char *entry;
{
{
  if (entry)
  if (entry)
    {
    {
      if (entry < argz + argz_len)
      if (entry < argz + argz_len)
        entry = strchr (entry, '\0') + 1;
        entry = strchr (entry, '\0') + 1;
 
 
      return entry >= argz + argz_len ? NULL : (char *) entry;
      return entry >= argz + argz_len ? NULL : (char *) entry;
    }
    }
  else
  else
    if (argz_len > 0)
    if (argz_len > 0)
      return argz;
      return argz;
    else
    else
      return 0;
      return 0;
}
}
# undef __argz_next
# undef __argz_next
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
#endif  /* !_LIBC && !HAVE___ARGZ_NEXT */
#endif  /* !_LIBC && !HAVE___ARGZ_NEXT */
 
 
 
 
/* Return number of bits set in X.  */
/* Return number of bits set in X.  */
static int pop PARAMS ((int x));
static int pop PARAMS ((int x));
 
 
static inline int
static inline int
pop (x)
pop (x)
     int x;
     int x;
{
{
  /* We assume that no more than 16 bits are used.  */
  /* We assume that no more than 16 bits are used.  */
  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
  x = ((x >> 4) + x) & 0x0f0f;
  x = ((x >> 4) + x) & 0x0f0f;
  x = ((x >> 8) + x) & 0xff;
  x = ((x >> 8) + x) & 0xff;
 
 
  return x;
  return x;
}
}
 
 


struct loaded_l10nfile *
struct loaded_l10nfile *
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
                    territory, codeset, normalized_codeset, modifier, special,
                    territory, codeset, normalized_codeset, modifier, special,
                    sponsor, revision, filename, do_allocate)
                    sponsor, revision, filename, do_allocate)
     struct loaded_l10nfile **l10nfile_list;
     struct loaded_l10nfile **l10nfile_list;
     const char *dirlist;
     const char *dirlist;
     size_t dirlist_len;
     size_t dirlist_len;
     int mask;
     int mask;
     const char *language;
     const char *language;
     const char *territory;
     const char *territory;
     const char *codeset;
     const char *codeset;
     const char *normalized_codeset;
     const char *normalized_codeset;
     const char *modifier;
     const char *modifier;
     const char *special;
     const char *special;
     const char *sponsor;
     const char *sponsor;
     const char *revision;
     const char *revision;
     const char *filename;
     const char *filename;
     int do_allocate;
     int do_allocate;
{
{
  char *abs_filename;
  char *abs_filename;
  struct loaded_l10nfile *last = NULL;
  struct loaded_l10nfile *last = NULL;
  struct loaded_l10nfile *retval;
  struct loaded_l10nfile *retval;
  char *cp;
  char *cp;
  size_t entries;
  size_t entries;
  int cnt;
  int cnt;
 
 
  /* Allocate room for the full file name.  */
  /* Allocate room for the full file name.  */
  abs_filename = (char *) malloc (dirlist_len
  abs_filename = (char *) malloc (dirlist_len
                                  + strlen (language)
                                  + strlen (language)
                                  + ((mask & TERRITORY) != 0
                                  + ((mask & TERRITORY) != 0
                                     ? strlen (territory) + 1 : 0)
                                     ? strlen (territory) + 1 : 0)
                                  + ((mask & XPG_CODESET) != 0
                                  + ((mask & XPG_CODESET) != 0
                                     ? strlen (codeset) + 1 : 0)
                                     ? strlen (codeset) + 1 : 0)
                                  + ((mask & XPG_NORM_CODESET) != 0
                                  + ((mask & XPG_NORM_CODESET) != 0
                                     ? strlen (normalized_codeset) + 1 : 0)
                                     ? strlen (normalized_codeset) + 1 : 0)
                                  + (((mask & XPG_MODIFIER) != 0
                                  + (((mask & XPG_MODIFIER) != 0
                                      || (mask & CEN_AUDIENCE) != 0)
                                      || (mask & CEN_AUDIENCE) != 0)
                                     ? strlen (modifier) + 1 : 0)
                                     ? strlen (modifier) + 1 : 0)
                                  + ((mask & CEN_SPECIAL) != 0
                                  + ((mask & CEN_SPECIAL) != 0
                                     ? strlen (special) + 1 : 0)
                                     ? strlen (special) + 1 : 0)
                                  + (((mask & CEN_SPONSOR) != 0
                                  + (((mask & CEN_SPONSOR) != 0
                                      || (mask & CEN_REVISION) != 0)
                                      || (mask & CEN_REVISION) != 0)
                                     ? (1 + ((mask & CEN_SPONSOR) != 0
                                     ? (1 + ((mask & CEN_SPONSOR) != 0
                                             ? strlen (sponsor) + 1 : 0)
                                             ? strlen (sponsor) + 1 : 0)
                                        + ((mask & CEN_REVISION) != 0
                                        + ((mask & CEN_REVISION) != 0
                                           ? strlen (revision) + 1 : 0)) : 0)
                                           ? strlen (revision) + 1 : 0)) : 0)
                                  + 1 + strlen (filename) + 1);
                                  + 1 + strlen (filename) + 1);
 
 
  if (abs_filename == NULL)
  if (abs_filename == NULL)
    return NULL;
    return NULL;
 
 
  retval = NULL;
  retval = NULL;
  last = NULL;
  last = NULL;
 
 
  /* Construct file name.  */
  /* Construct file name.  */
  memcpy (abs_filename, dirlist, dirlist_len);
  memcpy (abs_filename, dirlist, dirlist_len);
  __argz_stringify (abs_filename, dirlist_len, ':');
  __argz_stringify (abs_filename, dirlist_len, ':');
  cp = abs_filename + (dirlist_len - 1);
  cp = abs_filename + (dirlist_len - 1);
  *cp++ = '/';
  *cp++ = '/';
  cp = stpcpy (cp, language);
  cp = stpcpy (cp, language);
 
 
  if ((mask & TERRITORY) != 0)
  if ((mask & TERRITORY) != 0)
    {
    {
      *cp++ = '_';
      *cp++ = '_';
      cp = stpcpy (cp, territory);
      cp = stpcpy (cp, territory);
    }
    }
  if ((mask & XPG_CODESET) != 0)
  if ((mask & XPG_CODESET) != 0)
    {
    {
      *cp++ = '.';
      *cp++ = '.';
      cp = stpcpy (cp, codeset);
      cp = stpcpy (cp, codeset);
    }
    }
  if ((mask & XPG_NORM_CODESET) != 0)
  if ((mask & XPG_NORM_CODESET) != 0)
    {
    {
      *cp++ = '.';
      *cp++ = '.';
      cp = stpcpy (cp, normalized_codeset);
      cp = stpcpy (cp, normalized_codeset);
    }
    }
  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
    {
    {
      /* This component can be part of both syntaces but has different
      /* This component can be part of both syntaces but has different
         leading characters.  For CEN we use `+', else `@'.  */
         leading characters.  For CEN we use `+', else `@'.  */
      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
      cp = stpcpy (cp, modifier);
      cp = stpcpy (cp, modifier);
    }
    }
  if ((mask & CEN_SPECIAL) != 0)
  if ((mask & CEN_SPECIAL) != 0)
    {
    {
      *cp++ = '+';
      *cp++ = '+';
      cp = stpcpy (cp, special);
      cp = stpcpy (cp, special);
    }
    }
  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
    {
    {
      *cp++ = ',';
      *cp++ = ',';
      if ((mask & CEN_SPONSOR) != 0)
      if ((mask & CEN_SPONSOR) != 0)
        cp = stpcpy (cp, sponsor);
        cp = stpcpy (cp, sponsor);
      if ((mask & CEN_REVISION) != 0)
      if ((mask & CEN_REVISION) != 0)
        {
        {
          *cp++ = '_';
          *cp++ = '_';
          cp = stpcpy (cp, revision);
          cp = stpcpy (cp, revision);
        }
        }
    }
    }
 
 
  *cp++ = '/';
  *cp++ = '/';
  stpcpy (cp, filename);
  stpcpy (cp, filename);
 
 
  /* Look in list of already loaded domains whether it is already
  /* Look in list of already loaded domains whether it is already
     available.  */
     available.  */
  last = NULL;
  last = NULL;
  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
    if (retval->filename != NULL)
    if (retval->filename != NULL)
      {
      {
        int compare = strcmp (retval->filename, abs_filename);
        int compare = strcmp (retval->filename, abs_filename);
        if (compare == 0)
        if (compare == 0)
          /* We found it!  */
          /* We found it!  */
          break;
          break;
        if (compare < 0)
        if (compare < 0)
          {
          {
            /* It's not in the list.  */
            /* It's not in the list.  */
            retval = NULL;
            retval = NULL;
            break;
            break;
          }
          }
 
 
        last = retval;
        last = retval;
      }
      }
 
 
  if (retval != NULL || do_allocate == 0)
  if (retval != NULL || do_allocate == 0)
    {
    {
      free (abs_filename);
      free (abs_filename);
      return retval;
      return retval;
    }
    }
 
 
  retval = (struct loaded_l10nfile *)
  retval = (struct loaded_l10nfile *)
    malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
    malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
                                * (1 << pop (mask))
                                * (1 << pop (mask))
                                * sizeof (struct loaded_l10nfile *)));
                                * sizeof (struct loaded_l10nfile *)));
  if (retval == NULL)
  if (retval == NULL)
    return NULL;
    return NULL;
 
 
  retval->filename = abs_filename;
  retval->filename = abs_filename;
  retval->decided = (__argz_count (dirlist, dirlist_len) != 1
  retval->decided = (__argz_count (dirlist, dirlist_len) != 1
                     || ((mask & XPG_CODESET) != 0
                     || ((mask & XPG_CODESET) != 0
                         && (mask & XPG_NORM_CODESET) != 0));
                         && (mask & XPG_NORM_CODESET) != 0));
  retval->data = NULL;
  retval->data = NULL;
 
 
  if (last == NULL)
  if (last == NULL)
    {
    {
      retval->next = *l10nfile_list;
      retval->next = *l10nfile_list;
      *l10nfile_list = retval;
      *l10nfile_list = retval;
    }
    }
  else
  else
    {
    {
      retval->next = last->next;
      retval->next = last->next;
      last->next = retval;
      last->next = retval;
    }
    }
 
 
  entries = 0;
  entries = 0;
  /* If the DIRLIST is a real list the RETVAL entry corresponds not to
  /* If the DIRLIST is a real list the RETVAL entry corresponds not to
     a real file.  So we have to use the DIRLIST separation mechanism
     a real file.  So we have to use the DIRLIST separation mechanism
     of the inner loop.  */
     of the inner loop.  */
  cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
  cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
  for (; cnt >= 0; --cnt)
  for (; cnt >= 0; --cnt)
    if ((cnt & ~mask) == 0
    if ((cnt & ~mask) == 0
        && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
        && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
        && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
        && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
      {
      {
        /* Iterate over all elements of the DIRLIST.  */
        /* Iterate over all elements of the DIRLIST.  */
        char *dir = NULL;
        char *dir = NULL;
 
 
        while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
        while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
               != NULL)
               != NULL)
          retval->successor[entries++]
          retval->successor[entries++]
            = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
            = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
                                  language, territory, codeset,
                                  language, territory, codeset,
                                  normalized_codeset, modifier, special,
                                  normalized_codeset, modifier, special,
                                  sponsor, revision, filename, 1);
                                  sponsor, revision, filename, 1);
      }
      }
  retval->successor[entries] = NULL;
  retval->successor[entries] = NULL;
 
 
  return retval;
  return retval;
}
}


/* Normalize codeset name.  There is no standard for the codeset
/* Normalize codeset name.  There is no standard for the codeset
   names.  Normalization allows the user to use any of the common
   names.  Normalization allows the user to use any of the common
   names.  */
   names.  */
const char *
const char *
_nl_normalize_codeset (codeset, name_len)
_nl_normalize_codeset (codeset, name_len)
     const char *codeset;
     const char *codeset;
     size_t name_len;
     size_t name_len;
{
{
  int len = 0;
  int len = 0;
  int only_digit = 1;
  int only_digit = 1;
  char *retval;
  char *retval;
  char *wp;
  char *wp;
  size_t cnt;
  size_t cnt;
 
 
  for (cnt = 0; cnt < name_len; ++cnt)
  for (cnt = 0; cnt < name_len; ++cnt)
    if (isalnum (codeset[cnt]))
    if (isalnum (codeset[cnt]))
      {
      {
        ++len;
        ++len;
 
 
        if (isalpha (codeset[cnt]))
        if (isalpha (codeset[cnt]))
          only_digit = 0;
          only_digit = 0;
      }
      }
 
 
  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
 
 
  if (retval != NULL)
  if (retval != NULL)
    {
    {
      if (only_digit)
      if (only_digit)
        wp = stpcpy (retval, "iso");
        wp = stpcpy (retval, "iso");
      else
      else
        wp = retval;
        wp = retval;
 
 
      for (cnt = 0; cnt < name_len; ++cnt)
      for (cnt = 0; cnt < name_len; ++cnt)
        if (isalpha (codeset[cnt]))
        if (isalpha (codeset[cnt]))
          *wp++ = tolower (codeset[cnt]);
          *wp++ = tolower (codeset[cnt]);
        else if (isdigit (codeset[cnt]))
        else if (isdigit (codeset[cnt]))
          *wp++ = codeset[cnt];
          *wp++ = codeset[cnt];
 
 
      *wp = '\0';
      *wp = '\0';
    }
    }
 
 
  return (const char *) retval;
  return (const char *) retval;
}
}
 
 
 
 
/* @@ begin of epilog @@ */
/* @@ begin of epilog @@ */
 
 
/* We don't want libintl.a to depend on any other library.  So we
/* We don't want libintl.a to depend on any other library.  So we
   avoid the non-standard function stpcpy.  In GNU C Library this
   avoid the non-standard function stpcpy.  In GNU C Library this
   function is available, though.  Also allow the symbol HAVE_STPCPY
   function is available, though.  Also allow the symbol HAVE_STPCPY
   to be defined.  */
   to be defined.  */
#if !_LIBC && !HAVE_STPCPY
#if !_LIBC && !HAVE_STPCPY
static char *
static char *
stpcpy (dest, src)
stpcpy (dest, src)
     char *dest;
     char *dest;
     const char *src;
     const char *src;
{
{
  while ((*dest++ = *src++) != '\0')
  while ((*dest++ = *src++) != '\0')
    /* Do nothing. */ ;
    /* Do nothing. */ ;
  return dest - 1;
  return dest - 1;
}
}
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.