Add libgcc package
[openwrt.git] / package / arpwatch / patches / 010_debian_getopt_patchable
1 Index: arpwatch/arpsnmp.c
2 diff -u arpwatch/arpsnmp.c:1.1.1.1 arpwatch/arpsnmp.c:1.1.1.1.2.1
3 --- arpwatch/arpsnmp.c:1.1.1.1 Tue Apr 17 13:31:36 2001
4 +++ arpwatch/arpsnmp.c Tue Apr 17 13:47:57 2001
5 @@ -78,6 +78,10 @@
6 register char *cp;
7 register int op, i;
8 char errbuf[256];
9 + char options[] =
10 + "d"
11 + "f:"
12 + ;
13
14 if ((cp = strrchr(argv[0], '/')) != NULL)
15 prog = cp + 1;
16 @@ -90,7 +94,7 @@
17 }
18
19 opterr = 0;
20 - while ((op = getopt(argc, argv, "df:")) != EOF)
21 + while ((op = getopt(argc, argv, options)) != EOF)
22 switch (op) {
23
24 case 'd':
25 @@ -181,9 +185,14 @@
26 usage(void)
27 {
28 extern char version[];
29 + char usage[] =
30 + "[-d] "
31 + "[-f datafile] "
32 + "file [...]\n"
33 + ;
34
35 (void)fprintf(stderr, "Version %s\n", version);
36 (void)fprintf(stderr,
37 - "usage: %s [-d] [-f datafile] file [...]\n", prog);
38 + "usage: %s %s", prog, usage);
39 exit(1);
40 }
41 Index: arpwatch/arpwatch.c
42 diff -u arpwatch/arpwatch.c:1.1.1.1 arpwatch/arpwatch.c:1.1.1.1.2.1
43 --- arpwatch/arpwatch.c:1.1.1.1 Tue Apr 17 13:31:36 2001
44 +++ arpwatch/arpwatch.c Tue Apr 17 13:47:57 2001
45 @@ -153,6 +153,14 @@
46 register char *interface, *rfilename;
47 struct bpf_program code;
48 char errbuf[PCAP_ERRBUF_SIZE];
49 + char options[] =
50 + "d"
51 + "f:"
52 + "i:"
53 + "n:"
54 + "N"
55 + "r:"
56 + ;
57
58 if (argv[0] == NULL)
59 prog = "arpwatch";
60 @@ -170,7 +178,7 @@
61 interface = NULL;
62 rfilename = NULL;
63 pd = NULL;
64 - while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
65 + while ((op = getopt(argc, argv, options)) != EOF)
66 switch (op) {
67
68 case 'd':
69 @@ -748,9 +756,16 @@
70 usage(void)
71 {
72 extern char version[];
73 + char usage[] =
74 + "[-dN] "
75 + "[-f datafile] "
76 + "[-i interface] "
77 + "[-n net[/width]] "
78 + "[-r file] "
79 + "\n"
80 + ;
81
82 (void)fprintf(stderr, "Version %s\n", version);
83 - (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
84 - " [-n net[/width]] [-r file]\n", prog);
85 + (void)fprintf(stderr, "usage: %s %s", prog, usage);
86 exit(1);
87 }
This page took 0.046552 seconds and 5 git commands to generate.