]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | /* |
2 | * "$Id: string.h 4683 2005-09-21 22:17:44Z mike $" | |
3 | * | |
4 | * String definitions for the Common UNIX Printing System (CUPS). | |
5 | * | |
6 | * Copyright 1997-2005 by Easy Software Products. | |
7 | * | |
8 | * These coded instructions, statements, and computer programs are the | |
9 | * property of Easy Software Products and are protected by Federal | |
10 | * copyright law. Distribution and use rights are outlined in the file | |
11 | * "LICENSE.txt" which should have been included with this file. If this | |
12 | * file is missing or damaged please contact Easy Software Products | |
13 | * at: | |
14 | * | |
15 | * Attn: CUPS Licensing Information | |
16 | * Easy Software Products | |
17 | * 44141 Airport View Drive, Suite 204 | |
18 | * Hollywood, Maryland 20636 USA | |
19 | * | |
20 | * Voice: (301) 373-9600 | |
21 | * EMail: cups-info@cups.org | |
22 | * WWW: http://www.cups.org | |
23 | * | |
24 | * This file is subject to the Apple OS-Developed Software exception. | |
25 | */ | |
26 | ||
27 | #ifndef _CUPS_STRING_H_ | |
28 | # define _CUPS_STRING_H_ | |
29 | ||
30 | /* | |
31 | * Include necessary headers... | |
32 | */ | |
33 | ||
34 | # include <config.h> | |
35 | ||
36 | # include <stdio.h> | |
37 | # include <stdarg.h> | |
38 | # include <ctype.h> | |
39 | ||
40 | # ifdef HAVE_STRING_H | |
41 | # include <string.h> | |
42 | # endif /* HAVE_STRING_H */ | |
43 | ||
44 | # ifdef HAVE_STRINGS_H | |
45 | # include <strings.h> | |
46 | # endif /* HAVE_STRINGS_H */ | |
47 | ||
48 | # ifdef HAVE_BSTRING_H | |
49 | # include <bstring.h> | |
50 | # endif /* HAVE_BSTRING_H */ | |
51 | ||
52 | ||
53 | /* | |
54 | * Stuff for WIN32 and OS/2... | |
55 | */ | |
56 | ||
57 | # if defined(WIN32) || defined(__EMX__) | |
58 | # define strcasecmp stricmp | |
59 | # define strncasecmp strnicmp | |
60 | # endif /* WIN32 || __EMX__ */ | |
61 | ||
62 | ||
63 | /* | |
64 | * C++ magic... | |
65 | */ | |
66 | ||
67 | # ifdef __cplusplus | |
68 | extern "C" { | |
69 | # endif /* __cplusplus */ | |
70 | ||
71 | ||
72 | /* | |
73 | * Prototypes... | |
74 | */ | |
75 | ||
76 | extern void _cups_strcpy(char *dst, const char *src); | |
77 | ||
78 | # ifndef HAVE_STRDUP | |
79 | extern char *_cups_strdup(const char *); | |
80 | # define strdup _cups_strdup | |
81 | # endif /* !HAVE_STRDUP */ | |
82 | ||
83 | # ifndef HAVE_STRCASECMP | |
84 | extern int _cups_strcasecmp(const char *, const char *); | |
85 | # define strcasecmp _cups_strcasecmp | |
86 | # endif /* !HAVE_STRCASECMP */ | |
87 | ||
88 | # ifndef HAVE_STRNCASECMP | |
89 | extern int _cups_strncasecmp(const char *, const char *, size_t n); | |
90 | # define strncasecmp _cups_strncasecmp | |
91 | # endif /* !HAVE_STRNCASECMP */ | |
92 | ||
93 | # ifndef HAVE_STRLCAT | |
94 | extern size_t _cups_strlcat(char *, const char *, size_t); | |
95 | # define strlcat _cups_strlcat | |
96 | # endif /* !HAVE_STRLCAT */ | |
97 | ||
98 | # ifndef HAVE_STRLCPY | |
99 | extern size_t _cups_strlcpy(char *, const char *, size_t); | |
100 | # define strlcpy _cups_strlcpy | |
101 | # endif /* !HAVE_STRLCPY */ | |
102 | ||
103 | # ifndef HAVE_SNPRINTF | |
104 | extern int _cups_snprintf(char *, size_t, const char *, ...) | |
105 | # ifdef __GNUC__ | |
106 | __attribute__ ((__format__ (__printf__, 3, 4))) | |
107 | # endif /* __GNUC__ */ | |
108 | ; | |
109 | # define snprintf _cups_snprintf | |
110 | # endif /* !HAVE_SNPRINTF */ | |
111 | ||
112 | # ifndef HAVE_VSNPRINTF | |
113 | extern int _cups_vsnprintf(char *, size_t, const char *, va_list); | |
114 | # define vsnprintf _cups_vsnprintf | |
115 | # endif /* !HAVE_VSNPRINTF */ | |
116 | ||
117 | ||
118 | /* | |
119 | * C++ magic... | |
120 | */ | |
121 | ||
122 | # ifdef __cplusplus | |
123 | } | |
124 | # endif /* __cplusplus */ | |
125 | ||
126 | #endif /* !_CUPS_STRING_H_ */ | |
127 | ||
128 | /* | |
129 | * End of "$Id: string.h 4683 2005-09-21 22:17:44Z mike $". | |
130 | */ |