Deleted Added
full compact
getopt_long.c (126518) getopt_long.c (126535)
1/* $OpenBSD: getopt_long.c,v 1.16 2004/02/04 18:17:25 millert Exp $ */
2/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
3
4/*
5 * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

57 */
58
59#if 0
60#if defined(LIBC_SCCS) && !defined(lint)
61static char *rcsid = "$OpenBSD: getopt_long.c,v 1.16 2004/02/04 18:17:25 millert Exp $";
62#endif /* LIBC_SCCS and not lint */
63#endif
64#include <sys/cdefs.h>
1/* $OpenBSD: getopt_long.c,v 1.16 2004/02/04 18:17:25 millert Exp $ */
2/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
3
4/*
5 * Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

57 */
58
59#if 0
60#if defined(LIBC_SCCS) && !defined(lint)
61static char *rcsid = "$OpenBSD: getopt_long.c,v 1.16 2004/02/04 18:17:25 millert Exp $";
62#endif /* LIBC_SCCS and not lint */
63#endif
64#include <sys/cdefs.h>
65__FBSDID("$FreeBSD: head/lib/libc/stdlib/getopt_long.c 126518 2004-03-03 03:05:21Z ache $");
65__FBSDID("$FreeBSD: head/lib/libc/stdlib/getopt_long.c 126535 2004-03-03 08:29:00Z ache $");
66
67#include <err.h>
68#include <errno.h>
69#include <getopt.h>
70#include <stdlib.h>
71#include <string.h>
72
73#define GNU_COMPATIBLE /* Be more compatible, configure's use us! */

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

279 current_argv);
280 /*
281 * XXX: GNU sets optopt to val regardless of flag
282 */
283 if (long_options[match].flag == NULL)
284 optopt = long_options[match].val;
285 else
286 optopt = 0;
66
67#include <err.h>
68#include <errno.h>
69#include <getopt.h>
70#include <stdlib.h>
71#include <string.h>
72
73#define GNU_COMPATIBLE /* Be more compatible, configure's use us! */

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

279 current_argv);
280 /*
281 * XXX: GNU sets optopt to val regardless of flag
282 */
283 if (long_options[match].flag == NULL)
284 optopt = long_options[match].val;
285 else
286 optopt = 0;
287#ifdef GNU_COMPATIBLE
288 return (BADCH);
289#else
287 return (BADARG);
290 return (BADARG);
291#endif
288 }
289 if (long_options[match].has_arg == required_argument ||
290 long_options[match].has_arg == optional_argument) {
291 if (has_equal)
292 optarg = has_equal;
293 else if (long_options[match].has_arg ==
294 required_argument) {
295 /*

--- 329 unchanged lines hidden ---
292 }
293 if (long_options[match].has_arg == required_argument ||
294 long_options[match].has_arg == optional_argument) {
295 if (has_equal)
296 optarg = has_equal;
297 else if (long_options[match].has_arg ==
298 required_argument) {
299 /*

--- 329 unchanged lines hidden ---