summaryrefslogtreecommitdiff
path: root/chat/icb/patches/patch-bk
blob: 49fd87170f281eac1b7928545324d6b13d3fcc92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-bk,v 1.1 2006/05/15 15:33:00 christos Exp $

--- icb/readlineinit.c.orig	1995-02-24 16:20:25.000000000 -0500
+++ icb/readlineinit.c	2006-05-15 10:47:05.000000000 -0400
@@ -1,4 +1,6 @@
 #include <readline.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include "icb.h"
 #include "externs.h"
 
@@ -21,12 +23,12 @@
 rl_vi_editing_mode(); /* default to vi, dammit. */
 gv.editmode = "vi";
 
-editor = (char *)getenv("EDITOR");
+editor = getenv("EDITOR");
 if (!editor)
-	editor = (char *)getenv("VISUAL");
+	editor = getenv("VISUAL");
 
 if (editor != NULL)
-   if (strcmp((char *)basename(editor),"emacs")==0)
+   if (strcmp(basename(editor),"emacs")==0)
    {
 	rl_emacs_editing_mode();
 	gv.editmode = "emacs";