Skip to content

Commit

Permalink
snapshot of project "tin", label ctin970106
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasDickey committed Dec 31, 2019
1 parent 1a38e81 commit 9e1cdda
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 33 deletions.
10 changes: 10 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
--unoff BETA release 970106 --

272) Andreas Ley <andreas.ley@rz.uni-karlsruhe.de>
ADD. rewrote parse_from() macros to K&R-C
FIX. misc.c

271) Roland Rosenfeld <roland@spinnaker.rhein.de>
ADD. newcheck for x-posts to handle inn1.5 Xref: headers
FIX. post.c

--unoff BETA release 970104 --

270) Urs Janssen <urs@akk.uni-karlsruhe.de>
Expand Down
14 changes: 7 additions & 7 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
MANIFEST for tin-1.3-unoff-BETA-970106 (Mon Jan 6 19:05:12 MET 1997)
----------------------------------------------------
58183 ./CHANGES
58461 ./CHANGES
13750 ./TODO
5341 ./Makefile
17216 ./INSTALL
Expand All @@ -27,7 +27,7 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
2233 ./include/os_2.h
29619 ./include/proto.h
1376 ./include/stpwatch.h
44464 ./include/tin.h
44578 ./include/tin.h
810 ./include/version.h
4100 ./include/win32.h
789 ./include/win32tcp.h
Expand Down Expand Up @@ -57,18 +57,18 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
19256 ./src/main.c
8108 ./src/makecfg.c
9471 ./src/memory.c
52280 ./src/misc.c
52118 ./src/misc.c
7228 ./src/msmail.c
33605 ./src/newsrc.c
26632 ./src/nntplib.c
31349 ./src/nntpw32.c
6176 ./src/nrctbl.c
28773 ./src/open.c
28699 ./src/open.c
6242 ./src/os_2.c
35769 ./src/page.c
24090 ./src/parsdate.y
6631 ./src/pgp.c
75726 ./src/post.c
76064 ./src/post.c
9919 ./src/prompt.c
160 ./src/proto.sed
22480 ./src/refs.c
Expand All @@ -92,4 +92,4 @@ MANIFEST for tin-1.3-unoff-BETA-970104 (Sun Jan 5 07:52:55 MET 1997)
4278 ./src/l1_next.tab
4278 ./src/next_l1.tab
3706 ./src/tincfg.tbl
1618908 insgesamt
1619402 insgesamt
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PROJECT = tin
EXE = tin
MANEXT = 1
LVER = 1.3
PVER = 970104
PVER = 970106
VER = $(LVER)-unoff-BETA-$(PVER)
MAIL_ADDR = "urs@akk.uni-karlsruhe.de"

Expand Down
13 changes: 8 additions & 5 deletions include/tin.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,11 @@ extern char *get_uaf_fullname();

#include <ctype.h>

#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_DBMALLOC
# include "dbmalloc.h"
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif

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


#ifdef HAVE_DBMALLOC
#define my_malloc(size) malloc(size)
#define my_realloc(ptr, size) realloc((ptr), (size))
#else
#define my_malloc(size) my_malloc1(__FILE__, __LINE__, (size))
#define my_realloc(ptr, size) my_realloc1(__FILE__, __LINE__, (ptr), (size))
#endif

#define FreeIfNeeded(p) if (p != (char *)0) free((char *)p)
#define FreeAndNull(p) if (p != (char *)0) { free((char *)p); p = (char *)0; }
Expand Down
2 changes: 1 addition & 1 deletion include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#define VERSION "1.3 unoff BETA"
#define RELEASEDATE "970104"
#define RELEASEDATE "970106"

#ifdef M_AMIGA
# define OS "AMIGA"
Expand Down
2 changes: 1 addition & 1 deletion makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PROJECT = tin
EXE = tin
MANEXT = 1
LVER = 1.3
PVER = 970104
PVER = 970106
VER = $(LVER)-unoff-BETA-$(PVER)
MAIL_ADDR = "urs@akk.uni-karlsruhe.de"

Expand Down
25 changes: 12 additions & 13 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,17 +1065,16 @@ mail_check ()
*/

#if 1
# define APPEND_TO(dest) do { *bp = '\0'; \
dest += sprintf (dest, "%s", bp = buf); \
} while (0)
# define RTRIM(what) do { what ## p --; \
while (what ## p >= what ## buf && \
isspace (*what ## p)) \
*(what ## p --) = '\0'; } while (0)
# define LTRIM(what) for (what ## p = what ## buf ; \
what ## p && isspace (*(what ## p)) ; \
what ## p ++)
# define TRIM(what) do { RTRIM (what); LTRIM (what); } while (0)
# define APPEND_TO(dest) do { *bp = '\0'; \
dest += sprintf (dest, "%s", bp = buf); \
} while (0)
# define RTRIM(p,buf) do { p--; \
while (p >= buf && isspace (*p)) \
*(p--) = '\0'; } while (0)
# define LTRIM(p,buf) for (p = buf ; \
p && isspace (*(p)) ; \
p++)
# define TRIM(p,buf) do { RTRIM (p,buf); LTRIM (p,buf); } while (0)

void
parse_from (addr, addrspec, comment)
Expand Down Expand Up @@ -1175,9 +1174,9 @@ parse_from (addr, addrspec, comment)
}

/* Address specifier */
TRIM (as);
TRIM (asp,asbuf);
/* Comment */
TRIM (cmt);
TRIM (cmtp,cmtbuf);

strcpy (addrspec, asp);
strcpy (comment, cmtp);
Expand Down
6 changes: 2 additions & 4 deletions src/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,10 +1238,9 @@ authorization (server, authuser)
get_server (line2, PATH_LEN);
ret = atoi (line2);
if (ret != NEED_AUTHDATA) {
if (ret == OK_AUTH)
if (ret == OK_AUTH) {
return TRUE;
else {
/* strcpy (error_response, line2); */
} else {
return FALSE;
}
}
Expand All @@ -1251,7 +1250,6 @@ authorization (server, authuser)
get_server (line, PATH_LEN);
ret = atoi (line);
if (ret != OK_AUTH) {
/* strcpy (error_response, line); */
return FALSE;
}

Expand Down
18 changes: 17 additions & 1 deletion src/post.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,7 @@ static void appendid P_((char **where, char **what));
static int must_include P_((char *id));
static void skip_id P_((char **id));
static int damaged_id P_((char *id));
static int is_crosspost P_((char *xref));

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

/*
* A real crossposting test had to run on Newsgroups but we only have Xref in
* t_article, so we use this.
*/
static int
is_crosspost (xref)
char *xref;
{
int count=0;
for (;*xref;xref++)
if (*xref==':')
count++;
return (count>=2) ? 1 : 0;
}

/* Widespread news software like INN's nnrpd restricts the size of several
headers, notably the references header, to 512 characters. Oh well...
guess that's what son-of-1036 calls a "desparate last ressort" :-/
Expand Down Expand Up @@ -1436,7 +1452,7 @@ post_response (group, respnum, copy_text)
start_line_offset += lines;

if (copy_text) {
if (arts[respnum].xref) {
if (arts[respnum].xref && is_crosspost(arts[respnum].xref)) {
if (strfquote (CURR_GROUP.name, respnum, buf, sizeof (buf),
xpost_quote_format)) {
fprintf (fp, "%s\n", buf);
Expand Down

0 comments on commit 9e1cdda

Please sign in to comment.