diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2009-10-10 16:20:46 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2009-10-10 16:20:46 -0700 |
commit | 1dc46082887cde373e314ffaebcf27398193a3cf (patch) | |
tree | ed189bafd2fada3621428a685abeb3c74414ffae /xts5 | |
parent | 62d46668a712e4bc640804c3ae035f5c4817bd9d (diff) |
xts5: Add more standard headers to kill implicit declaration warnings
For some reason, there seems to be an aversion to the standard headers.
Mostly this is <string.h>, which unfortunately causes a symbol conflict
with index on glibc.
Diffstat (limited to 'xts5')
-rw-r--r-- | xts5/Xlib17/XGetDefault/Test3.c | 1 | ||||
-rw-r--r-- | xts5/Xlib17/XGetDefault/Test4.c | 1 | ||||
-rw-r--r-- | xts5/Xlib17/XGetDefault/Test5.c | 1 | ||||
-rw-r--r-- | xts5/Xlib17/XKeycodeToKeysym.m | 20 | ||||
-rw-r--r-- | xts5/Xlib17/XLookupKeysym.m | 14 | ||||
-rw-r--r-- | xts5/lib/mc/mcinclude.mc | 2 | ||||
-rw-r--r-- | xts5/lib/mc/mcxcinc.mc | 1 | ||||
-rw-r--r-- | xts5/lib/mc/mcxpinc.mc | 2 | ||||
-rw-r--r-- | xts5/src/bin/mc/error.c | 1 | ||||
-rw-r--r-- | xts5/src/bin/mc/expand.c | 3 | ||||
-rw-r--r-- | xts5/src/bin/mc/sections.c | 1 |
11 files changed, 29 insertions, 18 deletions
diff --git a/xts5/Xlib17/XGetDefault/Test3.c b/xts5/Xlib17/XGetDefault/Test3.c index c244fb5d..fba6b2db 100644 --- a/xts5/Xlib17/XGetDefault/Test3.c +++ b/xts5/Xlib17/XGetDefault/Test3.c @@ -110,6 +110,7 @@ purpose. It is provided "as is" without express or implied warranty. #endif #include <stdlib.h> +#include <string.h> #include "xtest.h" #include <X11/Xlib.h> #include <X11/Xutil.h> diff --git a/xts5/Xlib17/XGetDefault/Test4.c b/xts5/Xlib17/XGetDefault/Test4.c index 1bfd5696..450a6d2b 100644 --- a/xts5/Xlib17/XGetDefault/Test4.c +++ b/xts5/Xlib17/XGetDefault/Test4.c @@ -110,6 +110,7 @@ purpose. It is provided "as is" without express or implied warranty. #endif #include <stdlib.h> +#include <string.h> #include "xtest.h" #include <X11/Xlib.h> #include <X11/Xutil.h> diff --git a/xts5/Xlib17/XGetDefault/Test5.c b/xts5/Xlib17/XGetDefault/Test5.c index 60ef532e..4da50337 100644 --- a/xts5/Xlib17/XGetDefault/Test5.c +++ b/xts5/Xlib17/XGetDefault/Test5.c @@ -113,6 +113,7 @@ purpose. It is provided "as is" without express or implied warranty. #endif #include <stdlib.h> +#include <string.h> #include "xtest.h" #include <X11/Xlib.h> #include <X11/Xutil.h> diff --git a/xts5/Xlib17/XKeycodeToKeysym.m b/xts5/Xlib17/XKeycodeToKeysym.m index acc18f0b..5ddbbc5a 100644 --- a/xts5/Xlib17/XKeycodeToKeysym.m +++ b/xts5/Xlib17/XKeycodeToKeysym.m @@ -102,10 +102,10 @@ purpose. It is provided "as is" without express or implied warranty. */ >>TITLE XKeycodeToKeysym Xlib17 KeySym -XKeyCodeToKeysym(display, keycode, index) +XKeyCodeToKeysym(display, keycode, idx) Display *display = Dsp; KeyCode keycode; -int index; +int idx; >>EXTERN #define XK_LATIN1 #include "X11/keysymdef.h" @@ -139,23 +139,23 @@ KeySym ks; CHECK; keycode = kc; - index = 0; + idx = 0; ks = XCALL; if(ks != XK_a) { report("%s() returned KeySym %lu instead of %lu for KeyCode %lu and index %d.", - TestName, (long) ks, (long) XK_a, (long) kc, index); + TestName, (long) ks, (long) XK_a, (long) kc, idx); FAIL; } else CHECK; - index = 1; + idx = 1; ks = XCALL; if(ks != XK_A) { report("%s() returned KeySym %lu instead of %lu for KeyCode %lu and index %d.", - TestName, (long) ks, (long) XK_A, (long) kc, index); + TestName, (long) ks, (long) XK_A, (long) kc, idx); FAIL; } else CHECK; @@ -188,24 +188,24 @@ int kspkc; minkc = (KeyCode)mini; maxkc = (KeyCode)maxi; - index = 0; + idx = 0; keycode = maxkc + 1; ks = XCALL; if(ks != NoSymbol) { report("%s() returned KeySym value %ul instead of NoSymbol (%lu) for KeyCode %lu and index %d.", - TestName, (long) ks, (long) NoSymbol, (long) keycode, index); + TestName, (long) ks, (long) NoSymbol, (long) keycode, idx); FAIL; } else CHECK; keycode = minkc; - index = 9; /* only 0-8 are valid. */ + idx = 9; /* only 0-8 are valid. */ ks = XCALL; if(ks != NoSymbol) { report("%s() returned KeySym value %ul instead of NoSymbol (%lu) for KeyCode %lu and index %d.", - TestName, (long) ks, (long) NoSymbol, (long) keycode, index); + TestName, (long) ks, (long) NoSymbol, (long) keycode, idx); FAIL; } else CHECK; diff --git a/xts5/Xlib17/XLookupKeysym.m b/xts5/Xlib17/XLookupKeysym.m index 60d739f3..d727054e 100644 --- a/xts5/Xlib17/XLookupKeysym.m +++ b/xts5/Xlib17/XLookupKeysym.m @@ -99,9 +99,9 @@ purpose. It is provided "as is" without express or implied warranty. */ >>TITLE XLookupKeysym Xlib17 KeySym -XLookupKeysym(key_event, index) +XLookupKeysym(key_event, idx) XKeyEvent *key_event; -int index = 0; +int idx = 0; >>ASSERTION Good A A call to xname returns the .S KeySym @@ -138,12 +138,12 @@ int i; ke.display = Dsp; for(i=minkc; i<=maxkc; i++) - for(index = 0; index < syms_per_kc; index++) { - ks = XKeycodeToKeysym(Dsp, i, index); + for(idx = 0; idx < syms_per_kc; idx++) { + ks = XKeycodeToKeysym(Dsp, i, idx); ke.keycode = i; res = XCALL; if(res != ks){ - report("%s() returned KeySym %lu instead of %lu for KeyCode %lu with index %d.", TestName, (long) res, (long) ks, (long) i, index); + report("%s() returned KeySym %lu instead of %lu for KeyCode %lu with index %d.", TestName, (long) res, (long) ks, (long) i, idx); FAIL; } else CHECK; @@ -190,12 +190,12 @@ XKeyEvent ke; ke.display = Dsp; ke.keycode = kc; - for(index=0; index < syms_per_kc; index++) { + for(idx=0; idx < syms_per_kc; idx++) { res = XCALL; if(res != NoSymbol) { - report("%s() returned %lu instead of NoSymbol (%lu) for invalid KeyCode %lu with index %d.", TestName, (long) res, (long) NoSymbol, (long) kc, index); + report("%s() returned %lu instead of NoSymbol (%lu) for invalid KeyCode %lu with index %d.", TestName, (long) res, (long) NoSymbol, (long) kc, idx); FAIL; } else CHECK; diff --git a/xts5/lib/mc/mcinclude.mc b/xts5/lib/mc/mcinclude.mc index 7dde9cc3..c6bf11ba 100644 --- a/xts5/lib/mc/mcinclude.mc +++ b/xts5/lib/mc/mcinclude.mc @@ -4,6 +4,8 @@ #endif #include <stdlib.h> +#include <stdio.h> +#include <string.h> #include "xtest.h" #include "X11/Xlib.h" #include "X11/Xutil.h" diff --git a/xts5/lib/mc/mcxcinc.mc b/xts5/lib/mc/mcxcinc.mc index cfbd9671..226b7685 100644 --- a/xts5/lib/mc/mcxcinc.mc +++ b/xts5/lib/mc/mcxcinc.mc @@ -3,6 +3,7 @@ #include <config.h> #endif +#include <stdlib.h> #include <stdio.h> #include <string.h> #include <locale.h> diff --git a/xts5/lib/mc/mcxpinc.mc b/xts5/lib/mc/mcxpinc.mc index 311bbcf1..25a51444 100644 --- a/xts5/lib/mc/mcxpinc.mc +++ b/xts5/lib/mc/mcxpinc.mc @@ -4,6 +4,8 @@ #endif #include <stdlib.h> +#include <stdio.h> +#include <string.h> #include "xtest.h" #include "tet_api.h" #ifdef INPUTEXTENSION diff --git a/xts5/src/bin/mc/error.c b/xts5/src/bin/mc/error.c index 3f9d9ecb..c7835346 100644 --- a/xts5/src/bin/mc/error.c +++ b/xts5/src/bin/mc/error.c @@ -108,6 +108,7 @@ purpose. It is provided "as is" without express or implied warranty. #endif #include <stdio.h> +#include <string.h> #include "mc.h" diff --git a/xts5/src/bin/mc/expand.c b/xts5/src/bin/mc/expand.c index 2f3a1928..47aeab00 100644 --- a/xts5/src/bin/mc/expand.c +++ b/xts5/src/bin/mc/expand.c @@ -106,7 +106,8 @@ purpose. It is provided "as is" without express or implied warranty. #include <config.h> #endif -#include "stdio.h" +#include <stdio.h> +#include <string.h> #include "mc.h" #define F_BANNER "mepbanner.tmc" diff --git a/xts5/src/bin/mc/sections.c b/xts5/src/bin/mc/sections.c index 558145fa..047ffbff 100644 --- a/xts5/src/bin/mc/sections.c +++ b/xts5/src/bin/mc/sections.c @@ -109,6 +109,7 @@ purpose. It is provided "as is" without express or implied warranty. #include <config.h> #endif +#include <stdlib.h> #include <stdio.h> #include <ctype.h> #include "string.h" |