Lines 6-32
Link Here
|
6 |
diff -u -r1.1.1.1 -r1.2 |
6 |
diff -u -r1.1.1.1 -r1.2 |
7 |
--- Makefile 3 Apr 2003 13:58:32 -0000 1.1.1.1 |
7 |
--- Makefile 3 Apr 2003 13:58:32 -0000 1.1.1.1 |
8 |
+++ Makefile 3 Apr 2003 14:51:10 -0000 1.2 |
8 |
+++ Makefile 3 Apr 2003 14:51:10 -0000 1.2 |
9 |
@@ -2,20 +2,29 @@ |
9 |
@@ -1,14 +1,19 @@ |
10 |
# bdameron@tscnet.com |
10 |
-CC=gcc |
11 |
# |
11 |
-OPTS=-O2 |
12 |
|
12 |
-LIBS= |
13 |
-CC = gcc |
13 |
-CFLAGS=-Wall -g |
14 |
BIN = autorespond |
14 |
-DESTDIR= |
15 |
-DEFS = -Wall |
15 |
-PREFIX=$(DESTDIR)/usr |
16 |
-LINKDEFS = |
16 |
- |
17 |
-LIBS = |
17 |
all: autorespond |
18 |
-OBJS = autorespond.o |
18 |
|
19 |
|
19 |
-autorespond: autorespond.c |
20 |
-INSTALL_DIR = /usr/local/bin |
20 |
- $(CC) $(OPTS) $(CFLAGS) $(LIBS) $< -o $@ |
21 |
+INSTALL_DIR = `head -1 conf-home`/bin |
|
|
22 |
INSTALL_BIN = autorespond |
23 |
INSTALL_UID = root |
24 |
INSTALL_GID = root |
25 |
|
26 |
-all: |
27 |
- $(CC) $(DEFS) -o autorespond autorespond.c |
28 |
+all: $(BIN) |
29 |
+ |
30 |
+autorespond: load autorespond.o strcasestr.o |
21 |
+autorespond: load autorespond.o strcasestr.o |
31 |
+ ./load autorespond strcasestr.o |
22 |
+ ./load autorespond strcasestr.o |
32 |
+ |
23 |
+ |
Lines 42-56
Link Here
|
42 |
+strcasestr.c: choose compile trystrcase.c strcasestr_ar.c strcasestr_sys.c |
33 |
+strcasestr.c: choose compile trystrcase.c strcasestr_ar.c strcasestr_sys.c |
43 |
+ ./choose cl trystrcase strcasestr_ar.c strcasestr_sys.c > strcasestr.c |
34 |
+ ./choose cl trystrcase strcasestr_ar.c strcasestr_sys.c > strcasestr.c |
44 |
|
35 |
|
45 |
install: all |
36 |
distclean: clean |
46 |
@echo "Installing..." |
37 |
|
47 |
@@ -25,5 +34,28 @@ |
38 |
@@ -19,4 +24,27 @@ |
48 |
|
39 |
install -d $(PREFIX)/bin $(PREFIX)/share/man/man1 |
49 |
clean: |
40 |
install autorespond $(PREFIX)/bin |
50 |
@echo -n "Cleaning up..." |
41 |
install autorespond.1 $(PREFIX)/share/man/man1 |
51 |
- @rm -rf *.core core $(BIN) |
|
|
52 |
+ @rm -rf *.core core `cat TARGETS` |
53 |
@echo "done." |
54 |
+ |
42 |
+ |
55 |
+choose: \ |
43 |
+choose: \ |
56 |
+warn-auto.sh choose.sh conf-home |
44 |
+warn-auto.sh choose.sh conf-home |
Lines 74-79
Link Here
|
74 |
+ '-o "$$main" "$$main".o $${1+"$$@"}' \ |
62 |
+ '-o "$$main" "$$main".o $${1+"$$@"}' \ |
75 |
+ ) > load |
63 |
+ ) > load |
76 |
+ chmod 755 load |
64 |
+ chmod 755 load |
|
|
65 |
|
77 |
Index: TARGETS |
66 |
Index: TARGETS |
78 |
=================================================================== |
67 |
=================================================================== |
79 |
RCS file: TARGETS |
68 |
RCS file: TARGETS |
Lines 99-118
Link Here
|
99 |
@@ -80,6 +80,8 @@ |
88 |
@@ -80,6 +80,8 @@ |
100 |
#include <sys/wait.h> |
89 |
#include <sys/wait.h> |
101 |
#include <ctype.h> |
90 |
#include <ctype.h> |
102 |
|
91 |
|
103 |
+#include "strcasestr.h" |
92 |
+#include "strcasestr.h" |
104 |
+ |
93 |
+ |
105 |
#define DEFAULT_MH 1 /* default value for message_handling flag */ |
94 |
#define DEFAULT_MH 1 /* default value for message_handling flag */ |
106 |
#define DEFAULT_FROM "$" /* default "from" for the autorespond */ |
95 |
#define DEFAULT_FROM "$" /* default "from" for the autorespond */ |
107 |
|
96 |
|
108 |
@@ -374,32 +376,6 @@ |
97 |
@@ -374,35 +374,6 @@ |
109 |
|
98 |
|
110 |
|
99 |
|
111 |
|
100 |
/********************************************************* |
112 |
-/********************************************************* |
|
|
113 |
-** find string in string - ignore case **/ |
101 |
-** find string in string - ignore case **/ |
114 |
- |
102 |
- |
115 |
-char *strcasestr_ar( char *_s1, char *_s2 ) |
103 |
-char *strcasestr( char *_s1, char *_s2 ) |
116 |
-{ |
104 |
-{ |
117 |
- char *s1; |
105 |
- char *s1; |
118 |
- char *s2; |
106 |
- char *s2; |
Lines 135-161
Link Here
|
135 |
- return _s1 + (ptr - s1); |
123 |
- return _s1 + (ptr - s1); |
136 |
-} |
124 |
-} |
137 |
- |
125 |
- |
138 |
|
126 |
- |
139 |
|
127 |
- |
140 |
|
128 |
- |
141 |
@@ -420,7 +396,7 @@ |
129 |
-/********************************************************* |
142 |
if ( ss == (char *)NULL ) |
130 |
** look up header tag in chain and try to find search string |
143 |
return act_header->content; |
131 |
** returns pointer to contetnt on success other wise NULL */ |
144 |
|
132 |
|
145 |
- if ( strcasestr_ar( act_header->content, ss ) != (char *)NULL ) |
|
|
146 |
+ if ( strcasestr( act_header->content, ss ) != (char *)NULL ) |
147 |
return act_header->content; |
148 |
|
149 |
return (char *)NULL; |
150 |
@@ -441,7 +417,7 @@ |
151 |
if ( (s = inspect_headers( "Content-Type", (char *)NULL )) == (char *)NULL) |
152 |
return (char *)NULL; |
153 |
|
154 |
- if ( (r = strcasestr_ar( s, "boundary=" )) == (char *)NULL) |
155 |
+ if ( (r = strcasestr( s, "boundary=" )) == (char *)NULL) |
156 |
return (char *)NULL; |
157 |
|
158 |
*(r+strlen(r)-2) = '\0'; /* delete quote at the end */ |
159 |
Index: choose.sh |
133 |
Index: choose.sh |
160 |
=================================================================== |
134 |
=================================================================== |
161 |
RCS file: choose.sh |
135 |
RCS file: choose.sh |