source: NonGTP/FLTK/include/fltk/string.h.in @ 773

Revision 773, 3.4 KB checked in by gumbau, 19 years ago (diff)

FLTK imported to SVN repository to be linked agains the GeoTool? application

RevLine 
[773]1/* "$Id: string.h.in 4115 2005-03-14 04:48:51Z spitzak $"
2 *
3 * Copyright 1998-2005 by Bill Spitzak and others.
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 *
17 * Please report all bugs and problems to "fltk-bugs@fltk.org".
18 */
19
20/* This file was produced by the fltk configure script, and is thus
21   platform-specific. You may be able to use the unmodified string.h
22   included in the fltk source instead, it has different #if statements
23   to make it portable to the most popular platforms.
24*/
25
26#ifndef fltk_string_h
27#define fltk_string_h
28
29#undef HAVE_STRING_H
30#undef HAVE_STRINGS_H
31
32#undef HAVE_VSNPRINTF
33#undef HAVE_SNPRINTF
34#undef HAVE_STRCASECMP
35#undef HAVE_STRLCAT
36#undef HAVE_STRLCPY
37#undef HAVE_STRNCASECMP
38
39#include "FL_API.h"
40
41#ifdef HAVE_STRING_H
42# include <string.h>
43#elif defined(HAVE_STRINGS_H)
44# include <strings.h>
45#endif
46
47#if 1 /* for va_list */
48# include <stdarg.h>
49#endif
50
51#if 1 /* for sprintf, vsprintf, snprintf and vsnprintf */
52# include <stdio.h>
53#endif
54
55#if 0
56# include <stdlib.h>
57#endif
58
59#if 0
60# include <ctype.h>
61/* Unixware defines these macros in above header for the obsolete BSD
62   functions, get rid of them as it prevents you making a variable
63   named "index"! */
64# ifdef index
65#  undef index
66# endif
67# ifdef rindex
68#  undef rindex
69# endif
70#endif
71
72#if 0 /*defined(__MWERKS__)*/
73/* MetroWerks' CodeWarrior put some functions in <extras.h> but that
74   file does not play well with others, so we don't include it. */
75# include <extras.h>
76#endif
77
78/* Windows has equivalent functions, but being Microsoft they added
79   gratuitoius changes to the names to stop code from being portable: */
80#if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__EMX__)
81# define strcasecmp(s,t)        stricmp(s, t)
82# define strncasecmp(s,t,n)     strnicmp(s, t, n)
83# define vsnprintf              _vsnprintf
84# define snprintf               _snprintf
85#endif
86
87/*! \addtogroup utilities
88  \{ */
89
90#ifdef __cplusplus
91extern "C" {
92#endif
93
94FL_API extern const char* newstring(const char *);
95
96#if defined(DOXYGEN) || !defined(HAVE_STRCASECMP)
97FL_API extern int strcasecmp(const char *, const char *);
98#endif
99
100#if defined(DOXYGEN) || !defined(HAVE_STRNCASECMP)
101FL_API extern int strncasecmp(const char *, const char *, size_t);
102#endif
103
104#if defined(DOXYGEN) || !defined(HAVE_SNPRINTF)
105FL_API extern int snprintf(char *, size_t, const char *, ...);
106#endif
107
108#if defined(DOXYGEN) || !defined(HAVE_VSNPRINTF)
109FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap);
110#endif
111
112#if defined(DOXYGEN) || !defined(HAVE_STRLCAT)
113FL_API extern size_t strlcat(char *, const char *, size_t);
114#endif
115
116#if defined(DOXYGEN) || !defined(HAVE_STRLCPY)
117FL_API extern size_t strlcpy(char *, const char *, size_t);
118#endif
119
120#ifdef __cplusplus
121}
122#endif
123
124/*! \} */
125
126#endif
127
128/*
129 * End of "$Id: string.h.in 4115 2005-03-14 04:48:51Z spitzak $".
130 */
Note: See TracBrowser for help on using the repository browser.