Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/wordexp.h
+++ new/usr/src/head/wordexp.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 /*
28 30 * Copyright 1985, 1992 by Mortice Kern Systems Inc. All rights reserved.
29 31 */
30 32
31 33 #ifndef _WORDEXP_H
32 34 #define _WORDEXP_H
33 35
34 -#pragma ident "%Z%%M% %I% %E% SMI"
35 -
36 36 #include <sys/feature_tests.h>
37 37 #include <sys/types.h>
38 38
39 39 #ifdef __cplusplus
40 40 extern "C" {
41 41 #endif
42 42
43 43 typedef struct wordexp_t {
44 44 size_t we_wordc; /* Count of paths matched by pattern */
45 45 char **we_wordv; /* List of matched pathnames */
46 46 size_t we_offs; /* # of slots reserved in we_pathv */
47 47 /* following are internal to the implementation */
48 48 char **we_wordp; /* we_pathv + we_offs */
49 49 int we_wordn; /* # of elements allocated */
50 50 } wordexp_t;
51 51
52 52 /*
53 53 * wordexp flags.
54 54 */
55 55 #define WRDE_APPEND 0x0001 /* append to existing wordexp_t */
56 56 #define WRDE_DOOFFS 0x0002 /* use we_offs */
57 57 #define WRDE_NOCMD 0x0004 /* don't allow $() */
58 58 #define WRDE_REUSE 0x0008
59 59 #define WRDE_SHOWERR 0x0010 /* don't 2>/dev/null */
60 60 #define WRDE_UNDEF 0x0020 /* set -u */
61 61
62 62 /*
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
63 63 * wordexp errors.
64 64 */
65 65 #define WRDE_ERRNO (2) /* error in "errno" */
66 66 #define WRDE_BADCHAR (3) /* shell syntax character */
67 67 #define WRDE_BADVAL (4) /* undefined variable expanded */
68 68 #define WRDE_CMDSUB (5) /* prohibited $() */
69 69 #define WRDE_NOSPACE (6) /* no memory */
70 70 #define WRDE_SYNTAX (7) /* bad syntax */
71 71 #define WRDE_NOSYS (8) /* function not supported (XPG4) */
72 72
73 -#ifdef __STDC__
74 73 extern int wordexp(const char *_RESTRICT_KYWD, wordexp_t *_RESTRICT_KYWD, int);
75 74 extern void wordfree(wordexp_t *);
76 -#else
77 -extern int wordexp();
78 -extern void wordfree();
79 -#endif
80 75
81 76 #ifdef __cplusplus
82 77 }
83 78 #endif
84 79
85 80 #endif /* _WORDEXP_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX