Skip to content

Commit 9e1cdda

Browse files
committed
snapshot of project "tin", label ctin970106
1 parent 1a38e81 commit 9e1cdda

File tree

9 files changed

+59
-33
lines changed

9 files changed

+59
-33
lines changed

CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
--unoff BETA release 970106 --
2+
3+
272) Andreas Ley <andreas.ley@rz.uni-karlsruhe.de>
4+
ADD. rewrote parse_from() macros to K&R-C
5+
FIX. misc.c
6+
7+
271) Roland Rosenfeld <roland@spinnaker.rhein.de>
8+
ADD. newcheck for x-posts to handle inn1.5 Xref: headers
9+
FIX. post.c
10+
111
--unoff BETA release 970104 --
212

313
270) Urs Janssen <urs@akk.uni-karlsruhe.de>

MANIFEST

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
1+
MANIFEST for tin-1.3-unoff-BETA-970106 (Mon Jan 6 19:05:12 MET 1997)
22
----------------------------------------------------
3-
58183 ./CHANGES
3+
58461 ./CHANGES
44
13750 ./TODO
55
5341 ./Makefile
66
17216 ./INSTALL
@@ -27,7 +27,7 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
2727
2233 ./include/os_2.h
2828
29619 ./include/proto.h
2929
1376 ./include/stpwatch.h
30-
44464 ./include/tin.h
30+
44578 ./include/tin.h
3131
810 ./include/version.h
3232
4100 ./include/win32.h
3333
789 ./include/win32tcp.h
@@ -57,18 +57,18 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
5757
19256 ./src/main.c
5858
8108 ./src/makecfg.c
5959
9471 ./src/memory.c
60-
52280 ./src/misc.c
60+
52118 ./src/misc.c
6161
7228 ./src/msmail.c
6262
33605 ./src/newsrc.c
6363
26632 ./src/nntplib.c
6464
31349 ./src/nntpw32.c
6565
6176 ./src/nrctbl.c
66-
28773 ./src/open.c
66+
28699 ./src/open.c
6767
6242 ./src/os_2.c
6868
35769 ./src/page.c
6969
24090 ./src/parsdate.y
7070
6631 ./src/pgp.c
71-
75726 ./src/post.c
71+
76064 ./src/post.c
7272
9919 ./src/prompt.c
7373
160 ./src/proto.sed
7474
22480 ./src/refs.c
@@ -92,4 +92,4 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
9292
4278 ./src/l1_next.tab
9393
4278 ./src/next_l1.tab
9494
3706 ./src/tincfg.tbl
95-
1618908 insgesamt
95+
1619402 insgesamt

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PROJECT = tin
44
EXE = tin
55
MANEXT = 1
66
LVER = 1.3
7-
PVER = 970104
7+
PVER = 970106
88
VER = $(LVER)-unoff-BETA-$(PVER)
99
MAIL_ADDR = "urs@akk.uni-karlsruhe.de"
1010

include/tin.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@ extern char *get_uaf_fullname();
116116

117117
#include <ctype.h>
118118

119+
#ifdef HAVE_STDLIB_H
120+
# include <stdlib.h>
121+
#endif
119122
#ifdef HAVE_DBMALLOC
120123
# include "dbmalloc.h"
121-
#else
122-
# ifdef HAVE_STDLIB_H
123-
# include <stdlib.h>
124-
# endif
125124
#endif
126125

127126
/* prefer string.h because it's Posix */
@@ -1605,9 +1604,13 @@ extern void joinpath (char *result, char *dir, char *file);
16051604
# define F_OK 0 /* Test for existence of File */
16061605
#endif
16071606

1608-
1607+
#ifdef HAVE_DBMALLOC
1608+
#define my_malloc(size) malloc(size)
1609+
#define my_realloc(ptr, size) realloc((ptr), (size))
1610+
#else
16091611
#define my_malloc(size) my_malloc1(__FILE__, __LINE__, (size))
16101612
#define my_realloc(ptr, size) my_realloc1(__FILE__, __LINE__, (ptr), (size))
1613+
#endif
16111614

16121615
#define FreeIfNeeded(p) if (p != (char *)0) free((char *)p)
16131616
#define FreeAndNull(p) if (p != (char *)0) { free((char *)p); p = (char *)0; }

include/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
#define VERSION "1.3 unoff BETA"
20-
#define RELEASEDATE "970104"
20+
#define RELEASEDATE "970106"
2121

2222
#ifdef M_AMIGA
2323
# define OS "AMIGA"

makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PROJECT = tin
44
EXE = tin
55
MANEXT = 1
66
LVER = 1.3
7-
PVER = 970104
7+
PVER = 970106
88
VER = $(LVER)-unoff-BETA-$(PVER)
99
MAIL_ADDR = "urs@akk.uni-karlsruhe.de"
1010

src/misc.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,17 +1065,16 @@ mail_check ()
10651065
*/
10661066

10671067
#if 1
1068-
# define APPEND_TO(dest) do { *bp = '\0'; \
1069-
dest += sprintf (dest, "%s", bp = buf); \
1070-
} while (0)
1071-
# define RTRIM(what) do { what ## p --; \
1072-
while (what ## p >= what ## buf && \
1073-
isspace (*what ## p)) \
1074-
*(what ## p --) = '\0'; } while (0)
1075-
# define LTRIM(what) for (what ## p = what ## buf ; \
1076-
what ## p && isspace (*(what ## p)) ; \
1077-
what ## p ++)
1078-
# define TRIM(what) do { RTRIM (what); LTRIM (what); } while (0)
1068+
# define APPEND_TO(dest) do { *bp = '\0'; \
1069+
dest += sprintf (dest, "%s", bp = buf); \
1070+
} while (0)
1071+
# define RTRIM(p,buf) do { p--; \
1072+
while (p >= buf && isspace (*p)) \
1073+
*(p--) = '\0'; } while (0)
1074+
# define LTRIM(p,buf) for (p = buf ; \
1075+
p && isspace (*(p)) ; \
1076+
p++)
1077+
# define TRIM(p,buf) do { RTRIM (p,buf); LTRIM (p,buf); } while (0)
10791078

10801079
void
10811080
parse_from (addr, addrspec, comment)
@@ -1175,9 +1174,9 @@ parse_from (addr, addrspec, comment)
11751174
}
11761175

11771176
/* Address specifier */
1178-
TRIM (as);
1177+
TRIM (asp,asbuf);
11791178
/* Comment */
1180-
TRIM (cmt);
1179+
TRIM (cmtp,cmtbuf);
11811180

11821181
strcpy (addrspec, asp);
11831182
strcpy (comment, cmtp);

src/open.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,10 +1238,9 @@ authorization (server, authuser)
12381238
get_server (line2, PATH_LEN);
12391239
ret = atoi (line2);
12401240
if (ret != NEED_AUTHDATA) {
1241-
if (ret == OK_AUTH)
1241+
if (ret == OK_AUTH) {
12421242
return TRUE;
1243-
else {
1244-
/* strcpy (error_response, line2); */
1243+
} else {
12451244
return FALSE;
12461245
}
12471246
}
@@ -1251,7 +1250,6 @@ authorization (server, authuser)
12511250
get_server (line, PATH_LEN);
12521251
ret = atoi (line);
12531252
if (ret != OK_AUTH) {
1254-
/* strcpy (error_response, line); */
12551253
return FALSE;
12561254
}
12571255

src/post.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,7 @@ static void appendid P_((char **where, char **what));
10961096
static int must_include P_((char *id));
10971097
static void skip_id P_((char **id));
10981098
static int damaged_id P_((char *id));
1099+
static int is_crosspost P_((char *xref));
10991100

11001101
/* yeah, right, that's from the same Chris who is telling Jason he's
11011102
doing obfuscated C :-) */
@@ -1168,6 +1169,21 @@ damaged_id (id)
11681169
return 0;
11691170
}
11701171

1172+
/*
1173+
* A real crossposting test had to run on Newsgroups but we only have Xref in
1174+
* t_article, so we use this.
1175+
*/
1176+
static int
1177+
is_crosspost (xref)
1178+
char *xref;
1179+
{
1180+
int count=0;
1181+
for (;*xref;xref++)
1182+
if (*xref==':')
1183+
count++;
1184+
return (count>=2) ? 1 : 0;
1185+
}
1186+
11711187
/* Widespread news software like INN's nnrpd restricts the size of several
11721188
headers, notably the references header, to 512 characters. Oh well...
11731189
guess that's what son-of-1036 calls a "desparate last ressort" :-/
@@ -1436,7 +1452,7 @@ post_response (group, respnum, copy_text)
14361452
start_line_offset += lines;
14371453

14381454
if (copy_text) {
1439-
if (arts[respnum].xref) {
1455+
if (arts[respnum].xref && is_crosspost(arts[respnum].xref)) {
14401456
if (strfquote (CURR_GROUP.name, respnum, buf, sizeof (buf),
14411457
xpost_quote_format)) {
14421458
fprintf (fp, "%s\n", buf);

0 commit comments

Comments
 (0)