Lines 1-150
Link Here
|
1 |
--- ftnaddr.c.orig Thu Oct 23 08:12:18 1997 |
|
|
2 |
+++ ftnaddr.c Wed Mar 8 20:50:09 2000 |
3 |
@@ -225,6 +225,7 @@ |
4 |
} |
5 |
else |
6 |
{ |
7 |
+#ifndef AMIGADOS_4D_OUTBOUND |
8 |
char ext[] = "\0ext"; /* ".ext" */ |
9 |
char pnt[] = "\0pnt/0000xxxx"; /* ".pnt..." */ |
10 |
|
11 |
@@ -233,6 +234,7 @@ |
12 |
|
13 |
if (fa->p != 0) |
14 |
sprintf (pnt, ".pnt%s%08x", PATH_SEPARATOR, fa->p); |
15 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
16 |
|
17 |
#ifdef HAVE_SNPRINTF |
18 |
snprintf |
19 |
@@ -243,8 +245,13 @@ |
20 |
#ifdef HAVE_SNPRINTF |
21 |
MAXPATHLEN, |
22 |
#endif |
23 |
+#ifdef AMIGADOS_4D_OUTBOUND |
24 |
+ "%s%s%s%s%d.%d.%d.%d", d->path, PATH_SEPARATOR, d->dir, |
25 |
+ PATH_SEPARATOR, fa->z, fa->net, fa->node, fa->p); |
26 |
+#else |
27 |
"%s%s%s%s%s%04x%04x%s", |
28 |
d->path, PATH_SEPARATOR, d->dir, ext, PATH_SEPARATOR, |
29 |
fa->net, fa->node, pnt); |
30 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
31 |
} |
32 |
} |
33 |
|
34 |
--- ftnq.c.orig Mon Nov 3 09:12:45 1997 |
35 |
+++ ftnq.c Thu Mar 9 13:23:03 2000 |
36 |
@@ -157,9 +157,11 @@ |
37 |
FTN_ADDR fa; |
38 |
|
39 |
FA_ZERO (&fa); |
40 |
+#ifndef AMIGADOS_4D_OUTBOUND |
41 |
fa.z = ((de->d_name[len] == '.') ? |
42 |
strtol (de->d_name + len + 1, (char **) NULL, 16) : |
43 |
curr_domain->z[0]); |
44 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
45 |
if (de->d_name[len] == 0 || fa.z != curr_domain->z[0]) |
46 |
{ |
47 |
strcpy (fa.domain, curr_domain->name); |
48 |
@@ -302,7 +304,9 @@ |
49 |
DIR *dp; |
50 |
FTN_ADDR fa2; |
51 |
char buf[MAXPATHLEN + 1]; |
52 |
+#ifndef AMIGADOS_4D_OUTBOUND |
53 |
int j; |
54 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
55 |
char *s; |
56 |
|
57 |
if ((dp = opendir (dir)) != 0) |
58 |
@@ -311,6 +315,52 @@ |
59 |
|
60 |
while ((de = readdir (dp)) != 0) |
61 |
{ |
62 |
+#ifdef AMIGADOS_4D_OUTBOUND |
63 |
+ char ext[4]; |
64 |
+ int matched = 0; |
65 |
+ size_t nlen = strlen(s = de->d_name); |
66 |
+ |
67 |
+ for (; *s && isgraph(*s) != 0; s++); |
68 |
+ if (s - de->d_name != nlen) |
69 |
+ continue; |
70 |
+ |
71 |
+ memcpy (&fa2, fa1, sizeof(FTN_ADDR)); |
72 |
+ |
73 |
+ if (sscanf(s = de->d_name, "%d.%d.%d.%d.%3s%n", |
74 |
+ &fa2.z, &fa2.net, &fa2.node, &fa2.p, ext, &matched) != 5 || |
75 |
+ matched != nlen || strlen(ext) != 3) |
76 |
+ continue; |
77 |
+ |
78 |
+ if ((fa1->z != -1 && fa1->z != fa2.z) || |
79 |
+ (fa1->net != -1 && fa1->net != fa2.net) || |
80 |
+ (fa1->node != -1 && fa1->node != fa2.node) || |
81 |
+ (fa1->p != -1 && fa1->p != fa2.p)) |
82 |
+ continue; |
83 |
+ |
84 |
+ strnzcpy(buf, dir, sizeof(buf)); |
85 |
+ strnzcpy(buf + strlen(buf), PATH_SEPARATOR, sizeof(buf) - strlen(buf)); |
86 |
+ strnzcpy(buf + strlen(buf), s, sizeof(buf) - strlen(buf)); |
87 |
+ |
88 |
+ if (!STRICMP(ext, "bsy") || !STRICMP(ext, "csy")) |
89 |
+ process_bsy(&fa2, buf); |
90 |
+ |
91 |
+ if (!(get_node_info(&fa2) || is5D(fa1))) |
92 |
+ continue; |
93 |
+ |
94 |
+ if (strchr(out_flvrs, ext[0]) && |
95 |
+ tolower(ext[1]) == 'u' && tolower(ext[2]) == 't') |
96 |
+ /* Adding *.?ut */ |
97 |
+ q = q_add_file(q, buf, &fa2, ext[0], 'd', 'm'); |
98 |
+ else if (!STRICMP(ext, "req")) |
99 |
+ /* Adding *.req */ |
100 |
+ q = q_add_file(q, buf, &fa2, 'h', 's', 'r'); |
101 |
+ else if (!STRICMP(ext, "hld")) |
102 |
+ process_hld(&fa2, buf); |
103 |
+ else if (strchr(flo_flvrs, ext[0]) && |
104 |
+ tolower(ext[1]) == 'l' && tolower(ext[2]) == 'o') |
105 |
+ /* Adding *.?lo */ |
106 |
+ q = q_add_file(q, buf, &fa2, ext[0], 'd', 'l'); |
107 |
+#else /* AMIGADOS_4D_OUTBOUND */ |
108 |
s = de->d_name; |
109 |
|
110 |
for (j = 0; j < 8; ++j) |
111 |
@@ -378,6 +428,7 @@ |
112 |
} |
113 |
} |
114 |
} |
115 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
116 |
} |
117 |
closedir (dp); |
118 |
} |
119 |
|
120 |
--- prothlp.c.orig Wed Nov 5 04:11:33 1997 |
121 |
+++ prothlp.c Wed Mar 8 20:50:09 2000 |
122 |
@@ -31,6 +31,9 @@ |
123 |
#include <string.h> |
124 |
#include <stdio.h> |
125 |
#include <stdlib.h> |
126 |
+#ifdef AMIGADOS_4D_OUTBOUND |
127 |
+#include <ctype.h> |
128 |
+#endif /* AMIGADOS_4D_OUTBOUND */ |
129 |
|
130 |
#include "Config.h" |
131 |
#include "sys.h" |
132 |
@@ -145,5 +148,18 @@ |
133 |
if (strlen (++z) == 3) |
134 |
if ((*z >= '0') && (*z < '7') && (z[1] == '#')) |
135 |
memcpy (z, weekext[*z - '0'], 2); |
136 |
+#ifdef AMIGADOS_4D_OUTBOUND |
137 |
+ else |
138 |
+ { |
139 |
+ int n; |
140 |
+ for (n = 0; n < 7 && STRNICMP(z, weekext[n], 2); n++); |
141 |
+ if (n != 7) |
142 |
+ { |
143 |
+ char last = z[2]; |
144 |
+ sprintf(s, "%08lx.%c%c%c", |
145 |
+ rnd(), tolower(weekext[n][0]), weekext[n][1], last); |
146 |
+ } |
147 |
+ } |
148 |
+#endif |
149 |
} |
150 |
} |