home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / id-utils-3.2-src.tgz / tar.out / fsf / id-utils / lib / xstring.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  1KB  |  45 lines

  1. /* xstring.h - string declarations wrapper wrapper
  2.    Copyright (C) 1986, 1995, 1996 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.   
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.   
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  17.  
  18. #ifndef _xstring_h_
  19. #define _xstring_h_
  20.  
  21. #define dirname sidestep_dirname_declaration
  22. #define basename sidestep_basename_declaration
  23. #ifdef HAVE_STRING_H
  24. # if !STDC_HEADERS && HAVE_MEMORY_H
  25. #  include <memory.h>
  26. # endif
  27. # include <string.h>
  28. #else
  29. # include <strings.h>
  30. char *memchr ();
  31. #endif
  32. #undef dirname
  33. #undef basename
  34.  
  35. #define strequ(s1, s2)        (strcmp ((s1), (s2)) == 0)
  36. #define strnequ(s1, s2, n)    (strncmp ((s1), (s2), (n)) == 0)
  37.  
  38. #if !HAVE_STRNDUP
  39. extern char *strndup __P((char const *, size_t n));
  40. #endif
  41. extern char *basename __P((char const *));
  42. extern char *dirname __P((char const *));
  43.  
  44. #endif /* not _xstring_h_ */
  45.