mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-12 19:22:41 +00:00
lib/DtTerm: Remove dead assignments, initializations and increments
This shouldn't change behavior (or even object code) at all because those assignments are all without effect. Removing that code removes noise which helps working with code analysis tools.
This commit is contained in:
parent
a5b5eb0f80
commit
c48ec3adff
19 changed files with 40 additions and 142 deletions
|
@ -699,7 +699,6 @@ static void
|
|||
Resize(Widget w)
|
||||
{
|
||||
DtTermWidget tw = (DtTermWidget) w;
|
||||
DtTermData td = tw->vt.td;
|
||||
|
||||
/* let our superclass (the Term Widget) perform the resize... */
|
||||
tw->core.widget_class->core_class.superclass->core_class.resize(w);
|
||||
|
@ -880,7 +879,6 @@ static void
|
|||
Destroy(Widget w)
|
||||
{
|
||||
DtTermWidget tw = (DtTermWidget) w;
|
||||
DtTermData td = tw->vt.td;
|
||||
|
||||
/* remove the DtTermData structure contents, followed by the structure...
|
||||
*/
|
||||
|
|
|
@ -572,7 +572,6 @@ _DtTermActionEditKeyExecute(Widget w, XEvent *event, String *params,
|
|||
long keyNumber;
|
||||
char *ret;
|
||||
int i;
|
||||
DtTermData td = tw->vt.td;
|
||||
|
||||
if (*num_params < 1) {
|
||||
return;
|
||||
|
|
|
@ -624,12 +624,7 @@ _DtTermDeleteEnhancement
|
|||
}
|
||||
|
||||
/*
|
||||
** get a copy of the current enhancement
|
||||
*/
|
||||
fillEnh = enh[col];
|
||||
|
||||
/*
|
||||
** move all of the enhancement blocks between col + width and and the
|
||||
** move all of the enhancement blocks between col + width and the
|
||||
** end of the line to col
|
||||
*/
|
||||
copyCount = WIDTH(line) - (col + width);
|
||||
|
@ -736,19 +731,19 @@ _DtTermSetEnhancement
|
|||
switch (id)
|
||||
{
|
||||
case enhVideo:
|
||||
enhState->video = (value &= VIDEO_MASK);
|
||||
enhState->video = value & VIDEO_MASK;
|
||||
break;
|
||||
case enhField:
|
||||
enhState->field = (value &= FIELD_MASK);
|
||||
enhState->field = value & FIELD_MASK;
|
||||
break;
|
||||
case enhFgColor:
|
||||
enhState->fgColor = (value &= COLOR_MASK);
|
||||
enhState->fgColor = value & COLOR_MASK;
|
||||
break;
|
||||
case enhBgColor:
|
||||
enhState->bgColor = (value &= COLOR_MASK);
|
||||
enhState->bgColor = value & COLOR_MASK;
|
||||
break;
|
||||
case enhFont:
|
||||
enhState->font = (value &= FONT_MASK);
|
||||
enhState->font = value & FONT_MASK;
|
||||
break;
|
||||
default:
|
||||
return(-1);
|
||||
|
|
|
@ -90,7 +90,6 @@ void
|
|||
_DtTermFuncScroll(Widget w, int count, FunctionSource functionSource)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
|
||||
/* make sure the cursor is off... */
|
||||
(void) _DtTermPrimCursorOff(w);
|
||||
|
@ -120,7 +119,6 @@ void
|
|||
_DtTermFuncEndOfBuffer(Widget w, int count, FunctionSource functionSource)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
|
||||
EXIT_IF_MARGINS_SET(tw)
|
||||
(void) _DtTermPrimCursorOff(w);
|
||||
|
@ -220,13 +218,9 @@ termFuncErase
|
|||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermBuffer tb = tpd->termBuffer;
|
||||
short row;
|
||||
short col;
|
||||
|
||||
row = tpd->cursorRow + tpd->topRow;
|
||||
col = tpd->cursorColumn;
|
||||
|
||||
switch(eraseSwitch)
|
||||
{
|
||||
case eraseToEOL:
|
||||
|
@ -339,8 +333,6 @@ void
|
|||
_DtTermFuncClearToEndOfBuffer(Widget w, int count, FunctionSource functionSource)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
short trow ;
|
||||
|
||||
/* turn the cursor off... */
|
||||
(void) _DtTermPrimCursorOff(w);
|
||||
|
@ -855,7 +847,6 @@ _DtTermFuncInsertLine(Widget w, int count, FunctionSource functionSource)
|
|||
}
|
||||
|
||||
/* update screen info and counts... */
|
||||
count -= moveCount;
|
||||
insertedRows += moveCount;
|
||||
}
|
||||
}
|
||||
|
@ -954,7 +945,6 @@ _DtTermVideoEnhancement(Widget w,int value)
|
|||
DtTermPrimData tpd = tw->term.tpd;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
DtTermData td = vtw->vt.td;
|
||||
ParserContext context = GetParserContext(w);
|
||||
|
||||
switch(value) {
|
||||
case 0:
|
||||
|
@ -1075,8 +1065,6 @@ _DtTermFontEnhancement(Widget w,int value)
|
|||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
DtTermData td = vtw->vt.td;
|
||||
ParserContext context = GetParserContext(w);
|
||||
|
||||
(void)_DtTermPrimBufferSetEnhancement(tpd->termBuffer,
|
||||
tpd->topRow + tpd->cursorRow, tpd->cursorColumn, enhFont, value);
|
||||
|
|
|
@ -54,7 +54,6 @@ _DtTermFunctionKeyExecute(
|
|||
)
|
||||
{
|
||||
DtTermWidget tw = (DtTermWidget) w;
|
||||
DtTermData td = tw->vt.td;
|
||||
|
||||
if (!shift || tw->vt.sunFunctionKeys == True ) {
|
||||
if ( tw->vt.sunFunctionKeys == True ) {
|
||||
|
|
|
@ -536,11 +536,10 @@ _DtTermEraseChars(Widget w) /* ECH CSIpX */
|
|||
{
|
||||
ParserContext context ;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
int row,col,cnt ;
|
||||
int col,cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermEraseChars\n")) ;
|
||||
KILLWRAP(vtw) ;
|
||||
context = GetParserContext(w) ;
|
||||
row = vtw->term.tpd->cursorRow ;
|
||||
col = vtw->term.tpd->cursorColumn ;
|
||||
STORELASTARG(context) ;
|
||||
cnt = context->parms[1] ;
|
||||
|
@ -596,12 +595,11 @@ _DtTermCursorUp(Widget w) /* CUU CISpA */
|
|||
{
|
||||
ParserContext context ;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
int trow, row, tmargin, cnt;
|
||||
int row, tmargin, cnt;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermCursorUp\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
KILLWRAP(vtw) ;
|
||||
tmargin = TOPMARGIN(vtw) ;
|
||||
trow = TOPROW(vtw) ;
|
||||
STORELASTARG(context) ;
|
||||
cnt = context->parms[1] ;
|
||||
if (!(cnt))cnt=1;
|
||||
|
@ -659,13 +657,12 @@ _DtTermCursorBack(Widget w) /* CUB CISpD */
|
|||
{
|
||||
ParserContext context ;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
int i,k,j,row,col,fcol,cnt ;
|
||||
int i,k,j,row,col,cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermCursorBack\n")) ;
|
||||
KILLWRAP(vtw) ;
|
||||
context = GetParserContext(w) ;
|
||||
STORELASTARG(context) ;
|
||||
cnt = context->parms[1] ;
|
||||
fcol = FIRSTCOLUMN(vtw) ;
|
||||
row = vtw->term.tpd->cursorRow;
|
||||
col = vtw->term.tpd->cursorColumn;
|
||||
if (!cnt) cnt=1;
|
||||
|
@ -693,10 +690,8 @@ void
|
|||
_DtTermCursorToLineUp(Widget w) /* CPL CSIpF */
|
||||
{
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
ParserContext context ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermCursorToLineUp\n")) ;
|
||||
KILLWRAP(vtw) ;
|
||||
context = GetParserContext(w) ;
|
||||
vtw->term.tpd->cursorColumn = FIRSTCOLUMN(vtw) ;
|
||||
_DtTermCursorUp(w) ;
|
||||
}
|
||||
|
@ -887,7 +882,6 @@ _DtTermCharAttributes(Widget w) /* SGR CSIpm */
|
|||
Debug('P', fprintf(stderr,">>In func _DtTermCharAttributes\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
STORELASTARG(context) ;
|
||||
cnt = PCOUNT(context) ;
|
||||
if(PCOUNT(context)) {
|
||||
for (cnt=1; cnt <= PCOUNT(context); cnt++)
|
||||
_DtTermVideoEnhancement(w,context->parms[cnt]) ;
|
||||
|
@ -936,7 +930,6 @@ _DtTermChangeTextParam(Widget w) /* xterm CSIp;pcCtrl-G */
|
|||
{
|
||||
ParserContext context ;
|
||||
DtTermWidget tw = (DtTermWidget) w;
|
||||
DtTermData vtd = tw->vt.td;
|
||||
Widget sw;
|
||||
int i ;
|
||||
Arg arg[5];
|
||||
|
@ -1033,7 +1026,6 @@ _DtTermSaveCursor(Widget w) /* DECSC ESC7 */
|
|||
{
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
DtTermBuffer tb = (DtTermBuffer)tw->term.tpd->termBuffer ;
|
||||
DtTermData vtd = vtw->vt.td;
|
||||
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermSaveCursor\n")) ;
|
||||
|
@ -1168,19 +1160,13 @@ _DtTermSetCompatLevel(Widget w) /* DECSCL CSI p;p"p (last p literal) */
|
|||
void
|
||||
_DtTermInvokeG3(Widget w) /* LS3R ESC| */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermInvokeG3\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
_DtTermInvokeG2(Widget w) /* LS3R ESC} */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermInvokeG2\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1441,10 +1427,7 @@ _DtTermAlignTest(Widget w) /* DECALN ESC#8 */
|
|||
void
|
||||
_DtTermInvokeG1(Widget w) /* ESC~ESC */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermInvokeG1\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1538,7 +1521,6 @@ _DtTermSelEraseInDisplay(Widget w) /* DECSED ESC?pJ */
|
|||
{
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
TermBuffer tb = tw->term.tpd->termBuffer ;
|
||||
ParserContext context ;
|
||||
enhValues evalues;
|
||||
int r,col1,col2,row1,row2,col,row ;
|
||||
|
@ -1689,10 +1671,7 @@ _DtTermParseHexDigit(Widget w) /* vt220 DECUDK store hex digit*/
|
|||
void
|
||||
_DtTermReset(Widget w) /* RIS ESCc */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermReset\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
_DtTermFuncHardReset(w,0 ,fromParser) ;
|
||||
}
|
||||
|
||||
|
@ -1766,28 +1745,19 @@ _DtTermSetCharEraseMode(Widget w) /* DECSCA ESCp"q */
|
|||
void
|
||||
_DtTermSingleWide(Widget w) /* DECSWL ESC#5 */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermSingleWide\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
_DtTermDoubleWide(Widget w) /* DECDWL ESC#6 */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermDoubleWide\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
_DtTermDoubleHigh(Widget w) /* DECWHL ESC#4 */
|
||||
{
|
||||
ParserContext context ;
|
||||
int cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermDoubleHigh\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1990,11 +1960,9 @@ _DtTermParseBackspace /* Ctrl-H */
|
|||
Widget w
|
||||
)
|
||||
{
|
||||
ParserContext context ;
|
||||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
int row,col,fcol,cnt ;
|
||||
Debug('P', fprintf(stderr,">>In func _DtTermParseBackspace\n")) ;
|
||||
context = GetParserContext(w) ;
|
||||
fcol = FIRSTCOLUMN(vtw) ;
|
||||
row = vtw->term.tpd->cursorRow;
|
||||
col = vtw->term.tpd->cursorColumn;
|
||||
|
@ -2098,7 +2066,6 @@ _DtTermParseSunMisc /* Misc sun esc seqs */
|
|||
DtTermWidget vtw = (DtTermWidget) w;
|
||||
Display *display = XtDisplay(w);
|
||||
int i, scr_num = XScreenNumberOfScreen(XtScreen(w));
|
||||
Window win = XtWindow(w);
|
||||
Window sh_win;
|
||||
Widget sw;
|
||||
XWindowChanges values;
|
||||
|
@ -2233,8 +2200,6 @@ Widget w
|
|||
void
|
||||
_DtTermParserSunIconFile(Widget w) /* Sun set icon to pixmap in file */
|
||||
{
|
||||
DtTermBuffer tb =
|
||||
(DtTermBuffer)((DtTermPrimitiveWidget)w)->term.tpd->termBuffer ;
|
||||
ParserContext context ;
|
||||
int fg, bg;
|
||||
Widget sw;
|
||||
|
|
|
@ -2355,7 +2355,6 @@ static void
|
|||
Realize(Widget w, XtValueMask *p_valueMask, XSetWindowAttributes *attributes)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
Mask valueMask = *p_valueMask;
|
||||
sigset_t sigNew;
|
||||
char buffer[BUFSIZ];
|
||||
|
|
|
@ -157,7 +157,6 @@ _DtTermPrimActionTab(Widget w, XEvent *event,
|
|||
String *params, Cardinal *num_params)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
Boolean shiftedTab = False;
|
||||
Boolean numericTab = False;
|
||||
int i;
|
||||
|
|
|
@ -68,13 +68,6 @@ static
|
|||
void
|
||||
catchExit(void)
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
|
||||
a = 1;
|
||||
b = a;
|
||||
a = b;
|
||||
return;
|
||||
}
|
||||
|
||||
typedef struct _argArray {
|
||||
|
|
|
@ -389,7 +389,6 @@ void
|
|||
_DtTermPrimFuncRedrawDisplay(Widget w, int count, FunctionSource functionSource)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
|
||||
(void) XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True);
|
||||
return;
|
||||
|
|
|
@ -263,6 +263,7 @@ ScaleCharacter(
|
|||
#endif /* USE_PIXMAPS */
|
||||
}
|
||||
|
||||
#ifdef USE_PIXMAPS
|
||||
/* stipple in the rectangle...
|
||||
*/
|
||||
for (j = 0; j < glyph->numStipples; j++) {
|
||||
|
@ -272,10 +273,8 @@ ScaleCharacter(
|
|||
int y1;
|
||||
int y2;
|
||||
int stippleSize;
|
||||
#ifdef USE_PIXMAPS
|
||||
int xIndex;
|
||||
int yIndex;
|
||||
#endif /* USE_PIXMAPS */
|
||||
|
||||
/* scale x1 and x2 to our width... */
|
||||
x1 = ((width - 1) * glyph->stipples[j].x1) / 100;
|
||||
|
@ -293,7 +292,6 @@ ScaleCharacter(
|
|||
y1 += glyph->stipples[j].y1Offset;
|
||||
y2 += glyph->stipples[j].y2Offset;
|
||||
|
||||
#ifdef USE_PIXMAPS
|
||||
/* fill in the area... */
|
||||
for (yIndex = y1; yIndex < y2; yIndex += stippleSize) {
|
||||
for (xIndex = x1; xIndex < x2; xIndex += stippleSize) {
|
||||
|
@ -321,8 +319,8 @@ ScaleCharacter(
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* USE_PIXMAPS */
|
||||
}
|
||||
#endif /* USE_PIXMAPS */
|
||||
|
||||
/* mark this character as completed... */
|
||||
#ifdef USE_PIXMAPS
|
||||
|
@ -374,7 +372,6 @@ _DtTermPrimLineDrawCreateFont(Widget w, GlyphInfo glyphInfo, int numGlyphs,
|
|||
int width, int ascent, int descent)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
int fontNumber;
|
||||
LineDrawFont lineDrawFont;
|
||||
int i;
|
||||
|
|
|
@ -795,7 +795,6 @@ _DtTermPrimFillScreenGap(Widget w)
|
|||
/* the lines are now freed, adjust the used count... */
|
||||
tpd->lastUsedHistoryRow -= historyLinesNeeded;
|
||||
if (tpd->lastUsedHistoryRow < 0) {
|
||||
historyLinesNeeded += tpd->lastUsedHistoryRow;
|
||||
tpd->lastUsedHistoryRow = 0;
|
||||
}
|
||||
}
|
||||
|
@ -824,9 +823,6 @@ _DtTermPrimFillScreenGap(Widget w)
|
|||
enhValue *eValues = (enhValue *)NULL;
|
||||
|
||||
overflowChars = (termChar *) XtMalloc(BUFSIZ * sizeof (termChar));
|
||||
c1 = _DtTermPrimBufferGetCharacterPointer(
|
||||
tBuffer, i1, 0);
|
||||
|
||||
/* Perpetuate the enhancements. */
|
||||
for (eCol = 0; eCol < length; eCol += eCount)
|
||||
{
|
||||
|
@ -1095,7 +1091,6 @@ _DtTermPrimInsertText(Widget w, unsigned char *buffer, int length)
|
|||
* character count...
|
||||
*/
|
||||
pmb = (char *)buffer;
|
||||
pwc = wcBuffer;
|
||||
wcBufferLen = i;
|
||||
i = 0;
|
||||
while (i < wcBufferLen)
|
||||
|
@ -1270,7 +1265,6 @@ _DtTermPrimInsertText(Widget w, unsigned char *buffer, int length)
|
|||
newWidth = DoInsert(w, &buffer[insertStartX],
|
||||
insertCharCount, &wrapped);
|
||||
tpd->cursorColumn += insertCharCount;
|
||||
insertCharCount = 0;
|
||||
if (tpd->insertCharMode != DtTERM_INSERT_CHAR_OFF) {
|
||||
renderEndX = newWidth;
|
||||
} else {
|
||||
|
@ -1289,8 +1283,6 @@ _DtTermPrimInsertText(Widget w, unsigned char *buffer, int length)
|
|||
(void) _DtTermPrimRefreshText(w, 0, tpd->cursorRow + 1,
|
||||
renderEndX, tpd->cursorRow + 1);
|
||||
}
|
||||
wrapped = False;
|
||||
needToRender = False;
|
||||
}
|
||||
|
||||
return(i);
|
||||
|
@ -1336,7 +1328,6 @@ _DtTermPrimParseInput
|
|||
struct termData *tpd = tw->term.tpd;
|
||||
DtTermPrimitiveClassPart *termClassPart = &(((DtTermPrimitiveClassRec *)
|
||||
(tw->core.widget_class))->term_primitive_class);
|
||||
TermBuffer tBuffer = tpd->termBuffer;
|
||||
int i;
|
||||
short insertStart;
|
||||
short insertByteCount;
|
||||
|
|
|
@ -880,7 +880,6 @@ _DtTermPrimInsertTextWc
|
|||
newWidth = DoInsertWc(w, &wcBuffer[insertStartX],
|
||||
insertCharCount, &wrapped);
|
||||
tpd->cursorColumn += insertCharWidth;
|
||||
insertCharCount = 0;
|
||||
if (tpd->insertCharMode == DtTERM_INSERT_CHAR_OFF) {
|
||||
renderEndX = MAX(renderEndX, tpd->cursorColumn);
|
||||
} else {
|
||||
|
@ -899,8 +898,6 @@ _DtTermPrimInsertTextWc
|
|||
(void) _DtTermPrimRefreshTextWc(w, 0, tpd->cursorRow + 1,
|
||||
renderEndX + 1, tpd->cursorRow + 1);
|
||||
}
|
||||
wrapped = False;
|
||||
needToRender = False;
|
||||
}
|
||||
return(i);
|
||||
}
|
||||
|
|
|
@ -105,7 +105,6 @@ _DtTermPrimScrollWait(Widget w)
|
|||
int i;
|
||||
int exposeY;
|
||||
int exposeHeight;
|
||||
int scrolledLines;
|
||||
|
||||
Debug('s', fprintf(stderr, ">>_DtTermPrimScrollWait() starting\n"));
|
||||
Debug('s', fprintf(stderr,
|
||||
|
@ -232,7 +231,6 @@ _DtTermPrimScrollWait(Widget w)
|
|||
exposeHeight));
|
||||
|
||||
/* set scrollLines == 0, or renderText will not render them... */
|
||||
scrolledLines = tpd->scroll.jump.scrollLines;
|
||||
tpd->scroll.jump.scrollLines = 0;
|
||||
/* clear the scrolled flag... */
|
||||
tpd->scroll.jump.scrolled = False;
|
||||
|
|
|
@ -372,7 +372,6 @@ bufferRowColToPos
|
|||
)
|
||||
{
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermSelectInfo selectInfo = tpd->selectInfo;
|
||||
short lrow, lcol;
|
||||
XmTextPosition pos;
|
||||
|
||||
|
@ -1369,7 +1368,7 @@ doExtendedSelection
|
|||
if (position == scan (tw, begin, selectInfo->scanType, scanRight, 1,
|
||||
FALSE))
|
||||
{
|
||||
begin = cursorPos = position;
|
||||
begin = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1505,8 +1504,6 @@ doHandleTargets
|
|||
{
|
||||
_TermSelectPrimaryRec *primSelect = (_TermSelectPrimaryRec *) closure;
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget)w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermSelectInfo selectInfo = tpd->selectInfo;
|
||||
XTextProperty tmpProp;
|
||||
XmTextBlockRec block;
|
||||
int i, status;
|
||||
|
@ -2240,9 +2237,8 @@ _DtTermPrimSelectDeleteLines
|
|||
return;
|
||||
}
|
||||
|
||||
/* figure out what the begin and end lines are... */
|
||||
/* figure out what the begin line is... */
|
||||
selectLineBegin = selectInfo->begin / (selectInfo->columns + 1);
|
||||
selectLineEnd = (selectInfo->end - 1) / (selectInfo->columns + 1);
|
||||
|
||||
/* if the beginning of the selection is after the source, we need to
|
||||
* move the selection up...
|
||||
|
@ -2274,9 +2270,8 @@ _DtTermPrimSelectInsertLines
|
|||
return;
|
||||
}
|
||||
|
||||
/* figure out what the begin and end lines are... */
|
||||
/* figure out what the begin line is... */
|
||||
selectLineBegin = selectInfo->begin / (selectInfo->columns + 1);
|
||||
selectLineEnd = (selectInfo->end - 1) / (selectInfo->columns + 1);
|
||||
|
||||
/* if the beginning of the selection is at or after the source, we need to
|
||||
* move the selection up...
|
||||
|
@ -2328,8 +2323,6 @@ _DtTermPrimSelectPage
|
|||
)
|
||||
{
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget)w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermSelectInfo selectInfo = tpd->selectInfo;
|
||||
XButtonEvent *btnEvent = (XButtonEvent *) event;
|
||||
XmTextPosition begin, end;
|
||||
short lastRow, width;
|
||||
|
@ -2365,8 +2358,6 @@ DropTransferCallback(
|
|||
{
|
||||
_DtTermDropTransferRec *transfer_rec = (_DtTermDropTransferRec *) closure;
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget)transfer_rec->widget;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermSelectInfo selectInfo = tpd->selectInfo;
|
||||
|
||||
/* When type = NULL, we are assuming a DELETE request has been requested */
|
||||
if (*type == 0) {
|
||||
|
@ -2384,7 +2375,6 @@ DropTransferCallback(
|
|||
transferEntries[0].client_data = (XtPointer) transfer_rec;
|
||||
transferEntries[0].target = XmInternAtom(XtDisplay(w),"DELETE",
|
||||
False);
|
||||
transferList = transferEntries;
|
||||
XmDropTransferAdd(w, transferEntries, 1);
|
||||
}
|
||||
}
|
||||
|
@ -2444,8 +2434,6 @@ HandleDrop( Widget w, XmDropProcCallbackStruct *cb )
|
|||
Widget drag_cont, initiator;
|
||||
/* XmTextWidget tw = (XmTextWidget) w; */
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget)w;
|
||||
DtTermPrimData tpd = tw->term.tpd;
|
||||
TermSelectInfo selectInfo = tpd->selectInfo;
|
||||
Cardinal numExportTargets, n;
|
||||
Atom *exportTargets;
|
||||
Arg args[10];
|
||||
|
|
|
@ -324,7 +324,6 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
|||
{
|
||||
#if !defined(CSRG_BASED) /* XXX */
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
struct utmp ut;
|
||||
struct utmp *utPtr;
|
||||
char *c;
|
||||
|
|
|
@ -898,7 +898,7 @@ Initialize(Widget rw, Widget w, Arg *args, Cardinal *num_args)
|
|||
if (geometry && *geometry) {
|
||||
hints.flags = 0;
|
||||
|
||||
flags = XWMGeometry(XtDisplay(w),
|
||||
(void) XWMGeometry(XtDisplay(w),
|
||||
XScreenNumberOfScreen(XtScreen(w)),
|
||||
geometry,
|
||||
"80x24",
|
||||
|
@ -1183,7 +1183,6 @@ Initialize(Widget rw, Widget w, Arg *args, Cardinal *num_args)
|
|||
/* create the function key form...
|
||||
*/
|
||||
|
||||
i = 0;
|
||||
/* Add an event handler for enter and leave events to allow us to
|
||||
* modify the "CAPS LOCK" indicator...
|
||||
*/
|
||||
|
|
|
@ -545,7 +545,6 @@ createFontMenu
|
|||
|
||||
/* clear out mnemonics string... */
|
||||
*mnemonics = '\0';
|
||||
c1 = mnemonics;
|
||||
|
||||
/* create the font buttons... */
|
||||
fontSizeToggles = (Widget *) XtMalloc((fontArrayCount + 1) * sizeof(Widget));
|
||||
|
@ -626,9 +625,9 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
i);
|
||||
}
|
||||
menu = popupMenu;
|
||||
button = _DtTermViewCreateLabel(menu,
|
||||
(void) _DtTermViewCreateLabel(menu,
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,83, "Terminal")));
|
||||
button = _DtTermViewCreateSeparator(menu, "Separator");
|
||||
(void) _DtTermViewCreateSeparator(menu, "Separator");
|
||||
}
|
||||
(void) XtFree((char *) newArglist);
|
||||
|
||||
|
@ -659,7 +658,7 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,19, "C"));
|
||||
accelerator = mallocGETMESSAGE(NL_SETN_ViewMenu,62, "Alt F4");
|
||||
acceleratorText = mallocGETMESSAGE(NL_SETN_ViewMenu,62, "Alt+F4");
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void) _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,18, "Close")),
|
||||
ks,
|
||||
accelerator,
|
||||
|
@ -671,12 +670,12 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
if (menuBar || (!menuBar && firstPopup))
|
||||
#ifdef PULLDOWN_ACCELERATORS
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,21, "W"));
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,20, "Window")),
|
||||
ks,
|
||||
NULL, NULL, NULL, NULL);
|
||||
#else /* PULLDOWN_ACCELERATORS */
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,20, "Window")),
|
||||
NoSymbol, NULL, NULL, NULL, NULL);
|
||||
#endif /* PULLDOWN_ACCELERATORS */
|
||||
|
@ -689,7 +688,7 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
"Ctrl <Key>osfInsert");
|
||||
acceleratorText = mallocGETMESSAGE(NL_SETN_ViewMenu,25, "Ctrl+Insert");
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,23, "C"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void) _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,22, "Copy")),
|
||||
ks,
|
||||
accelerator,
|
||||
|
@ -702,7 +701,7 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
accelerator = mallocGETMESSAGE(NL_SETN_ViewMenu,28,
|
||||
"Shift <Key>osfInsert");
|
||||
acceleratorText = mallocGETMESSAGE(NL_SETN_ViewMenu,29, "Shift+Insert");
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void) _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,26, "Paste")),
|
||||
ks,
|
||||
accelerator,
|
||||
|
@ -714,12 +713,12 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
if (menuBar || (!menuBar && firstPopup))
|
||||
#ifdef PULLDOWN_ACCELERATORS
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,31, "E"));
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,30, "Edit")),
|
||||
ks,
|
||||
NULL, NULL, NULL, NULL);
|
||||
#else /* PULLDOWN_ACCELERATORS */
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,30, "Edit")),
|
||||
NoSymbol, NULL, NULL, NULL, NULL);
|
||||
#endif /* PULLDOWN_ACCELERATORS */
|
||||
|
@ -742,13 +741,13 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
NULL, NULL, scrollBarToggleCallback, NULL);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,37, "G"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void) _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,36, "Global...")),
|
||||
ks,
|
||||
NULL, NULL, globalOptionsCallback, NULL);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,39, "T"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void) _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,38, "Terminal...")),
|
||||
ks,
|
||||
NULL, NULL, terminalOptionsCallback, NULL);
|
||||
|
@ -761,13 +760,13 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
submenu = createPulldown(pulldown[pc], "Reset", arglist, i);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,41, "S"));
|
||||
button = _DtTermViewCreatePushButton(submenu,
|
||||
(void)_DtTermViewCreatePushButton(submenu,
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,40, "Soft Reset")),
|
||||
ks,
|
||||
NULL, NULL, softResetCallback, NULL);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,43, "H"));
|
||||
button = _DtTermViewCreatePushButton(submenu,
|
||||
(void)_DtTermViewCreatePushButton(submenu,
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,42, "Hard Reset")),
|
||||
ks,
|
||||
NULL, NULL, hardResetCallback, NULL);
|
||||
|
@ -781,12 +780,12 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
if (menuBar || (!menuBar && firstPopup))
|
||||
#ifdef PULLDOWN_ACCELERATORS
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,47, "O"));
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,46, "Options")),
|
||||
ks,
|
||||
NULL, NULL, NULL, NULL);
|
||||
#else /* PULLDOWN_ACCELERATORS */
|
||||
cascade = _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(void) _DtTermViewCreateCascadeButton(menu, pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,46, "Options")),
|
||||
NoSymbol, NULL, NULL, NULL, NULL);
|
||||
#endif /* PULLDOWN_ACCELERATORS */
|
||||
|
@ -858,49 +857,49 @@ CreateMenu(Widget termView, Widget parent, Boolean menuBar,
|
|||
|
||||
#else /* HPVUE */
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,65, "v"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,64, "Overview")),
|
||||
ks,
|
||||
NULL, NULL, helpOverviewCallback, NULL);
|
||||
|
||||
button = _DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
(void)_DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,69,"C"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,68, "Table Of Contents")),
|
||||
ks,
|
||||
NULL, NULL, helpTableOfContentsCallback, NULL);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,71,"T"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,70, "Tasks")),
|
||||
ks,
|
||||
NULL, NULL, helpTasksCallback, NULL);
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,73,"R"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,72, "Reference")),
|
||||
ks,
|
||||
NULL, NULL, helpReferenceCallback, NULL) ;
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,75,"K"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,74, "Keyboard")),
|
||||
ks,
|
||||
NULL, NULL, helpKeyboardCallback, NULL) ;
|
||||
|
||||
button = _DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
(void)_DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,77,"U"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,76, "Using Help")),
|
||||
ks,
|
||||
NULL, NULL, helpUsingHelpCallback, NULL);
|
||||
|
||||
button = _DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
(void)_DtTermViewCreateSeparator(pulldown[pc], "Separator");
|
||||
|
||||
ks = XStringToKeysym(GETMESSAGE(NL_SETN_ViewMenu,79,"A"));
|
||||
button = _DtTermViewCreatePushButton(pulldown[pc],
|
||||
(void)_DtTermViewCreatePushButton(pulldown[pc],
|
||||
(GETMESSAGE(NL_SETN_ViewMenu,83, "About Terminal")),
|
||||
ks,
|
||||
NULL, NULL, helpAboutDttermCallback, NULL);
|
||||
|
|
|
@ -280,10 +280,6 @@ main(int argc, char **argv)
|
|||
(void) DumpChar(stdout, charCount++, charList, charListMax,
|
||||
rectList, rectListMax, lineList, lineListMax,
|
||||
stippleList, stippleListMax);
|
||||
lineListMax = 0;
|
||||
rectListMax = 0;
|
||||
stippleListMax = 0;
|
||||
charListMax = 0;
|
||||
}
|
||||
|
||||
/* build the final structure... */
|
||||
|
|
Loading…
Reference in a new issue