ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Convert-UUlib/uulib/fptools.h
(Generate patch)

Comparing Convert-UUlib/uulib/fptools.h (file contents):
Revision 1.6 by root, Sun Mar 31 22:11:58 2002 UTC vs.
Revision 1.7 by root, Mon Aug 24 06:15:00 2009 UTC

8/* 8/*
9 * Some handy, nonstandard functions. Note that the original may 9 * Some handy, nonstandard functions. Note that the original may
10 * be both faster and better. ``better'', if your compiler allows 10 * be both faster and better. ``better'', if your compiler allows
11 * cleaner use of such functions by proper use of ``const''. 11 * cleaner use of such functions by proper use of ``const''.
12 * 12 *
13 * $Id: fptools.h,v 1.6 2002/03/31 22:11:58 root Exp $ 13 * $Id: fptools.h,v 1.7 2009/08/24 06:15:00 root Exp $
14 */ 14 */
15 15
16#ifndef FPTOOLS_H__ 16#ifndef FPTOOLS_H__
17#define FPTOOLS_H__ 17#define FPTOOLS_H__
18
19#include <string.h>
18 20
19typedef signed char schar; 21typedef signed char schar;
20typedef unsigned char uchar; 22typedef unsigned char uchar;
21 23
22#ifndef TOOLEXPORT 24#ifndef TOOLEXPORT
45#define _FP_strpbrk FP_strpbrk 47#define _FP_strpbrk FP_strpbrk
46#define _FP_strtok FP_strtok 48#define _FP_strtok FP_strtok
47#define _FP_cutdir FP_cutdir 49#define _FP_cutdir FP_cutdir
48#define _FP_strerror FP_strerror 50#define _FP_strerror FP_strerror
49#define _FP_tempnam FP_tempnam 51#define _FP_tempnam FP_tempnam
52#define _FP_fgetc FP_fgetc
53
54#if HAVE_FGETC_UNLOCKED
55# define FP_fgetc(s) fgetc_unlocked (s)
56#else
57# define FP_fgetc(s) fgetc (s)
58#endif
59
60#define FP_strstr(a,b) strstr (a, b)
50 61
51void TOOLEXPORT _FP_free (void *); 62void TOOLEXPORT _FP_free (void *);
52char * TOOLEXPORT _FP_strdup (char *); 63char * TOOLEXPORT _FP_strdup (char *);
53char * TOOLEXPORT _FP_strncpy (char *, char *, int); 64char * TOOLEXPORT _FP_strncpy (char *, char *, int);
54void * TOOLEXPORT _FP_memdup (void *, int); 65void * TOOLEXPORT _FP_memdup (void *, int);
56int TOOLEXPORT _FP_strnicmp (char *, char *, int); 67int TOOLEXPORT _FP_strnicmp (char *, char *, int);
57char * TOOLEXPORT _FP_strrstr (char *, char *); 68char * TOOLEXPORT _FP_strrstr (char *, char *);
58char * TOOLEXPORT _FP_stoupper (char *); 69char * TOOLEXPORT _FP_stoupper (char *);
59char * TOOLEXPORT _FP_stolower (char *); 70char * TOOLEXPORT _FP_stolower (char *);
60int TOOLEXPORT _FP_strmatch (char *, char *); 71int TOOLEXPORT _FP_strmatch (char *, char *);
61char * TOOLEXPORT _FP_strstr (char *, char *);
62char * TOOLEXPORT _FP_stristr (char *, char *); 72char * TOOLEXPORT _FP_stristr (char *, char *);
63char * TOOLEXPORT _FP_strirstr (char *, char *); 73char * TOOLEXPORT _FP_strirstr (char *, char *);
64char * TOOLEXPORT _FP_strrchr (char *, int); 74char * TOOLEXPORT _FP_strrchr (char *, int);
65char * TOOLEXPORT _FP_fgets (char *, int, FILE *); 75char * TOOLEXPORT _FP_fgets (char *, int, FILE *);
66char * TOOLEXPORT _FP_strpbrk (char *, char *); 76char * TOOLEXPORT _FP_strpbrk (char *, char *);
69char * TOOLEXPORT _FP_strerror (int); 79char * TOOLEXPORT _FP_strerror (int);
70#ifndef HAVE_MKSTEMP 80#ifndef HAVE_MKSTEMP
71char * TOOLEXPORT _FP_tempnam (char *, char *); 81char * TOOLEXPORT _FP_tempnam (char *, char *);
72#endif /* HAVE_MKSTEMP */ 82#endif /* HAVE_MKSTEMP */
73 83
84#if HAVE_STRCASECMP
85# define FP_stricmp(a,b) strcasecmp (a, b)
86#endif
87
88#if HAVE_STRNCASECMP
89# define FP_strnicmp(a,b,l) strncasecmp (a, b, l)
90#endif
91
92#if HAVE_STRCASESTR
93# define FP_stristr(a,b) strcasestr (a, b)
94#endif
95
74#ifdef __cplusplus 96#ifdef __cplusplus
75} 97}
76#endif 98#endif
77#endif 99#endif
78 100

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines