version 1.114, 2009/10/27 08:05:39 |
version 1.115, 2009/10/27 08:26:12 |
Line 79 term_alloc(enum termenc enc) |
|
Line 79 term_alloc(enum termenc enc) |
|
|
|
if (NULL == (p = malloc(sizeof(struct termp)))) |
if (NULL == (p = malloc(sizeof(struct termp)))) |
return(NULL); |
return(NULL); |
bzero(p, sizeof(struct termp)); |
memset(p, 0, sizeof(struct termp)); |
p->maxrmargin = 78; |
p->maxrmargin = 78; |
p->enc = enc; |
p->enc = enc; |
return(p); |
return(p); |
Line 139 term_flushln(struct termp *p) |
|
Line 139 term_flushln(struct termp *p) |
|
* First, establish the maximum columns of "visible" content. |
* First, establish the maximum columns of "visible" content. |
* This is usually the difference between the right-margin and |
* This is usually the difference between the right-margin and |
* an indentation, but can be, for tagged lists or columns, a |
* an indentation, but can be, for tagged lists or columns, a |
* small set of values. |
* small set of values. |
*/ |
*/ |
|
|
assert(p->offset < p->rmargin); |
assert(p->offset < p->rmargin); |
Line 150 term_flushln(struct termp *p) |
|
Line 150 term_flushln(struct termp *p) |
|
0 : p->maxrmargin - p->offset - overstep; |
0 : p->maxrmargin - p->offset - overstep; |
|
|
bp = TERMP_NOBREAK & p->flags ? mmax : maxvis; |
bp = TERMP_NOBREAK & p->flags ? mmax : maxvis; |
|
|
|
/* |
|
* FIXME: if bp is zero, we still output the first word before |
|
* breaking the line. |
|
*/ |
|
|
vis = 0; |
vis = 0; |
|
|
/* |
/* |