View | Details | Raw Unified | Return to bug 179209
Collapse All | Expand All

(-)net-im/icb/Makefile (-1 / +2 lines)
Lines 5-11 Link Here
5
PORTVERSION=	5.1.0
5
PORTVERSION=	5.1.0
6
PORTREVISION=	4
6
PORTREVISION=	4
7
CATEGORIES=	net-im tcl
7
CATEGORIES=	net-im tcl
8
MASTER_SITES=	http://www.obfuscation.org/icb/
8
#MASTER_SITES=	http://www.obfuscation.org/icb/
9
MASTER_SITES=	http://fossies.org/linux/misc/old/
9
DISTNAME=	c${PORTNAME}-${PORTVERSION}
10
DISTNAME=	c${PORTNAME}-${PORTVERSION}
10
11
11
MAINTAINER=	ports@FreeBSD.org
12
MAINTAINER=	ports@FreeBSD.org
(-)net-im/icb/files/patch-icb::c_log.c (+43 lines)
Lines 20-22 Link Here
20
 
20
 
21
 	/* determine pathname to use */
21
 	/* determine pathname to use */
22
 	if (path == NULL || *path == '\0') {
22
 	if (path == NULL || *path == '\0') {
23
@@ -43,17 +47,17 @@
24
 	/* expand a tilde style path */
25
 	if (*path == '~')
26
 		if ((path = tildexpand(path)) == NULL) {
27
-			strcpy(TRET, "c_log: bad login id in path");
28
+			strcpy(Tcl_GetStringResult(interp), "c_log: bad login id in path");
29
 			return(-1);
30
 		}
31
 	
32
 	/* open the session log */
33
 	if ((logfp = fopen(path, "a")) == NULL) {
34
 		if (errno > sys_nerr)
35
-		   sprintf(TRET,
36
+		   sprintf(Tcl_GetStringResult(interp),
37
 		    "c_log: can't open \"%s\": errno %d", path, errno);
38
 		else
39
-		   sprintf(TRET,
40
+		   sprintf(Tcl_GetStringResult(interp),
41
 		    "c_log: can't open \"%s\": %s", path, strerror(errno));
42
 		return(-1);
43
 	}
44
@@ -61,10 +65,10 @@
45
 	/* protect the logfile against others */
46
 	if (fchmod((int)(fileno(logfp)), 0600) != 0) {
47
 		if (errno > sys_nerr)
48
-		   sprintf(TRET,
49
+		   sprintf(Tcl_GetStringResult(interp),
50
 		    "c_log: can't fchmod \"%s\": errno %d", path, errno);
51
 		else
52
-		   sprintf(TRET,
53
+		   sprintf(Tcl_GetStringResult(interp),
54
 		    "c_log: can't fchmod \"%s\": %s", path, strerror(errno));
55
 		fclose(logfp);
56
 		logfp = NULL;
57
@@ -146,7 +150,7 @@
58
 				return(TCL_ERROR);
59
 	} else {
60
 		if (logging()) {
61
-			sprintf(TRET, "c_log: session logging already on");
62
+			sprintf(Tcl_GetStringResult(interp), "c_log: session logging already on");
63
 			return(TCL_ERROR);
64
 		} else
65
 			if (startsessionlog(interp, argv[1]) < 0)
(-)net-im/icb/files/patch-icb__c_hush.c (+29 lines)
Line 0 Link Here
1
--- icb/c_hush.c.orig
2
+++ icb/c_hush.c
3
@@ -23,7 +23,7 @@
4
 	while (*nick == ' ' || *nick == '\t') nick++;
5
 
6
 	if (*nick == '\0') {
7
-		strcpy(TRET, "c_hush: can't hush a null nickname");
8
+		strcpy(Tcl_GetStringResult(interp), "c_hush: can't hush a null nickname");
9
 		return(-1);
10
 	}
11
 
12
@@ -31,7 +31,7 @@
13
 		*(nick + MAX_NICKLEN) = '\0';
14
 
15
 	if ((hp = strmakenode(strlen(nick))) == NULL) {
16
-		strcpy(TRET, "c_hush: out of memory");
17
+		strcpy(Tcl_GetStringResult(interp), "c_hush: out of memory");
18
 		return(-1);
19
 	}
20
 	strcpy(hp->str, nick);
21
@@ -55,7 +55,7 @@
22
 	STRLIST *s;
23
 
24
 	if ((s = strgetnode(nick, hushhead, 1)) == NULL) {
25
-		sprintf(TRET, "c_hush: %s is not being hushed", nick);
26
+		sprintf(Tcl_GetStringResult(interp), "c_hush: %s is not being hushed", nick);
27
 		return(-1);
28
 	}
29
 	sprintf(mbuf, 
(-)net-im/icb/files/patch-icb__oset.c (+44 lines)
Lines 18-20 Link Here
18
 			return(TCL_OK);
18
 			return(TCL_OK);
19
 		}
19
 		}
20
 	}
20
 	}
21
@@ -109,7 +109,7 @@
22
 	}
23
 
24
 	if (vars[x].name == NULL) {
25
-		sprintf(TRET, "oset: no such variable \"%s\"", argv[1]);
26
+		sprintf(Tcl_GetStringResult(interp), "oset: no such variable \"%s\"", argv[1]);
27
 		return(TCL_ERROR);
28
 	}
29
 
30
@@ -278,7 +278,7 @@
31
 	}
32
 
33
 	if (vars[x].name == NULL) {
34
-		sprintf(TRET, "ounset: no such variable \"%s\"", argv[1]);
35
+		sprintf(Tcl_GetStringResult(interp), "ounset: no such variable \"%s\"", argv[1]);
36
 		return(TCL_ERROR);
37
 	}
38
 
39
@@ -310,7 +310,7 @@
40
 	case V_NONNEG:
41
 		tmp = atoi(s);
42
 		if (tmp < 0) {
43
-			strcpy(TRET, "oset: only non-negative values allowed");
44
+			strcpy(Tcl_GetStringResult(interp), "oset: only non-negative values allowed");
45
 			return(-1);
46
 		}
47
 		memcpy (address, &tmp, sizeof(int));
48
@@ -331,14 +331,14 @@
49
 			*i_addr = (int)0;
50
 			}
51
 		else {
52
-			strcpy(TRET, "oset: only boolean values allowed");
53
+			strcpy(Tcl_GetStringResult(interp), "oset: only boolean values allowed");
54
 			return(-1);
55
 		}
56
 		break;
57
 	case V_STRING:
58
 		tmp = strlen(s) + 1;
59
 		if ((p = malloc(tmp)) == NULL) {
60
-			strcpy(TRET, "oset: not enough memory to set string");
61
+			strcpy(Tcl_GetStringResult(interp), "oset: not enough memory to set string");
62
 			return(-1);
63
 		}
64
 		memcpy (p, s, tmp);
(-)net-im/icb/files/patch-icb__parse.c (+19 lines)
Lines 11-13 Link Here
11
 extern Tcl_Interp *interp;
11
 extern Tcl_Interp *interp;
12
 char *nextword();
12
 char *nextword();
13
 
13
 
14
@@ -78,14 +82,14 @@
15
 
16
 	/* Print the tcl result. */
17
 	if (result == TCL_OK) {
18
-		if (*interp->result != 0)
19
-			putl(interp->result, PL_SL);
20
+		if (Tcl_GetStringResult(interp) != 0)
21
+			putl(Tcl_GetStringResult(interp), PL_SL);
22
 	} else {
23
-		if (interp->result) {
24
+		if (Tcl_GetStringResult(interp)) {
25
 			sprintf(mbuf, 
26
 				"%s[=Error=] %s%s",
27
 				printcolor(ColERROR, ColSANE),
28
-				interp->result,
29
+				Tcl_GetStringResult(interp),
30
 				printcolor(ColSANE, ColSANE));
31
 			putl(mbuf, PL_SL);
32
 		} else {
(-)net-im/icb/files/patch-icb__tcl.c (+11 lines)
Lines 10-12 Link Here
10
 #ifdef HAVE_UNISTD_H
10
 #ifdef HAVE_UNISTD_H
11
 #include <unistd.h>
11
 #include <unistd.h>
12
 #endif
12
 #endif
13
@@ -70,8 +73,8 @@
14
 	for (x = 0; defprocs[x] != 0; x++)
15
 		if (Tcl_Eval(interp, defprocs[x]) != TCL_OK) {
16
 			printf("Default binding failed: %s\r\n", defprocs[x]);
17
-			if (*interp->result != 0)
18
-				puts(interp->result);
19
+			if (Tcl_GetStringResult(interp) != 0)
20
+				puts(Tcl_GetStringResult(interp));
21
 		}
22
 
23
 }

Return to bug 179209