Deleted Added
full compact
fparseln.c (84225) fparseln.c (92917)
1/* $NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $ */
2
3/*
4 * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/* $NetBSD: fparseln.c,v 1.9 1999/09/20 04:48:06 lukem Exp $ */
2
3/*
4 * Copyright (c) 1997 Christos Zoulas. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/lib/libutil/fparseln.c 84225 2001-09-30 22:35:07Z dillon $");
33__FBSDID("$FreeBSD: head/lib/libutil/fparseln.c 92917 2002-03-21 23:54:04Z obrien $");
34
35#include <sys/types.h>
36#include <assert.h>
37#include <errno.h>
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <libutil.h>
42
34
35#include <sys/types.h>
36#include <assert.h>
37#include <errno.h>
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <libutil.h>
42
43static int isescaped __P((const char *, const char *, int));
43static int isescaped(const char *, const char *, int);
44
45/* isescaped():
46 * Return true if the character in *p that belongs to a string
47 * that starts in *sp, is escaped by the escape character esc.
48 */
49static int
50isescaped(sp, p, esc)
51 const char *sp, *p;

--- 142 unchanged lines hidden (view full) ---

194
195 if (size)
196 *size = len;
197 return buf;
198}
199
200#ifdef TEST
201
44
45/* isescaped():
46 * Return true if the character in *p that belongs to a string
47 * that starts in *sp, is escaped by the escape character esc.
48 */
49static int
50isescaped(sp, p, esc)
51 const char *sp, *p;

--- 142 unchanged lines hidden (view full) ---

194
195 if (size)
196 *size = len;
197 return buf;
198}
199
200#ifdef TEST
201
202int main __P((int, char **));
202int main(int, char **);
203
204int
205main(argc, argv)
206 int argc;
207 char **argv;
208{
209 char *ptr;
210 size_t size, line;

--- 23 unchanged lines hidden ---
203
204int
205main(argc, argv)
206 int argc;
207 char **argv;
208{
209 char *ptr;
210 size_t size, line;

--- 23 unchanged lines hidden ---