Kill most warnings in lib/DtTerm.

Mostly missing headers, explicit parentheses and new prototypes.

Some Caveats:
* I haven't compile-tested the SVR4 getpty file, it might need another tweak
* There were operator precedence bugs in TermPrimCursor.c and TermPrimRender.c
  (^ vs. !=).  This might change behaviour, but at least I haven't experienced
  any crashes ...
* This adds a little more dependencies for include ordering, but unless we
  want to play the "headers that include headers that include headers..." game,
  this is unavoidable.
This commit is contained in:
Pascal Stumpf
2013-07-22 12:34:15 +02:00
committed by Jon Trulson
parent 8f98ac92cd
commit dc0e8ea74d
43 changed files with 437 additions and 285 deletions

View File

@@ -36,6 +36,8 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $"
* (c) Copyright 1996 Hitachi. *
*/
#include <wctype.h>
#include "TermHeader.h"
#include "TermPrimDebug.h"
#include "TermPrimP.h"
@@ -50,6 +52,8 @@ static char rcs_id[] = "$TOG: TermParse.c /main/3 1999/10/15 12:25:13 mgreess $"
#include "TermFunctionKey.h"
#include "TermParseTableP.h"
#include "TermBufferP.h"
#include "TermPrimUtil.h"
#include "TermPrimParseTable.h"
#if defined (__hpux)
/*
@@ -274,7 +278,7 @@ _DtTermPModeSet(Widget w) /* DECSET CSI?ph */
/* case 2: can't return from vt52 mode */
case 3: /* Column (132) */
if ( vtw->vt.c132 ) { /* xterm allow 132 mode */
(void) _DtTermFuncClearBuffer(w, NULL, fromParser);
(void) _DtTermFuncClearBuffer(w, 0, fromParser);
vtw->term.tpd->cursorRow = TOPROW(vtw) ;
vtw->term.tpd->cursorColumn = FIRSTCOLUMN(vtw) ;
vtw->term.tpd->scrollLockTopRow = TOPROW(vtw);
@@ -362,7 +366,7 @@ _DtTermPModeReset(Widget w) /* DECRST CSI?pl */
/* case 2: ** set vt52 mode */
case 3: /* Column (80) */
if (vtw->vt.c132) { /* allow 132 mode */
(void) _DtTermFuncClearBuffer(w, NULL, fromParser);
(void) _DtTermFuncClearBuffer(w, 0, fromParser);
vtw->term.tpd->cursorRow = TOPROW(vtw) ;
vtw->term.tpd->cursorColumn = FIRSTCOLUMN(vtw) ;
vtw->term.tpd->scrollLockTopRow = TOPROW(vtw);