[packages] minicom: rename private getline() to mc_getline() as it conflicts with...
[openwrt/svn-archive/archive.git] / utils / minicom / patches / 010-resolve-getline-conflict.patch
1 --- a/src/minicom.c
2 +++ b/src/minicom.c
3 @@ -167,7 +167,7 @@ static void shjump(int sig)
4 #endif /*SIGTSTP*/
5
6 /* Get a line from either window or scroll back buffer. */
7 -static ELM *getline(WIN *w, int no)
8 +static ELM *mc_getline(WIN *w, int no)
9 {
10 int i;
11 static ELM outofrange[MAXCOLS] = {{0,0,0}};
12 @@ -205,7 +205,7 @@ static void drawhist(WIN *w, int y, int
13
14 w->direct = 0;
15 for (f = 0; f < w->ys; f++)
16 - mc_wdrawelm(w, f, getline(w, y++));
17 + mc_wdrawelm(w, f, mc_getline(w, y++));
18 if (r)
19 mc_wredraw(w, 1);
20 w->direct = 1;
21 @@ -227,7 +227,7 @@ void drawhist_look(WIN *w, int y, int r,
22 tmp_line[0]='\0';
23 w->direct = 0;
24 for (f = 0; f < w->ys; f++) {
25 - tmp_e = getline(w, y++);
26 + tmp_e = mc_getline(w, y++);
27
28 /* First we "accumulate" the line into a variable */
29 mc_wdrawelm_var(w, tmp_e, tmp_line);
30 @@ -324,7 +324,7 @@ int find_next(WIN *w, WIN *w_hist,
31
32 for (next_line = hit_line; next_line <= all_lines; next_line++) {
33 /* we do 'something' here... :-) */
34 - tmp_e = getline(w_hist, next_line);
35 + tmp_e = mc_getline(w_hist, next_line);
36
37 /*
38 * First we "accumulate" the line into a variable.
39 @@ -379,9 +379,9 @@ wchar_t *StrStr(wchar_t *str1, wchar_t *
40 static void drawcite(WIN *w, int y, int citey, int start, int end)
41 {
42 if (y+citey >= start && y+citey <= end)
43 - mc_wdrawelm_inverse(w, y, getline(w, y+citey));
44 + mc_wdrawelm_inverse(w, y, mc_getline(w, y+citey));
45 else
46 - mc_wdrawelm(w, y, getline(w, y+citey));
47 + mc_wdrawelm(w, y, mc_getline(w, y+citey));
48 }
49
50 static void drawcite_whole(WIN *w, int y, int start, int end)
51 @@ -400,7 +400,7 @@ static void do_cite(WIN *w, int start, i
52 for (y=start; y<=end; y++) {
53 vt_send('>');
54 vt_send(' ');
55 - tmp_e = getline(w, y);
56 + tmp_e = mc_getline(w, y);
57 mc_wdrawelm_var(w, tmp_e, tmp_line);
58 tmp_line[w->xs] = 0;
59 for (x = w->xs-1; x >= 0; x--) {
60 @@ -600,7 +600,7 @@ static void scrollback(void)
61 if (citemode) {
62 inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend);
63 } else {
64 - tmp_e = getline(b_us, y);
65 + tmp_e = mc_getline(b_us, y);
66 if (wcslen(look_for) > 1) {
67 /* quick scan for pattern match */
68 mc_wdrawelm_var(b_us, tmp_e, tmp_line);
69 @@ -611,9 +611,9 @@ static void scrollback(void)
70 }
71
72 if (inverse)
73 - mc_wdrawelm_inverse(b_us, 0, getline(b_us, y));
74 + mc_wdrawelm_inverse(b_us, 0, mc_getline(b_us, y));
75 else
76 - mc_wdrawelm(b_us, 0, getline(b_us, y));
77 + mc_wdrawelm(b_us, 0, mc_getline(b_us, y));
78 if (citemode)
79 mc_wlocate(b_us, 0, cite_y);
80 mc_wflush();
81 @@ -648,7 +648,7 @@ static void scrollback(void)
82 if (citemode) {
83 inverse = (y+cite_y >= cite_ystart && y+cite_y <= cite_yend);
84 } else {
85 - tmp_e = getline(b_us, y + b_us->ys - 1);
86 + tmp_e = mc_getline(b_us, y + b_us->ys - 1);
87 if (wcslen(look_for) > 1) {
88 /* quick scan for pattern match */
89 mc_wdrawelm_var(b_us, tmp_e, tmp_line);
90 @@ -660,10 +660,10 @@ static void scrollback(void)
91
92 if (inverse)
93 mc_wdrawelm_inverse(b_us, b_us->ys - 1,
94 - getline(b_us, y + b_us->ys - 1));
95 + mc_getline(b_us, y + b_us->ys - 1));
96 else
97 mc_wdrawelm(b_us, b_us->ys - 1,
98 - getline(b_us, y + b_us->ys - 1));
99 + mc_getline(b_us, y + b_us->ys - 1));
100 if (citemode)
101 mc_wlocate(b_us, 0, cite_y);
102 mc_wflush();
103 @@ -753,7 +753,7 @@ static void scrollback(void)
104 mc_wlocate(b_st, 0, 0);
105 mc_wprintf(b_st, hline);
106 mc_wredraw(b_st, 1);
107 - mc_wdrawelm_inverse(b_us, cite_y, getline(b_us, cite_ystart));
108 + mc_wdrawelm_inverse(b_us, cite_y, mc_getline(b_us, cite_ystart));
109 mc_wlocate(b_us, 0, cite_y);
110 break;
111 case K_ESC: