diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/ECOS/Makefile GoAhead/ECOS/Makefile --- GoAhead.ORIG/ECOS/Makefile Thu May 18 15:20:10 2000 +++ GoAhead/ECOS/Makefile Tue Sep 19 09:02:16 2000 @@ -6,16 +6,17 @@ # These definitions come from your eCos install tree # DEBUG := -g -Wall -O2 +#DEBUG := -g -Wall -O2 -DB_STATS -DB_VERIFY_CAUSES_SEVERE_OVERHEAD # For Cirrus Logic EDB72xx board -PKG_INSTALL_DIR := /work/net_test/install -COMMAND_PREFIX := arm-elf- -CFLAGS := -mcpu=arm7tdmi -D__EDB7209 -D__EDB7212 $(DEBUG) +#PKG_INSTALL_DIR := /work/assabet/test/install +#COMMAND_PREFIX := arm-elf- +#CFLAGS := -mcpu=strongarm1100 $(DEBUG) # For Motorola PowerPC MBX/860 -##PKG_INSTALL_DIR := /work/net_mbx/install -##COMMAND_PREFIX := powerpc-eabi- -##CFLAGS := -mcpu=860 -msoft-float $(DEBUG) +PKG_INSTALL_DIR := /work/mbx/test/install +COMMAND_PREFIX := powerpc-eabi- +CFLAGS := -mcpu=860 -msoft-float $(DEBUG) # # These should not need to be changed @@ -75,7 +76,7 @@ # # Primary link # -$(NAME): Makefile main.o $(ARCH) +$(NAME): Makefile main.o $(ARCH) $(PKG_INSTALL_DIR)/lib/libtarget.a $(PKG_INSTALL_DIR)/lib/libextras.a $(CC) -o $(NAME) $(CFLAGS) $(IFLAGS) \ main.o $(ARCH) $(LDFLAGS) diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/ECOS/main.c GoAhead/ECOS/main.c --- GoAhead.ORIG/ECOS/main.c Thu May 18 15:20:10 2000 +++ GoAhead/ECOS/main.c Tue Sep 19 08:06:52 2000 @@ -41,7 +41,7 @@ extern void defaultTraceHandler(int level, char_t *buf); #if B_STATS -#error WARNING: B_STATS directive is not supported in this OS! +//#error WARNING: B_STATS directive is not supported in this OS! #endif /*********************************** Code *************************************/ @@ -57,7 +57,7 @@ * 60KB allows for several concurrent page requests. If more space * is required, malloc will be used for the overflow. */ - bopen(NULL, (60 * 1024), B_USE_MALLOC); + bopen(NULL, (160 * 1024), B_USE_MALLOC); /* * Initialize the web server @@ -120,7 +120,8 @@ /* * Configure the web server options before opening the web server */ - websSetDefaultPage(T("default.asp")); +// websSetDefaultPage(T("default.asp")); + websSetDefaultPage(T("index.html")); websSetPassword(password); /* @@ -239,6 +240,7 @@ #endif } +#if 0 /******************************************************************************/ /* * Wrappers for depreciated socket I/O functions @@ -253,5 +255,6 @@ { return read(s, buf, len); } +#endif /******************************************************************************/ Only in GoAhead/ECOS: web_files Only in GoAhead/ECOS: web_files.00 Only in GoAhead/ECOS: webcomp Only in GoAhead/ECOS: webrom.c Only in GoAhead/ECOS: webs diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/balloc.c GoAhead/balloc.c --- GoAhead.ORIG/balloc.c Thu May 18 15:20:10 2000 +++ GoAhead/balloc.c Tue Sep 19 08:06:52 2000 @@ -207,7 +207,11 @@ * queues for a suitable one. */ -void *balloc(B_ARGS_DEC, int size) +#if B_STATS +void *_balloc(char *file, int line, int size) +#else +void *_balloc(int size) +#endif { bType *bp; int q, memSize; @@ -353,6 +357,38 @@ return (void*) ((char*) bp + sizeof(bType)); } +static void +_bstatsShow(int handle, char_t *fmt, ...) +{ + va_list args; + va_start(args, fmt); + vprintf(fmt, args); + va_end(args); +} + +void *balloc(B_ARGS_DEC, int size) +{ +#if B_STATS + void *res = _balloc(B_ARGS, size); +#else + void *res = _balloc(size); +#endif +// printf("balloc(%d) = 0x%x\n", size, res); + if (res == (void *)0) { + printf("balloc(%d) = 0x%x\n", size, res); +#if B_STATS + bstats(0, _bstatsShow); +#endif + } + if (bFreeLeft < 1024) { + printf("** Warning - memory low\n"); +#if B_STATS + bstats(0, _bstatsShow); +#endif + } + return res; +} + /******************************************************************************/ /* * Free a block back to the relevant free q. We don't free back to the O/S @@ -364,6 +400,8 @@ { bType *bp; int q, memSize; + +// printf("bfree(0x%x)\n", mp); #if B_VERIFY_CAUSES_SEVERE_OVERHEAD verifyBallocSpace(); diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/default.c GoAhead/default.c --- GoAhead.ORIG/default.c Thu May 18 15:20:10 2000 +++ GoAhead/default.c Tue Sep 19 08:06:53 2000 @@ -45,6 +45,7 @@ websStatType sbuf; char_t *lpath, *tmp, *date; int bytes, flags, nchars; + int was_dir = 0; a_assert(websValid(wp)); a_assert(url && *url); @@ -64,12 +65,13 @@ nchars = gstrlen(lpath) - 1; if (lpath[nchars] == '/' || lpath[nchars] == '\\') { lpath[nchars] = '\0'; + was_dir = 1; } /* * If the file is a directory, redirect using the nominated default page */ - if (websPageIsDirectory(lpath)) { + if (was_dir || websPageIsDirectory(lpath)) { nchars = gstrlen(path); if (path[nchars-1] == '/' || path[nchars-1] == '\\') { path[--nchars] = '\0'; @@ -84,6 +86,7 @@ /* * Open the document. Stat for later use. */ + printf("Opening %s\n", lpath); if (websPageOpen(wp, lpath, path, SOCKET_RDONLY | SOCKET_BINARY, 0666) < 0) { websError(wp, 400, diff --exclude=*.[oiasd] --exclude=*~ -ur GoAhead.ORIG/uemf.h GoAhead/uemf.h --- GoAhead.ORIG/uemf.h Thu May 18 15:20:10 2000 +++ GoAhead/uemf.h Tue Sep 19 06:38:07 2000 @@ -148,6 +148,7 @@ #include #include #include + #define NFDBITS __NFDBITS #endif /* ECOS */ /********************************** Includes **********************************/ @@ -199,7 +200,7 @@ #endif /* LINUX && ! _STRUCT_TIMEVAL */ #if ECOS - #define O_RDONLY 1 +// #define O_RDONLY 1 #define O_BINARY 2 #define __NO_PACK 1