From 7b0bf23c37592bb5065d6dcf3fd8cccfc729c896 Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Wed, 14 Sep 2011 05:14:42 +0000 Subject: [PATCH] Tests/readitemloop: Fix AOS compilation issues Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@41325 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- test/dos/readitemloop.c | 73 +++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/test/dos/readitemloop.c b/test/dos/readitemloop.c index eb23b1d4fa..780fc4ffe1 100644 --- a/test/dos/readitemloop.c +++ b/test/dos/readitemloop.c @@ -1,36 +1,37 @@ -#include -#include - -#include - -int __nocommandline = 1; - -/* No newline in the end!!! Important!!! */ -static char text[] = "WORD1 WORD2 WORD3"; -static char buf[256]; - -int main(void) -{ - struct CSource cs; - int i; - LONG res; - - cs.CS_Buffer = text; - cs.CS_Length = sizeof(text) - 1; - cs.CS_CurChr = 0; - - i = 1; - do - { - res = ReadItem(buf, sizeof(buf), &cs); - - printf("Step %d, result %d, buffer %s, CurChr %d\n", i++, res, buf, cs.CS_CurChr); - if (i == 10) - { - printf("ERROR: Unrecoverable loop detected!\n"); - break; - } - } while (res != ITEM_NOTHING); - - return 0; -} + +#include +#include +#include + + +int __nocommandline = 1; + +/* No newline in the end!!! Important!!! */ +static char text[] = "WORD1 WORD2 WORD3"; +static char buf[256]; + +int main(void) +{ + struct CSource cs; + int i; + LONG res; + + cs.CS_Buffer = text; + cs.CS_Length = sizeof(text) - 1; + cs.CS_CurChr = 0; + + i = 1; + do + { + res = ReadItem(buf, sizeof(buf), &cs); + + Printf("Step %ld, result %ld, buffer %s, CurChr %ld\n", i++, res, buf, cs.CS_CurChr); + if (i == 10) + { + Printf("ERROR: Unrecoverable loop detected!\n"); + break; + } + } while (res != ITEM_NOTHING); + + return 0; +} -- 2.11.4.GIT