apply ncurses-5.9-20110625.patch
[platform/upstream/ncurses.git] / packaging / ncurses-5.9.dif
1 --- aclocal.m4
2 +++ aclocal.m4  2010-10-11 13:57:42.000000000 +0000
3 @@ -595,7 +595,7 @@ AC_MSG_CHECKING([for size of bool])
4  AC_CACHE_VAL(cf_cv_type_of_bool,[
5         rm -f cf_test.out
6         AC_TRY_RUN([
7 -#include <stdlib.h>
8 +//#include <stdlib.h> // conflict with exit declaration
9  #include <stdio.h>
10  
11  #if defined(__cplusplus)
12 @@ -4339,12 +4339,15 @@ cat >>$cf_edit_man <<CF_EOF
13                 echo '? missing rename for '\$cf_source
14                 cf_target="\$cf_source"
15         fi
16 -       cf_target="\$cf_subdir\${section}/\${cf_target}"
17 -
18  CF_EOF
19  fi
20  
21  cat >>$cf_edit_man <<CF_EOF
22 +for t in \$cf_target; do
23 +       t="\$cf_subdir\${section}/\${t}"
24 +CF_EOF
25 +
26 +cat >>$cf_edit_man <<CF_EOF
27         sed     -f $cf_man_alias \\
28  CF_EOF
29  
30 @@ -4354,7 +4357,7 @@ cat >>$cf_edit_man <<CF_EOF
31  CF_EOF
32  else
33  cat >>$cf_edit_man <<CF_EOF
34 -               < \$i >\$TMP
35 +               < \$i | sed -f $srcdir/edit_man.sed >\$TMP
36  CF_EOF
37  fi
38  
39 @@ -4394,7 +4397,7 @@ cat >>$cf_edit_man <<CF_EOF
40                 mv \$TMP.$cf_so_strip \$TMP
41         fi
42         fi
43 -       cf_target="\$cf_target.$cf_so_strip"
44 +       t="\$t.$cf_so_strip"
45  CF_EOF
46  fi
47  
48 @@ -4403,23 +4406,23 @@ case "$MANPAGE_FORMAT" in #(vi
49  cat >>$cf_edit_man <<CF_EOF
50         if test \$form = format ; then
51                 # BSDI installs only .0 suffixes in the cat directories
52 -               cf_target="\`echo \$cf_target|sed -e 's/\.[[1-9]]\+[[a-z]]*/.0/'\`"
53 +               t="\`echo \$t|sed -e 's/\.[[1-9]]\+[[a-z]]*/.0/'\`"
54         fi
55  CF_EOF
56    ;;
57  esac
58  
59  cat >>$cf_edit_man <<CF_EOF
60 -       suffix=\`basename \$cf_target | sed -e 's%^[[^.]]*%%'\`
61 +       suffix=\`basename \$t | sed -e 's%^[[^.]]*%%'\`
62         if test \$verb = installing ; then
63 -               echo \$verb \$cf_target
64 -               \$INSTALL_DATA \$TMP \$cf_target
65 +               echo \$verb \$t
66 +               \$INSTALL_DATA \$TMP \$t
67                 test -d \$cf_subdir\${section} &&
68                 test -n "\$aliases" && (
69                         cd \$cf_subdir\${section} && (
70 -                               cf_source=\`echo \$cf_target |sed -e 's%^.*/\([[^/]][[^/]]*/[[^/]][[^/]]*$\)%\1%'\`
71 +                               cf_source=\`echo \$t |sed -e 's%^.*/\([[^/]][[^/]]*/[[^/]][[^/]]*$\)%\1%'\`
72                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
73 -                               cf_target=\`basename \$cf_target\`
74 +                               t=\`basename \$t\`
75                                 for cf_alias in \$aliases
76                                 do
77                                         if test \$section = 1 ; then
78 @@ -4428,7 +4431,7 @@ cat >>$cf_edit_man <<CF_EOF
79  
80                                         if test "$MANPAGE_SYMLINKS" = yes ; then
81                                                 if test -f \$cf_alias\${suffix} ; then
82 -                                                       if ( cmp -s \$cf_target \$cf_alias\${suffix} )
83 +                                                       if ( cmp -s \$t \$cf_alias\${suffix} )
84                                                         then
85                                                                 continue
86                                                         fi
87 @@ -4438,18 +4441,18 @@ CF_EOF
88  case "x$LN_S" in #(vi
89  *-f) #(vi
90  cat >>$cf_edit_man <<CF_EOF
91 -                                               $LN_S \$cf_target \$cf_alias\${suffix}
92 +                                               $LN_S \$t \$cf_alias\${suffix}
93  CF_EOF
94         ;;
95  *)
96  cat >>$cf_edit_man <<CF_EOF
97                                                 rm -f \$cf_alias\${suffix}
98 -                                               $LN_S \$cf_target \$cf_alias\${suffix}
99 +                                               $LN_S \$t \$cf_alias\${suffix}
100  CF_EOF
101         ;;
102  esac
103  cat >>$cf_edit_man <<CF_EOF
104 -                                       elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
105 +                                       elif test "\$t" != "\$cf_alias\${suffix}" ; then
106                                                 echo ".so \$cf_source" >\$TMP
107  CF_EOF
108  if test -n "$cf_compress" ; then
109 @@ -4469,9 +4472,9 @@ cat >>$cf_edit_man <<CF_EOF
110                         )
111                 )
112         elif test \$verb = removing ; then
113 -               test -f \$cf_target && (
114 -                       echo \$verb \$cf_target
115 -                       rm -f \$cf_target
116 +               test -f \$t && (
117 +                       echo \$verb \$t
118 +                       rm -f \$t
119                 )
120                 test -d \$cf_subdir\${section} &&
121                 test -n "\$aliases" && (
122 @@ -4491,6 +4494,7 @@ cat >>$cf_edit_man <<CF_EOF
123  #              echo ".hy 0"
124                 cat \$TMP
125         fi
126 +done
127         ;;
128  esac
129  done
130 --- configure.in
131 +++ configure.in        2012-01-30 16:31:47.000000000 +0000
132 @@ -1756,6 +1756,7 @@ if test "$with_termlib" != no ; then
133                 TINFO_LDFLAGS="-L${LIB_DIR}"
134                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
135         fi
136 +       TINFO_ARGS="$TINFO_ARGS -L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
137  else
138         # the next lines are needed for linking libtic over libncurses
139         TINFO_NAME=${LIB_NAME}
140 --- configure
141 +++ configure   2012-01-30 16:42:40.000000000 +0000
142 @@ -5372,7 +5372,7 @@ irix*) #(vi
143         fi
144         ;;
145  linux*|gnu*|k*bsd*-gnu) #(vi
146 -       LD_RPATH_OPT="-Wl,-rpath,"
147 +       LD_RPATH_OPT="-Wl,-rpath-link,"
148         ;;
149  openbsd[2-9].*|mirbsd*) #(vi
150         LD_RPATH_OPT="-Wl,-rpath,"
151 @@ -10512,12 +10512,15 @@ cat >>$cf_edit_man <<CF_EOF
152                 echo '? missing rename for '\$cf_source
153                 cf_target="\$cf_source"
154         fi
155 -       cf_target="\$cf_subdir\${section}/\${cf_target}"
156 -
157  CF_EOF
158  fi
159  
160  cat >>$cf_edit_man <<CF_EOF
161 +for t in \$cf_target; do
162 +       t="\$cf_subdir\${section}/\${t}"
163 +CF_EOF
164 +
165 +cat >>$cf_edit_man <<CF_EOF
166         sed     -f $cf_man_alias \\
167  CF_EOF
168  
169 @@ -10527,7 +10530,7 @@ cat >>$cf_edit_man <<CF_EOF
170  CF_EOF
171  else
172  cat >>$cf_edit_man <<CF_EOF
173 -               < \$i >\$TMP
174 +               < \$i | sed -f $srcdir/edit_man.sed >\$TMP
175  CF_EOF
176  fi
177  
178 @@ -10567,7 +10570,7 @@ cat >>$cf_edit_man <<CF_EOF
179                 mv \$TMP.$cf_so_strip \$TMP
180         fi
181         fi
182 -       cf_target="\$cf_target.$cf_so_strip"
183 +       t="\$t.$cf_so_strip"
184  CF_EOF
185  fi
186  
187 @@ -10576,23 +10579,23 @@ case "$MANPAGE_FORMAT" in #(vi
188  cat >>$cf_edit_man <<CF_EOF
189         if test \$form = format ; then
190                 # BSDI installs only .0 suffixes in the cat directories
191 -               cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
192 +               t="\`echo \$t|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
193         fi
194  CF_EOF
195    ;;
196  esac
197  
198  cat >>$cf_edit_man <<CF_EOF
199 -       suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
200 +       suffix=\`basename \$t | sed -e 's%^[^.]*%%'\`
201         if test \$verb = installing ; then
202 -               echo \$verb \$cf_target
203 -               \$INSTALL_DATA \$TMP \$cf_target
204 +               echo \$verb \$t
205 +               \$INSTALL_DATA \$TMP \$t
206                 test -d \$cf_subdir\${section} &&
207                 test -n "\$aliases" && (
208                         cd \$cf_subdir\${section} && (
209 -                               cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
210 +                               cf_source=\`echo \$t |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
211                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
212 -                               cf_target=\`basename \$cf_target\`
213 +                               t=\`basename \$t\`
214                                 for cf_alias in \$aliases
215                                 do
216                                         if test \$section = 1 ; then
217 @@ -10601,7 +10604,7 @@ cat >>$cf_edit_man <<CF_EOF
218  
219                                         if test "$MANPAGE_SYMLINKS" = yes ; then
220                                                 if test -f \$cf_alias\${suffix} ; then
221 -                                                       if ( cmp -s \$cf_target \$cf_alias\${suffix} )
222 +                                                       if ( cmp -s \$t \$cf_alias\${suffix} )
223                                                         then
224                                                                 continue
225                                                         fi
226 @@ -10611,18 +10614,18 @@ CF_EOF
227  case "x$LN_S" in #(vi
228  *-f) #(vi
229  cat >>$cf_edit_man <<CF_EOF
230 -                                               $LN_S \$cf_target \$cf_alias\${suffix}
231 +                                               $LN_S \$t \$cf_alias\${suffix}
232  CF_EOF
233         ;;
234  *)
235  cat >>$cf_edit_man <<CF_EOF
236                                                 rm -f \$cf_alias\${suffix}
237 -                                               $LN_S \$cf_target \$cf_alias\${suffix}
238 +                                               $LN_S \$t \$cf_alias\${suffix}
239  CF_EOF
240         ;;
241  esac
242  cat >>$cf_edit_man <<CF_EOF
243 -                                       elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
244 +                                       elif test "\$t" != "\$cf_alias\${suffix}" ; then
245                                                 echo ".so \$cf_source" >\$TMP
246  CF_EOF
247  if test -n "$cf_compress" ; then
248 @@ -10642,9 +10645,9 @@ cat >>$cf_edit_man <<CF_EOF
249                         )
250                 )
251         elif test \$verb = removing ; then
252 -               test -f \$cf_target && (
253 -                       echo \$verb \$cf_target
254 -                       rm -f \$cf_target
255 +               test -f \$t && (
256 +                       echo \$verb \$t
257 +                       rm -f \$t
258                 )
259                 test -d \$cf_subdir\${section} &&
260                 test -n "\$aliases" && (
261 @@ -10664,6 +10667,7 @@ cat >>$cf_edit_man <<CF_EOF
262  #              echo ".hy 0"
263                 cat \$TMP
264         fi
265 +done
266         ;;
267  esac
268  done
269 @@ -20034,6 +20038,7 @@ if test "$with_termlib" != no ; then
270                 TINFO_LDFLAGS="-L${LIB_DIR}"
271                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
272         fi
273 +       TINFO_ARGS="$TINFO_ARGS -L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
274  else
275         # the next lines are needed for linking libtic over libncurses
276         TINFO_NAME=${LIB_NAME}
277 --- include/curses.h.in
278 +++ include/curses.h.in 2010-10-11 13:57:42.000000000 +0000
279 @@ -151,6 +151,9 @@ typedef unsigned @cf_cv_typeof_chtype@ c
280  typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
281  #endif
282  
283 +#include <features.h>
284 +#include <sys/types.h>
285 +
286  /*
287   * We need FILE, etc.  Include this before checking any feature symbols.
288   */
289 --- include/termcap.h.in
290 +++ include/termcap.h.in        2006-05-18 14:07:15.000000000 +0000
291 @@ -46,6 +46,8 @@ extern "C"
292  {
293  #endif /* __cplusplus */
294  
295 +#include <features.h>
296 +#include <termios.h>
297  #include <sys/types.h>
298  
299  #undef  NCURSES_CONST 
300 --- include/tic.h
301 +++ include/tic.h       2012-05-31 12:15:29.000000000 +0000
302 @@ -231,12 +231,12 @@ extern NCURSES_EXPORT(const struct alias
303   */
304  
305  /* out-of-band values for representing absent capabilities */
306 -#define ABSENT_BOOLEAN         ((signed char)-1)       /* 255 */
307 +#define ABSENT_BOOLEAN         (-1)                    /* 255 */
308  #define ABSENT_NUMERIC         (-1)
309  #define ABSENT_STRING          (char *)0
310  
311  /* out-of-band values for representing cancels */
312 -#define CANCELLED_BOOLEAN      ((signed char)-2)       /* 254 */
313 +#define CANCELLED_BOOLEAN      (-2)                    /* 254 */
314  #define CANCELLED_NUMERIC      (-2)
315  #define CANCELLED_STRING       (char *)(-1)
316  
317 --- man/man_db.renames
318 +++ man/man_db.renames  2006-05-18 14:07:15.000000000 +0000
319 @@ -167,6 +167,8 @@ tput.1                              tput.1
320  tset.1                         tset.1
321  vprintf.3s                     vprintf.3
322  wresize.3x                     wresize.3ncurses
323 +curs_terminfo.\\\*n            terminfo.5
324 +tack.1                         tack.1
325  #
326  # Other:
327  tack.1m                                tack.1
328 --- man/ncurses.3x
329 +++ man/ncurses.3x      2012-01-30 16:44:35.000000000 +0000
330 @@ -113,6 +113,10 @@ after the shell environment variable \fB
331  \fB@TSET@(1)\fR is usually responsible for doing this.
332  [See \fBterminfo\fR(\*n) for further details.]
333  .PP
334 +Beware: the terminal your program is running may or may not have
335 +the features you expect. Ncurses makes no attempt to check available
336 +features in advance. This is upto the programmer.
337 +.PP
338  The \fBncurses\fR library permits manipulation of data structures,
339  called \fIwindows\fR, which can be thought of as two-dimensional
340  arrays of characters representing all or part of a CRT screen.
341 --- misc/ncurses-config.in
342 +++ misc/ncurses-config.in      2011-11-17 12:46:49.000000000 +0000
343 @@ -73,7 +73,7 @@ while test $# -gt 0; do
344         # compile/link
345         --cflags)
346                 INCS=
347 -               if test "x@WITH_OVERWRITE@" = xno ; then
348 +               if test "${THIS%[0-5]*}" != ncurses ; then
349                         INCS="$INCS -I${includedir}/${THIS}"
350                 fi
351                 if test "${includedir}" != /usr/include ; then
352 --- misc/terminfo.src
353 +++ misc/terminfo.src   2012-07-31 09:22:44.388510253 +0000
354 @@ -301,7 +301,9 @@ dumb|80-column dumb tty,
355         am,
356         cols#80,
357         bel=^G, cr=^M, cud1=^J, ind=^J,
358 -unknown|unknown terminal type,
359 +unknown|switch|patch|unknown terminal type,
360 +       gn, use=dumb,
361 +net|network|arpanet|dialup|unknown network terminal type,
362         gn, use=dumb,
363  lpr|printer|line printer,
364         OTbs, hc, os,
365 @@ -943,9 +945,15 @@ linux-c|linux console 1.3.6+ for older n
366  # The 2.2.x kernels add a private mode that sets the cursor type; use that to
367  # get a block cursor for cvvis.
368  # reported by Frank Heckenbach <frank@g-n-u.de>.
369 +#
370 +# Do not use a block cursor, <werner@suse.de>
371 +# This because many programs do have a workaround for the long time
372 +# missed cvvis entry. A `\E[?1c' in civis will cause a visible but
373 +# zero high cusor ... re-add it for kernels 2.6.11+
374 +#
375  linux2.2|linux 2.2.x console,
376         civis=\E[?25l\E[?1c, cnorm=\E[?25h\E[?0c,
377 -       cvvis=\E[?25h\E[?8c, use=linux-c-nc,
378 +       cvvis=\E[?25h\E[?0c, use=linux-c-nc,
379  
380  # Linux 2.6.x has a fix for SI/SO to work with UTF-8 encoding added here:
381  #      http://lkml.indiana.edu/hypermail/linux/kernel/0602.2/0868.html
382 @@ -2472,6 +2480,7 @@ vt132|DEC vt132,
383  # at the top of the keyboard.  The "DO" key is used as F10 to avoid conflict
384  # with the key marked (ESC) on the vt220.  See vt220d for an alternate mapping.
385  # PF1--PF4 are used as F1--F4.
386 +# (cvvis added by werner)
387  #
388  # added msgr -TD
389  vt220-old|vt200-old|DEC VT220 in vt100 emulation mode,
390 @@ -2482,7 +2491,7 @@ vt220-old|vt200-old|DEC VT220 in vt100 e
391         bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, civis=\E[?25l,
392         clear=\E[H\E[2J$<50>, cnorm=\E[?25h, cr=^M,
393         csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C,
394 -       cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, dch1=\E[P,
395 +       cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, cvvis=\E[?25h, dch1=\E[P,
396         dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=^I,
397         if=/usr/share/tabset/vt100, il1=\E[L, ind=\ED$<20/>,
398         is2=\E[1;24r\E[24;1H, kbs=^H, kcub1=\E[D, kcud1=\E[B,
399 @@ -2639,6 +2648,7 @@ vt320nam|v320n|DEC VT320 in vt100 emul.
400  # to SMASH the 1k-barrier...
401  # From: Adam Thompson <athompso@pangea.ca> Sept 10 1995
402  # (vt320: uncommented <fsl> --esr)
403 +# (cvvis added by werner)
404  vt320|vt300|dec vt320 7 bit terminal,
405         am, hs, mir, msgr, xenl,
406         cols#80, lines#24, wsl#80,
407 @@ -2648,7 +2658,7 @@ vt320|vt300|dec vt320 7 bit terminal,
408         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
409         cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
410         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
411 -       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
412 +       cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
413         ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I,
414         hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED,
415         is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H,
416 @@ -3060,13 +3070,14 @@ putty-sco|putty with SCO function keys,
417  # retrieving the window title, and for setting the window size (i.e., using
418  # "resize -s"), though it does not pass SIGWINCH to the application if the
419  # user resizes the window with the mouse.
420 +# (cvvis added by werner)
421  teraterm2.3|Tera Term Pro,
422         km, xon@,
423         ncv#43, vt@,
424         acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
425         blink=\E[5m, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[J,
426         cnorm=\E[?25h, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
427 -       cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
428 +       cuu1=\E[A, cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
429         dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
430         flash=\E[?5h\E[?5l$<200/>, hpa=\E[%i%p1%dG,
431         il=\E[%p1%dL, il1=\E[L, kdch1=\E[3~, kf1=\E[11~,
432 @@ -3269,6 +3280,7 @@ xterm-old|antique xterm version,
433         use=xterm-r6,
434  # This is the base xterm entry for the xterm supplied with XFree86 3.2 & up.
435  # The name has been changed and some aliases have been removed.
436 +# (cvvis added by werner)
437  xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
438         OTbs, am, bce, km, mir, msgr, xenl, XT,
439         cols#80, it#8, lines#24, ncv@,
440 @@ -3278,7 +3290,7 @@ xterm-xf86-v32|xterm terminal emulator (
441         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
442         cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
443         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
444 -       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
445 +       cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
446         ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
447         flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
448         ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
449 @@ -3745,8 +3757,26 @@ xterm-noapp|xterm with cursor keys in no
450  xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
451         lines#24, use=xterm-old,
452  
453 +# For SuSE Linux: Werner Fink <werner@suse.de>
454 +# Note that the modern xterm does not use escape sequences
455 +# for the numbers on the numpad keys in case of switched
456 +# into application mode and with numlock enabled.
457 +# To test this, use `tput smkx' and `Ctrl-V + key stroke'
458 +xterm-suse|xterm terminal emulator (X.Org X11R7.7 Window System with SuSE LINUX), 
459 +       kbs=\177, kdch1=\E[3~,
460 +       kDIV=\EOo, kMUL=\EOj, kMIN=\EOm, kPLS=\EOk,
461 +       kfnd=\E[1~, kslt=\E[4~,
462 +       use=xterm-new,
463 +
464  # This is xterm for ncurses.
465  xterm|xterm terminal emulator (X Window System),
466 +       use=xterm-suse,
467 +
468 +# xterm-debian is identical to xterm-new with the addition of a small
469 +# VT220-ism regarding the backspace and delete keys; this is mandated by
470 +# the keyboard configuration section of the Debian Policy Manual.
471 +xterm-debian|Debian xterm (backspace and delete changed), 
472 +       kbs=\177, kdch1=\E[3~,
473         use=xterm-new,
474  
475  # This entry assumes that xterm's handling of VT100 SI/SO is disabled by
476 @@ -3952,7 +3982,7 @@ xterms-sun|small (80x24) xterm with sunF
477  
478  #### GNOME (VTE)
479  # this describes the alpha-version of Gnome terminal shipped with Redhat 6.0
480 -gnome-rh62|Gnome terminal,
481 +gnome-rh62|Gnome terminal on Red Hat,
482         bce,
483         kdch1=\177, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
484         use=xterm-color,
485 @@ -4100,10 +4130,14 @@ mgt|Multi GNOME Terminal,
486  #### KDE
487  # This is kvt 0-18.7, shipped with Redhat 6.0 (though whether it supports bce
488  # or not is debatable).
489 -kvt|KDE terminal,
490 +kvt-rh|KDE terminal,
491         bce, km@,
492         kdch1=\177, kend=\E[F, khome=\E[H, use=xterm-color,
493  
494 +# This is kvt for SuSE because we do not support BrokenByDesign[tm].
495 +kvt|KDE terminal, 
496 +       kbs=\177, kdch1=\E[3~, use=kvt-rh, 
497 +
498  # Konsole 1.0.1
499  # (formerly known as kvt)
500  #
501 @@ -4218,14 +4252,14 @@ konsole-256color|KDE console window with
502  mlterm|multi lingual terminal emulator,
503         am, eslok, km, mc5i, mir, msgr, npc, xenl, XT,
504         colors#8, cols#80, it#8, lines#24, pairs#64,
505 -       acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
506 +       acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
507         bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
508         clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
509         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
510         cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
511         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
512 -       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
513 -       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=,
514 +       cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
515 +       dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=,
516         home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
517         ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
518         is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
519 @@ -4280,6 +4314,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
520  # rxvt is normally configured to look for "xterm" or "xterm-color" as $TERM.
521  # Since rxvt is not really compatible with xterm, it should be configured as
522  # "rxvt" or "rxvt-color".
523 +# (cvvis added by werner)
524  #
525  # removed dch/dch1 because they are inconsistent with bce/ech -TD
526  # remove km as per tack test -TD
527 @@ -4291,13 +4326,14 @@ rxvt-basic|rxvt terminal base (X Window
528         clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
529         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
530         cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
531 -       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
532 +       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h,
533         dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
534         enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, ht=^I,
535         hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
536         ind=^J, is1=\E[?47l\E=\E[?1l,
537 -       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H,
538 -       kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
539 +       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=\177, kcbt=\E[Z,
540 +       kmous=\E[M, kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
541 +       rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
542         rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m,
543         rmul=\E[24m,
544         rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
545 @@ -4306,7 +4342,7 @@ rxvt-basic|rxvt terminal base (X Window
546         sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
547         sgr0=\E[0m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
548         smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=vt100+enq,
549 -       use=rxvt+pcfkeys, use=vt220+keypad,
550 +       use=vt220+keypad, use=rxvt+pcfkeys,
551  # Key Codes from rxvt reference:
552  #
553  # Note: Shift + F1-F10 generates F11-F20
554 @@ -4389,8 +4425,8 @@ rxvt-basic|rxvt terminal base (X Window
555  # Removed kDN6, etc (control+shift) since rxvt does not implement this -TD
556  rxvt+pcfkeys|fragment for PC-style fkeys,
557         kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d,
558 -       kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcub1=\E[D, kcud1=\E[B,
559 -       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^,
560 +       kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcub1=\EOD, kcud1=\EOB,
561 +       kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kel=\E[8\^,
562         kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
563         kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
564         kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
565 @@ -4428,6 +4464,39 @@ rxvt-cygwin-native|rxvt terminal emulato
566         acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376,
567         use=rxvt-cygwin,
568  
569 +# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
570 +# Updated: Ã–zgür Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
571 +# Updated: Marc Lehmann <pcg@goof.com>, 17 Feb 2005
572 +# Updated: Marc Lehmann <schmorp@schmorp.de>, 04 Nov 2008: change init/reset sequences
573 +#
574 +rxvt-unicode|rxvt-unicode terminal (X Window System), 
575 +       bw, ccc, hs, mc5i, npc, btns#5, colors#88, lm#0, ncv#0, pairs#256, 
576 +       acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
577 +       dsl=\E]2;\007, ech=\E[%p1%dX, enacs=, flash=\E[?5h$<20/>\E[?5l, 
578 +       fsl=^G, indn=\E[%p1%dS, 
579 +       initc=\E]4;%p1%d;rgb\:%p2%{65535}%*%{1000}%/%4.4X/%p3%{65535}%*%{1000}%/%4.4X/%p4%{65535}%*%{1000}%/%4.4X\E\\, 
580 +       is1=\E[!p, 
581 +       is2=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l, 
582 +       kIC=\E2$, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, op=\E[39;49m, 
583 +       rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmam=\E[?7l, 
584 +       rmcup=\E[r\E[?1049l, rmkx=\E[?1l\E>, rs1=\Ec, 
585 +       rs2=\E[r\E[m\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l, 
586 +       s2ds=\E*B, s3ds=\E+B, 
587 +       setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm, 
588 +       setb=%?%p1%{7}%>%t\E[48;5;%p1%dm%e\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;, 
589 +       setf=%?%p1%{7}%>%t\E[38;5;%p1%dm%e\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m%;, 
590 +       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;, 
591 +       sgr0=\E[m\E(B, sitm=\E[3m, smacs=\E(0, smam=\E[?7h, 
592 +       smcup=\E[?1049h, smkx=\E[?1h\E=, 
593 +       tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, 
594 +       use=rxvt-basic, 
595 +
596 +rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System),
597 +       colors#256, 
598 +       pairs#32767, 
599 +       use=rxvt-unicode, 
600 +
601 +
602  # This variant is supposed to work with rxvt 2.7.7 when compiled with
603  # NO_BRIGHTCOLOR defined.  rxvt needs more work...
604  rxvt-16color|xterm with 16 colors like aixterm,
605 @@ -4457,7 +4526,7 @@ mrxvt-256color|multitabbed rxvt with 256
606  # Eterm 0.9.3
607  #
608  # removed kf0 which conflicts with kf10 -TD
609 -# remove cvvis which conflicts with cnorm -TD
610 +# remove cvvis which conflicts with cnorm -TD (and re-added by werner)
611  # Eterm does not implement control/shift cursor keys such as kDN6, or kPRV/kNXT
612  # but does otherwise follow the rxvt+pcfkeys model -TD
613  # remove nonworking flash -TD
614 @@ -4471,13 +4540,13 @@ Eterm|Eterm-color|Eterm with xterm-style
615         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
616         cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
617         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
618 -       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
619 +       cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
620         ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0,
621         home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
622         ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
623         is1=\E[?47l\E>\E[?1l,
624         is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kNXT@,
625 -       kPRV@, ka1=\E[7~, ka3=\E[5~, kb2=\EOu, kbeg=\EOu, kbs=^H,
626 +       kPRV@, ka1=\E[7~, ka3=\E[5~, kb2=\EOu, kbeg=\EOu, kbs=\177,
627         kc1=\E[8~, kc3=\E[6~, kent=\EOM, khlp=\E[28~, kmous=\E[M,
628         mc4=\E[4i, mc5=\E[5i, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
629         rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=,
630 @@ -4906,7 +4975,7 @@ pty|4bsd pseudo teletype,
631         smso=\Ea$, smul=\Ea!, use=cbunix,
632  
633  # The codes supported by the term.el terminal emulation in GNU Emacs 19.30
634 -eterm|gnu emacs term.el terminal emulation,
635 +eterm-19|gnu emacs term.el terminal emulation,
636         am, mir, xenl,
637         cols#80, lines#24,
638         bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M,
639 @@ -4919,6 +4988,13 @@ eterm|gnu emacs term.el terminal emulati
640         rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmso=\E[m, rmul=\E[m,
641         sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
642         smul=\E[4m,
643 +eterm|emacs|gnu emacs term.el terminal emulation, 
644 +       colors#8, pairs#64, 
645 +       invis=\E[8m, kcub1=\EOD, kcud1=\EOB, 
646 +       kcuf1=\EOC, kcuu1=\EOA, kend=\E[4~, 
647 +       khome=\E[1~, knp=\E[6~, kpp=\E[5~, 
648 +       setab=\E[%p1%{40}%+%dm, setaf=\E[%p1%{30}%+%dm, 
649 +       use=eterm-19, 
650  
651  # The codes supported by the term.el terminal emulation in GNU Emacs 22.2
652  eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
653 @@ -4967,7 +5043,7 @@ screen|VT 100/ANSI X3.64 virtual termina
654         cvvis=\E[34l, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
655         dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
656         flash=\Eg, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@,
657 -       il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E)0, kbs=^H, kcbt=\E[Z,
658 +       il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E)0, kbs=\177, kcbt=\E[Z,
659         kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
660         kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
661         kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
662 @@ -5146,7 +5222,7 @@ screen2|old VT 100/ANSI X3.64 virtual te
663         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
664         dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
665         el=\E[K, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=, il=\E[%p1%dL,
666 -       il1=\E[L, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
667 +       il1=\E[L, ind=^J, kbs=\177, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
668         kcuu1=\EA, kf0=\E~, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV,
669         kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\E0I, khome=\EH,
670         nel=^M^J, rc=\E8, ri=\EM, rmir=\E[4l, rmso=\E[23m,
671 @@ -6870,7 +6946,7 @@ hp700-wy|HP700/41 emulating wyse30,
672         ri=\Ej, rmir=\Er, rmso=\EG0$<10/>, rmul=\EG0$<10/>,
673         sgr0=\EG0$<10/>, smir=\Eq, smso=\EG4$<10/>,
674         smul=\EG8$<10/>, tbc=\E0, vpa=\E[%p1%{32}%+%c,
675 -hp70092|hp70092a|hp70092A|HP 700/92,
676 +hp70092|hp70092a|hp70092A|70092|HP 700/92,
677         am, da, db, xhp,
678         cols#80, lh#2, lines#24, lm#0, lw#8, nlab#8,
679         acsc=0cjgktlrmfn/q\,t5u6v8w7x., bel=^G, blink=\E&dA,
680 @@ -10004,6 +10080,7 @@ msk22714|mskermit22714|UCB MS-DOS Kermit
681  # at support for the VT320 itself.
682  # Please send changes with explanations to bug-gnu-emacs@prep.ai.mit.edu.
683  # (vt320-k3: I added <rmam>/<smam> based on the init string -- esr)
684 +# (cvvis added by werner)
685  vt320-k3|MS-Kermit 3.00's vt320 emulation,
686         am, eslok, hs, km, mir, msgr, xenl,
687         cols#80, it#8, lines#49, pb#9600, vt#3,
688 @@ -10013,7 +10090,7 @@ vt320-k3|MS-Kermit 3.00's vt320 emulatio
689         csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
690         cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
691         cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
692 -       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
693 +       cvvis=\E[?25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
694         dsl=\E[0$~, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
695         flash=\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l,
696         fsl=\E[0$}, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH,
697 @@ -14289,7 +14366,7 @@ ibm3101|i3101|IBM 3101-10,
698         cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
699         el=\EI, home=\EH, hts=\E0, ind=^J, kcub1=\ED, kcud1=\EB,
700         kcuf1=\EC, kcuu1=\EA, nel=^M^J, tbc=\EH,
701 -ibm3151|IBM 3151 display,
702 +ibm3151|i3151|IBM 3151 display,
703         is2=\E S, rmacs=\E>B, rmcup=\E>B, rs2=\E S, s0ds=\E>B,
704         sgr=\E4%{64}%?%p1%t%{65}%|%;%?%p2%t%{66}%|%;%?%p3%t%{65}%|%;%?%p4%t%{68}%|%;%?%p5%t%{64}%|%;%?%p6%t%{72}%|%;%?%p7%t%{80}%|%;%c%?%p9%t\E>A%e\E>B%;,
705         sgr0=\E4@\E>B, smacs=\E>A, smcup=\E>B, use=ibm3162,
706 @@ -14519,7 +14596,7 @@ lft|lft-pc850|LFT-PC850|IBM LFT PC850 De
707         tbc=\E[3g,
708  # "Megapel" refers to the display adapter, which was used with the IBM RT
709  # aka IBM 6150.
710 -ibm5081|hft|IBM Megapel Color display,
711 +ibm5081|ibmmpel|hft|IBM Megapel Color display,
712         acsc=jjkkllmmnnqqttuuvvwwxx, blink@, bold@, s0ds=\E(B,
713         s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154,
714  ibm5081-c|ibmmpel-c|IBM 5081 1024x1024 256/4096 Megapel enhanced color display,
715 --- ncurses/Makefile.in
716 +++ ncurses/Makefile.in 2011-02-28 13:39:31.000000000 +0000
717 @@ -206,7 +206,7 @@ $(DESTDIR)$(libdir) :
718  ../lib : ; mkdir $@
719  
720  ./fallback.c : $(tinfo)/MKfallback.sh
721 -       sh -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
722 +       sh -e $(srcdir)/run_cmd.sh $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
723  
724  ./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
725         sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
726 --- ncurses/curses.priv.h
727 +++ ncurses/curses.priv.h       2006-05-18 14:07:15.000000000 +0000
728 @@ -1952,6 +1952,8 @@ extern NCURSES_EXPORT(char *) _nc_trace_
729  extern NCURSES_EXPORT(char *) _nc_tracechar (SCREEN *, int);
730  extern NCURSES_EXPORT(char *) _nc_tracemouse (SCREEN *, MEVENT const *);
731  extern NCURSES_EXPORT(int) _nc_access (const char *, int);
732 +extern NCURSES_EXPORT(void) _nc_fsid(void);
733 +extern NCURSES_EXPORT(void) _nc_fseid(void);
734  extern NCURSES_EXPORT(int) _nc_baudrate (int);
735  extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *);
736  extern NCURSES_EXPORT(int) _nc_getenv_num (const char *);
737 --- ncurses/run_cmd.sh
738 +++ ncurses/run_cmd.sh  2006-05-18 14:07:15.000000000 +0000
739 @@ -0,0 +1,11 @@
740 +#!/bin/sh
741 +
742 +PATH=$PWD/../progs:$PATH
743 +if test -n "$LD_LIBRARY_PATH"; then
744 +    LD_LIBRARY_PATH="$PWD/../lib:$LD_LIBRARY_PATH"
745 +else
746 +    LD_LIBRARY_PATH="$PWD/../lib"
747 +fi
748 +export PATH LD_LIBRARY_PATH
749 +
750 +exec ${1+"$@"}
751 --- ncurses/tinfo/MKfallback.sh
752 +++ ncurses/tinfo/MKfallback.sh 2006-05-18 14:07:15.000000000 +0000
753 @@ -68,6 +68,12 @@ else
754         tmp_info=
755  fi
756  
757 +if test -n "$TERMINFO" -a -d "$TERMINFO" ; then
758 +       infocmp="infocmp -v1 -A $TERMINFO"
759 +else
760 +       infocmp="infocmp -v1"
761 +fi
762 +
763  cat <<EOF
764  /*
765   * DO NOT EDIT THIS FILE BY HAND!  It is generated by MKfallback.sh.
766 @@ -87,7 +93,7 @@ EOF
767         for x in $*
768         do
769                 echo "/* $x */"
770 -               infocmp -E $x
771 +               $infocmp -E $x
772         done
773  
774         cat <<EOF
775 @@ -98,7 +104,7 @@ EOF
776         for x in $*
777         do
778                 echo "$comma /* $x */"
779 -               infocmp -e $x
780 +               $infocmp -e $x
781                 comma=","
782         done
783  
784 --- ncurses/tinfo/access.c
785 +++ ncurses/tinfo/access.c      2010-10-11 13:57:42.000000000 +0000
786 @@ -35,6 +35,9 @@
787  #include <ctype.h>
788  
789  #include <tic.h>
790 +#ifdef linux
791 +# include <sys/fsuid.h>
792 +#endif
793  
794  MODULE_ID("$Id: access.c,v 1.22 2012/02/22 22:34:31 tom Exp $")
795  
796 @@ -112,6 +115,30 @@ _nc_basename(char *path)
797      return path + _nc_pathlast(path);
798  }
799  
800 +NCURSES_EXPORT(void)
801 +_nc_fsid()
802 +{
803 +#ifdef linux
804 +       int _old_errno = errno;
805 +       setfsuid(getuid());
806 +       setfsgid(getgid());
807 +       errno = _old_errno;
808 +#endif
809 +       return;
810 +}
811 +
812 +NCURSES_EXPORT(void)
813 +_nc_fseid()
814 +{
815 +#ifdef linux
816 +       int _old_errno = errno;
817 +       setfsuid(geteuid());
818 +       setfsgid(getegid());
819 +       errno = _old_errno;
820 +#endif
821 +       return;
822 +}
823 +
824  NCURSES_EXPORT(int)
825  _nc_access(const char *path, int mode)
826  {
827 --- ncurses/tinfo/lib_setup.c
828 +++ ncurses/tinfo/lib_setup.c   2011-02-28 13:40:42.000000000 +0000
829 @@ -582,6 +582,9 @@ _nc_locale_breaks_acs(TERMINAL * termp)
830      } else if ((value = tigetnum("U8")) >= 0) {
831         result = value;         /* use extension feature */
832      } else if ((env = getenv("TERM")) != 0) {
833 +       char *yast = getenv("YAST_DOES_ACS");
834 +       if (yast != 0)
835 +           return 0;           /* YaST uses always correct font mappings */
836         if (strstr(env, "linux")) {
837             result = 1;         /* always broken */
838         } else if (strstr(env, "screen") != 0
839 --- ncurses/tinfo/read_entry.c
840 +++ ncurses/tinfo/read_entry.c  2011-02-28 13:41:44.000000000 +0000
841 @@ -372,6 +372,7 @@ _nc_read_file_entry(const char *const fi
842      int limit;
843      char buffer[MAX_ENTRY_SIZE + 1];
844  
845 +    _nc_fsid();
846      if (_nc_access(filename, R_OK) < 0
847         || (fp = fopen(filename, "rb")) == 0) {
848         TR(TRACE_DATABASE, ("cannot open terminfo %s (errno=%d)", filename, errno));
849 @@ -389,6 +390,7 @@ _nc_read_file_entry(const char *const fi
850         }
851         fclose(fp);
852      }
853 +    _nc_fseid();
854  
855      return (code);
856  }
857 --- ncurses/tinfo/read_termcap.c
858 +++ ncurses/tinfo/read_termcap.c        2011-11-17 12:50:08.000000000 +0000
859 @@ -322,14 +322,18 @@ _nc_getent(
860              */
861             if (fd >= 0) {
862                 (void) lseek(fd, (off_t) 0, SEEK_SET);
863 -           } else if ((_nc_access(db_array[current], R_OK) < 0)
864 -                      || (fd = open(db_array[current], O_RDONLY, 0)) < 0) {
865 -               /* No error on unfound file. */
866 -               if (errno == ENOENT)
867 -                   continue;
868 -               free(record);
869 -               return (TC_SYS_ERR);
870             } else {
871 +               _nc_fsid();
872 +               if ((_nc_access(db_array[current], R_OK) < 0) ||
873 +                   (fd = open(db_array[current], O_RDONLY, 0)) < 0) {
874 +                   _nc_fseid();
875 +                   /* No error on unfound file. */
876 +                   if (errno == ENOENT)
877 +                       continue;
878 +                   free(record);
879 +                   return (TC_SYS_ERR);
880 +               }
881 +               _nc_fseid();
882                 myfd = TRUE;
883             }
884             lineno = 0;
885 @@ -1119,8 +1123,10 @@ _nc_read_termcap_entry(const char *const
886         for (i = 0; i < filecount; i++) {
887  
888             TR(TRACE_DATABASE, ("Looking for %s in %s", tn, termpaths[i]));
889 +           _nc_fsid();
890             if (_nc_access(termpaths[i], R_OK) == 0
891                 && (fp = fopen(termpaths[i], "r")) != (FILE *) 0) {
892 +               _nc_fseid();
893                 _nc_set_source(termpaths[i]);
894  
895                 /*
896 @@ -1132,6 +1138,7 @@ _nc_read_termcap_entry(const char *const
897  
898                 (void) fclose(fp);
899             }
900 +           _nc_fseid();
901         }
902      }
903      if (copied != 0)
904 --- test/test.priv.h
905 +++ test/test.priv.h    2006-05-18 14:07:19.000000000 +0000
906 @@ -645,12 +645,12 @@ extern char *strnames[], *strcodes[], *s
907  #endif
908  
909  /* out-of-band values for representing absent capabilities */
910 -#define ABSENT_BOOLEAN         ((signed char)-1)       /* 255 */
911 +#define ABSENT_BOOLEAN         (char)-1)               /* 255 */
912  #define ABSENT_NUMERIC         (-1)
913  #define ABSENT_STRING          (char *)0
914  
915  /* out-of-band values for representing cancels */
916 -#define CANCELLED_BOOLEAN      ((signed char)-2)       /* 254 */
917 +#define CANCELLED_BOOLEAN      (-2)                    /* 254 */
918  #define CANCELLED_NUMERIC      (-2)
919  #define CANCELLED_STRING       (char *)(-1)
920