source: project/release/4/readline/tags/4.1.3/trunk/foreign.h @ 34923

Last change on this file since 34923 was 34923, checked in by Alexej Magura, 3 years ago

releasing version 4.1.3: heres to a build that hopefully isnt broken

File size: 2.0 KB
Line 
1/****
2Copyright 2015 Alexej Magura
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15****/
16#if !defined(RDLN_FOREIGN_H_GUARD)
17# define RDLN_FOREIGN_H_GUARD 1
18/* BEGIN_C_DECLS should be used at the beginning of your declarations,
19so that C++ compilers don't mangle their names.  Use END_C_DECLS at
20the end of C declarations. */
21# undef BEGIN_C_DECLS
22# undef END_C_DECLS
23# ifdef __cplusplus
24#  define BEGIN_C_DECLS extern "C" {
25#  define END_C_DECLS }
26# else
27#  define BEGIN_C_DECLS /* empty */
28#  define END_C_DECLS /* empty */
29# endif
30
31/* PARAMS is a macro used to wrap function prototypes, so that
32  compilers that don't understand ANSI C prototypes still work,
33  and ANSI C compilers can issue warnings about type mismatches. */
34# undef PARAMS
35# if defined (__STDC__) || defined (_AIX) \
36     || (defined (__mips) && defined (_SYSTYPE_SVR4))   \
37     || defined(WIN32) || defined(__cplusplus)
38#  define PARAMS(protos) protos
39# else
40#  define PARAMS(protos) ()
41# endif
42
43BEGIN_C_DECLS
44
45# include <stdio.h>
46
47char *concat PARAMS((const char *s1, ...));
48size_t concatl PARAMS((char *dst, size_t sz, const char *s1, ...));
49size_t concatm PARAMS((char *dst, size_t sz, const char *s1, ...));
50
51char cpeek PARAMS((const char *c, const char *s, const short fwd));
52
53int *strndelim PARAMS((const char *s, const char od, const char cd, int count[2]));
54
55char *strwodqp PARAMS((const char *src));
56
57# define cat(...) (concat(__VA_ARGS__, (void *)NULL))
58# define catl(...) (concatl(__VA_ARGS__, (void *)NULL))
59# define catm(...) (concatm(__VA_ARGS__, (void *)NULL))
60
61END_C_DECLS
62
63#endif
Note: See TracBrowser for help on using the repository browser.