~ubuntu-branches/ubuntu/precise/xterm/precise-updates

« back to all changes in this revision

Viewing changes to linedata.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker
  • Date: 2010-06-10 22:13:44 UTC
  • mfrom: (1.1.18 upstream) (11.1.19 sid)
  • Revision ID: james.westby@ubuntu.com-20100610221344-s4wbmxbevlklu7fv
Tags: 259-1ubuntu1
* Merge from debian unstable. Remaining Ubuntu changes:
  - Revert the libutempter change because it's in universe. (LP: #539473)
  - Enabled URL highlighting
  - Add 100_uxterm_utf8_title.patch: Set utf8Titles to true by default
    when using uxterm, so that it displays utf8 directories in titles
    properly.  May cause issues with apps that use control sequences for
    updating the xterm titlebar - users should use xterm or set utf8Title
    to false in this case. (LP: #320388, #408496)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: linedata.c,v 1.73 2009/11/28 13:36:02 tom Exp $ */
 
1
/* $XTermId: linedata.c,v 1.78 2010/04/14 23:41:10 tom Exp $ */
2
2
 
3
3
/************************************************************
4
4
 
5
 
Copyright 2009 by Thomas E. Dickey
 
5
Copyright 2009,2010 by Thomas E. Dickey
6
6
 
7
7
                        All Rights Reserved
8
8
 
48
48
{
49
49
    LineData *result = 0;
50
50
    ScrnBuf buffer;
 
51
    int max_row = screen->max_row;
51
52
 
52
53
    if (row >= 0) {
53
54
        buffer = screen->visbuf;
58
59
#else
59
60
        buffer = screen->saveBuf_index;
60
61
        row += screen->savelines;
 
62
        max_row += screen->savelines;
61
63
#endif
62
64
    }
63
 
    if (row >= 0) {
64
 
        assert(row <= screen->max_row);
 
65
    if (row >= 0 && row <= max_row) {
65
66
        result = (LineData *) scrnHeadAddr(screen, buffer, (unsigned) row);
66
67
        if (result != 0) {
67
68
#if 1                           /* FIXME - these should be done in setupLineData, etc. */
162
163
 
163
164
    initLineExtra(screen);
164
165
 
165
 
    TRACE(("initLineData %d\n", screen->lineExtra));
166
 
    TRACE(("...sizeof(LineData)  %d\n", sizeof(LineData)));
 
166
    TRACE(("initLineData %lu\n", (unsigned long) screen->lineExtra));
 
167
    TRACE(("...sizeof(LineData)  %lu\n", (unsigned long) sizeof(LineData)));
167
168
#if OPT_ISO_COLORS
168
 
    TRACE(("...sizeof(CellColor) %d\n", sizeof(CellColor)));
 
169
    TRACE(("...sizeof(CellColor) %lu\n", (unsigned long) sizeof(CellColor)));
169
170
#endif
170
 
    TRACE(("...sizeof(RowData)   %d\n", sizeof(RowData)));
171
 
    TRACE(("...offset(lineSize)  %d\n", offsetof(LineData, lineSize)));
172
 
    TRACE(("...offset(bufHead)   %d\n", offsetof(LineData, bufHead)));
 
171
    TRACE(("...sizeof(RowData)   %lu\n", (unsigned long) sizeof(RowData)));
 
172
    TRACE(("...offset(lineSize)  %lu\n", (unsigned long) offsetof(LineData, lineSize)));
 
173
    TRACE(("...offset(bufHead)   %lu\n", (unsigned long) offsetof(LineData, bufHead)));
173
174
#if OPT_WIDE_CHARS
174
 
    TRACE(("...offset(combSize)  %d\n", offsetof(LineData, combSize)));
 
175
    TRACE(("...offset(combSize)  %lu\n", (unsigned long) offsetof(LineData, combSize)));
175
176
#endif
176
 
    TRACE(("...offset(attribs)   %d\n", offsetof(LineData, attribs)));
 
177
    TRACE(("...offset(attribs)   %lu\n", (unsigned long) offsetof(LineData, attribs)));
177
178
#if OPT_ISO_COLORS
178
 
    TRACE(("...offset(color)     %d\n", offsetof(LineData, color)));
 
179
    TRACE(("...offset(color)     %lu\n", (unsigned long) offsetof(LineData, color)));
179
180
#endif
180
 
    TRACE(("...offset(charData)  %d\n", offsetof(LineData, charData)));
181
 
    TRACE(("...offset(combData)  %d\n", offsetof(LineData, combData)));
 
181
    TRACE(("...offset(charData)  %lu\n", (unsigned long) offsetof(LineData, charData)));
 
182
    TRACE(("...offset(combData)  %lu\n", (unsigned long) offsetof(LineData, combData)));
182
183
}
183
184
 
184
185
/*