~ubuntu-branches/ubuntu/natty/ncurses/natty

« back to all changes in this revision

Viewing changes to tack/crum.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-17 09:00:42 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517090042-86fgxrr6j5jzagot
Tags: 5.6-0ubuntu1
* New upstream version.
  - Remove patches applied upstream: ncurses.upstream, signed-chars.
  - Update patches: debian-backspace.
* Build-depend on g++-multilib instead of lib{32,64}c*-dev-*.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <tack.h>
23
23
 
24
 
MODULE_ID("$Id: crum.c,v 1.4 2005/09/17 19:49:16 tom Exp $")
 
24
MODULE_ID("$Id: crum.c,v 1.5 2006/11/26 00:15:02 tom Exp $")
25
25
 
26
26
/*
27
27
 * Test cursor movement.
65
65
        char *s;
66
66
 
67
67
        if (sel & 16) { /* use (cup) */
68
 
                s = tparm(cursor_address, rt, ct);
 
68
                s = TPARM_2(cursor_address, rt, ct);
69
69
                tputs(s, lines, tc_putch);
70
70
                return;
71
71
        }
72
72
        if (sel & 8) {  /* use (hpa) (vpa) */
73
73
                if (column_address) {
74
 
                        s = tparm(column_address, ct);
 
74
                        s = TPARM_1(column_address, ct);
75
75
                        tputs(s, 1, tc_putch);
76
76
                        cf = ct;
77
77
                }
78
78
                if (row_address) {
79
 
                        s = tparm(row_address, rt);
 
79
                        s = TPARM_1(row_address, rt);
80
80
                        tputs(s, 1, tc_putch);
81
81
                        rf = rt;
82
82
                }
84
84
        if (sel & 4) {  /* parameterized relative cursor movement */
85
85
                if (parm_right_cursor)
86
86
                        if (cf < ct) {
87
 
                                s = tparm(parm_right_cursor, ct - cf);
 
87
                                s = TPARM_1(parm_right_cursor, ct - cf);
88
88
                                tputs(s, ct - cf, tc_putch);
89
89
                                cf = ct;
90
90
                        }
91
91
                if (parm_left_cursor)
92
92
                        if (cf > ct) {
93
 
                                s = tparm(parm_left_cursor, cf - ct);
 
93
                                s = TPARM_1(parm_left_cursor, cf - ct);
94
94
                                tputs(s, cf - ct, tc_putch);
95
95
                                cf = ct;
96
96
                        }
97
97
                if (parm_down_cursor)
98
98
                        if (rf < rt) {
99
 
                                s = tparm(parm_down_cursor, rt - rf);
 
99
                                s = TPARM_1(parm_down_cursor, rt - rf);
100
100
                                tputs(s, rt - rf, tc_putch);
101
101
                                rf = rt;
102
102
                        }
103
103
                if (parm_up_cursor)
104
104
                        if (rf > rt) {
105
 
                                s = tparm(parm_up_cursor, rf - rt);
 
105
                                s = TPARM_1(parm_up_cursor, rf - rt);
106
106
                                tputs(s, rf - rt, tc_putch);
107
107
                                rf = rt;
108
108
                        }
409
409
                        tc_putch('_');
410
410
                }
411
411
                for (i = 0; i < columns - 2; i++) {
412
 
                        tputs(tparm(cursor_address, 0, i), lines, tc_putch);
 
412
                        tputs(TPARM_2(cursor_address, 0, i), lines, tc_putch);
413
413
                        tc_putch('+');
414
414
                }
415
415
                for (i = 0; i < lines - 2; i++) {
416
 
                        tputs(tparm(cursor_address, i, 0), lines, tc_putch);
 
416
                        tputs(TPARM_2(cursor_address, i, 0), lines, tc_putch);
417
417
                        tc_putch(']');
418
418
                        tc_putch('_');
419
419
                }