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.11 by root, Thu Feb 27 06:14:29 2020 UTC vs.
Revision 1.12 by root, Fri Dec 11 20:09:23 2020 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.11 2020/02/27 06:14:29 root Exp $ 13 * $Id: fptools.h,v 1.12 2020/12/11 20:09:23 root Exp $
14 */ 14 */
15 15
16#ifndef FPTOOLS_H__ 16#ifndef FPTOOLS_H__
17#define FPTOOLS_H__ 17#define FPTOOLS_H__
18 18
29 29
30#ifdef __cplusplus 30#ifdef __cplusplus
31extern "C" { 31extern "C" {
32#endif 32#endif
33 33
34#define _FP_free FP_free 34#if HAVE_GETC_UNLOCKED
35#define _FP_strdup FP_strdup 35# define FP_getc(s) getc_unlocked (s)
36#define _FP_strncpy FP_strncpy 36#else
37#define _FP_memdup FP_memdup 37# define FP_getc(s) getc (s)
38#define _FP_stricmp FP_stricmp 38#endif
39#define _FP_strnicmp FP_strnicmp
40#define _FP_strrstr FP_strrstr
41#define _FP_stoupper FP_stoupper
42#define _FP_stolower FP_stolower
43#define _FP_strmatch FP_strmatch
44#define _FP_strstr FP_strstr
45#define _FP_stristr FP_stristr
46#define _FP_strirstr FP_strirstr
47#define _FP_strrchr FP_strrchr
48#define _FP_fgets FP_fgets
49#define _FP_strpbrk FP_strpbrk
50#define _FP_strtok FP_strtok
51#define _FP_cutdir FP_cutdir
52#define _FP_strerror FP_strerror
53#define _FP_tempnam FP_tempnam
54#define _FP_fgetc FP_fgetc
55 39
56#if HAVE_FGETC_UNLOCKED 40#if HAVE_FEOF_UNLOCKED
57# define FP_fgetc(s) fgetc_unlocked (s) 41# define FP_feof(s) feof_unlocked (s)
58#else 42#else
59# define FP_fgetc(s) fgetc (s) 43# define FP_feof(s) feof (s)
44#endif
45
46#if HAVE_FERROR_UNLOCKED
47# define FP_ferror(s) ferror_unlocked (s)
48#else
49# define FP_ferror(s) ferror (s)
60#endif 50#endif
61 51
62#define FP_strstr(a,b) strstr (a, b) 52#define FP_strstr(a,b) strstr (a, b)
63 53
64void TOOLEXPORT _FP_free (void *); 54void TOOLEXPORT FP_free (void *);
65char * TOOLEXPORT _FP_strdup (char *); 55char * TOOLEXPORT FP_strdup (char *);
66char * TOOLEXPORT _FP_strncpy (char *, char *, int); 56char * TOOLEXPORT FP_strncpy (char *, char *, int);
67void * TOOLEXPORT _FP_memdup (void *, int); 57void * TOOLEXPORT FP_memdup (void *, int);
68int TOOLEXPORT _FP_stricmp (const char *, const char *); 58int TOOLEXPORT FP_stricmp (const char *, const char *);
69int TOOLEXPORT _FP_strnicmp (const char *, const char *, int); 59int TOOLEXPORT FP_strnicmp (const char *, const char *, int);
70char * TOOLEXPORT _FP_strrstr (char *, char *); 60char * TOOLEXPORT FP_strrstr (char *, char *);
71char * TOOLEXPORT _FP_stoupper (char *); 61char * TOOLEXPORT FP_stoupper (char *);
72char * TOOLEXPORT _FP_stolower (char *); 62char * TOOLEXPORT FP_stolower (char *);
73int TOOLEXPORT _FP_strmatch (char *, char *); 63int TOOLEXPORT FP_strmatch (char *, char *);
74char * TOOLEXPORT _FP_stristr (char *, char *); 64char * TOOLEXPORT FP_stristr (char *, char *);
75char * TOOLEXPORT _FP_strirstr (char *, char *); 65char * TOOLEXPORT FP_strirstr (char *, char *);
76char * TOOLEXPORT _FP_strrchr (char *, int); 66char * TOOLEXPORT FP_strrchr (char *, int);
77char * TOOLEXPORT _FP_fgets (char *, int, FILE *); 67char * TOOLEXPORT FP_fgets (char *, int, FILE *);
78char * TOOLEXPORT _FP_strpbrk (char *, char *); 68char * TOOLEXPORT FP_strpbrk (char *, char *);
79char * TOOLEXPORT _FP_strtok (char *, char *); 69char * TOOLEXPORT FP_strtok (char *, char *);
80char * TOOLEXPORT _FP_cutdir (char *); 70char * TOOLEXPORT FP_cutdir (char *);
81char * TOOLEXPORT _FP_strerror (int); 71char * TOOLEXPORT FP_strerror (int);
82#ifndef HAVE_MKSTEMP 72#ifndef HAVE_MKSTEMP
83char * TOOLEXPORT _FP_tempnam (char *, char *); 73char * TOOLEXPORT FP_tempnam (char *, char *);
84#endif /* HAVE_MKSTEMP */ 74#endif /* HAVE_MKSTEMP */
85 75
86#if 0 /* API differs too much between systems to make those replacements */ 76#if 0 /* API differs too much between systems to make those replacements */
87#if HAVE_STRCASECMP 77#if HAVE_STRCASECMP
88# define FP_stricmp(a,b) strcasecmp (a, b) 78# define FP_stricmp(a,b) strcasecmp (a, b)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines