summaryrefslogtreecommitdiff
path: root/textproc/ispell/patches/patch-as
blob: 949aa4c25abc6b6161fe1fa5d27df6556dfa5637 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$NetBSD: patch-as,v 1.2 2014/05/14 02:28:13 rodent Exp $

Avoid conflit with system getline.
Fixes PR pkg/41746, thanks to Tom Stejskal.

--- correct.c.orig	Thu Apr 28 14:46:51 2005
+++ correct.c
@@ -245,7 +245,7 @@ static void	save_root_cap P ((ichar_t * word, ichar_t 
 		  struct flagent * sufent,
 		  ichar_t savearea[MAX_CAPS][INPUTWORDLEN + MAXAFFIXLEN],
 		  int * nsaved));
-static char *	getline P ((char * buf, int bufsize));
+static char *	get_line P ((char * buf, int bufsize));
 void		askmode P ((void));
 void		copyout P ((unsigned char ** cc, int cnt));
 static void	lookharder P ((unsigned char * string));
@@ -571,7 +571,7 @@ checkagain:
 
 		imove (li - 1, 0);
 		(void) putchar ('!');
-		if (getline ((char *) buf, sizeof buf) == NULL)
+		if (get_line ((char *) buf, sizeof buf) == NULL)
 		    {
 		    (void) putchar (7);
 		    ierase ();
@@ -596,7 +596,7 @@ checkagain:
 		    (void) printf ("%s ", CORR_C_READONLY);
 		    }
 		(void) printf (CORR_C_REPLACE_WITH);
-		if (getline ((char *) ctok, ctokl) == NULL)
+		if (get_line ((char *) ctok, ctokl) == NULL)
 		    {
 		    (void) putchar (7);
 		    /* Put it back */
@@ -664,7 +664,7 @@ checkagain:
 		unsigned char	buf[100];
 		imove (li - 1, 0);
 		(void) printf (CORR_C_LOOKUP_PROMPT);
-		if (getline ((char *) buf, sizeof buf) == NULL)
+		if (get_line ((char *) buf, sizeof buf) == NULL)
 		    {
 		    (void) putchar (7);
 		    ierase ();
@@ -1583,7 +1583,7 @@ static void save_root_cap (word, pattern, prestrip, pr
     return;
     }
 
-static char * getline (s, len)
+static char * get_line (s, len)
     register char *	s;
     register int	len;
     {