]>
git.ipfire.org Git - thirdparty/cups.git/blob - cups/string.h
2 * "$Id: string.h 5047 2006-02-02 05:14:15Z mike $"
4 * String definitions for the Common UNIX Printing System (CUPS).
6 * Copyright 1997-2006 by Easy Software Products.
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
15 * Attn: CUPS Licensing Information
16 * Easy Software Products
17 * 44141 Airport View Drive, Suite 204
18 * Hollywood, Maryland 20636 USA
20 * Voice: (301) 373-9600
21 * EMail: cups-info@cups.org
22 * WWW: http://www.cups.org
24 * This file is subject to the Apple OS-Developed Software exception.
27 #ifndef _CUPS_STRING_H_
28 # define _CUPS_STRING_H_
31 * Include necessary headers...
42 # endif /* HAVE_STRING_H */
44 # ifdef HAVE_STRINGS_H
46 # endif /* HAVE_STRINGS_H */
48 # ifdef HAVE_BSTRING_H
50 # endif /* HAVE_BSTRING_H */
54 * Stuff for WIN32 and OS/2...
57 # if defined(WIN32) || defined(__EMX__)
58 # define strcasecmp stricmp
59 # define strncasecmp strnicmp
60 # endif /* WIN32 || __EMX__ */
69 # endif /* __cplusplus */
73 * String pool structures...
76 typedef struct _cups_sp_item_s
/**** String Pool Item ****/
78 char *str
; /* String */
79 unsigned int ref_count
; /* Reference count */
87 extern void _cups_strcpy(char *dst
, const char *src
);
90 extern char *_cups_strdup(const char *);
91 # define strdup _cups_strdup
92 # endif /* !HAVE_STRDUP */
94 # ifndef HAVE_STRCASECMP
95 extern int _cups_strcasecmp(const char *, const char *);
96 # define strcasecmp _cups_strcasecmp
97 # endif /* !HAVE_STRCASECMP */
99 # ifndef HAVE_STRNCASECMP
100 extern int _cups_strncasecmp(const char *, const char *, size_t n
);
101 # define strncasecmp _cups_strncasecmp
102 # endif /* !HAVE_STRNCASECMP */
104 # ifndef HAVE_STRLCAT
105 extern size_t _cups_strlcat(char *, const char *, size_t);
106 # define strlcat _cups_strlcat
107 # endif /* !HAVE_STRLCAT */
109 # ifndef HAVE_STRLCPY
110 extern size_t _cups_strlcpy(char *, const char *, size_t);
111 # define strlcpy _cups_strlcpy
112 # endif /* !HAVE_STRLCPY */
114 # ifndef HAVE_SNPRINTF
115 extern int _cups_snprintf(char *, size_t, const char *, ...)
117 __attribute__ ((__format__ (__printf__
, 3, 4)))
118 # endif /* __GNUC__ */
120 # define snprintf _cups_snprintf
121 # endif /* !HAVE_SNPRINTF */
123 # ifndef HAVE_VSNPRINTF
124 extern int _cups_vsnprintf(char *, size_t, const char *, va_list);
125 # define vsnprintf _cups_vsnprintf
126 # endif /* !HAVE_VSNPRINTF */
129 * String pool functions...
132 extern char *_cups_sp_alloc(const char *s
);
133 extern void _cups_sp_free(const char *s
);
134 extern size_t _cups_sp_statistics(size_t *alloc_bytes
, size_t *total_bytes
);
143 # endif /* __cplusplus */
145 #endif /* !_CUPS_STRING_H_ */
148 * End of "$Id: string.h 5047 2006-02-02 05:14:15Z mike $".