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

@@ -138,7 +138,7 @@ setDebugFlags(char *c1)
argHead.next = (argArray *) 0;
argPtr = &argHead;
while (c3 = _XStrtok(c2, " \t\n", strtok_buf)) {
while ((c3 = _XStrtok(c2, " \t\n", strtok_buf))) {
/* null out c2 so we won't restart strtok... */
c2 = (char *) 0;
argPtr->next = (argArray *) malloc(sizeof(argArray));
@@ -151,7 +151,7 @@ setDebugFlags(char *c1)
for (argPtr = argHead.next; argPtr; argPtr = argPtr->next) {
charList = argPtr->str;
flagList = (char *) 0;
if (c2 = strchr(argPtr->str, ':')) {
if ((c2 = strchr(argPtr->str, ':'))) {
/* null out the ':'... */
*c2++ = '\0';
flagList = c2;
@@ -197,7 +197,7 @@ setDebugFlags(char *c1)
}
c3 = flagList;
while (flagList = _XStrtok(c3, ",", strtok_buf)) {
while ((flagList = _XStrtok(c3, ",", strtok_buf))) {
/* null out c3 so we won't restart strtok... */
c3 = (char *) 0;
if (!flagList || !*flagList) {