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

@@ -167,9 +167,9 @@ typedef enum {
} ScrollAmount;
static EnumType scrollUnits[] = {
"page", (char) scrollPage,
"halfpage", (char) scrollHalfPage,
"line", (char) scrollLine
{ "page", (char) scrollPage, },
{ "halfpage", (char) scrollHalfPage, },
{ "line", (char) scrollLine },
};
void
@@ -227,7 +227,7 @@ void
_DtTermActionBeginningOfBuffer(Widget w, XEvent *event,
String *params, Cardinal *num_params)
{
_DtTermFuncBeginningOfBuffer(w,NULL,1) ;
_DtTermFuncBeginningOfBuffer(w,0,1) ;
(void) _DtTermPrimCursorOn(w);
return;
}
@@ -236,7 +236,7 @@ void
_DtTermActionEndOfBuffer(Widget w, XEvent *event,
String *params, Cardinal *num_params)
{
_DtTermFuncEndOfBuffer(w,NULL,1) ;
_DtTermFuncEndOfBuffer(w,0,1) ;
(void) _DtTermPrimCursorOn(w);
return;
}
@@ -330,10 +330,10 @@ typedef enum {
} CursorDirection;
static EnumType cursorDirections[] = {
"forward", (char) cursorForward,
"backward", (char) cursorBackward,
"up", (char) cursorUp,
"down", (char) cursorDown
{ "forward", (char) cursorForward, },
{ "backward", (char) cursorBackward, },
{ "up", (char) cursorUp, },
{ "down", (char) cursorDown },
};
void
@@ -557,16 +557,16 @@ typedef enum {
} EditType;
static EnumType editTypes[] = {
"find", (char) findType,
"insert", (char) insertType,
"select", (char) selectType,
"next", (char) nextType,
"prior", (char) priorType,
"delete", (char) deleteType,
"remove", (char) removeType,
"help", (char) helpType,
"menu", (char) menuType,
"do", (char) doType
{ "find", (char) findType, },
{ "insert", (char) insertType, },
{ "select", (char) selectType, },
{ "next", (char) nextType, },
{ "prior", (char) priorType, },
{ "delete", (char) deleteType, },
{ "remove", (char) removeType, },
{ "help", (char) helpType, },
{ "menu", (char) menuType, },
{ "do", (char) doType },
};
void