]> pd.if.org Git - pdclib.old/commitdiff
Beautified output.
authorsolar <>
Thu, 1 Jun 2006 11:23:42 +0000 (11:23 +0000)
committersolar <>
Thu, 1 Jun 2006 11:23:42 +0000 (11:23 +0000)
Makefile
functions/stdlib/malloc.c
internals/_PDCLIB_test.h

index 11e1cdc9c1e48e95a7649fbd22fa0d263ba9c62d..ab9e812f34cde897da9b109f3b30c5a5da0c8c50 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,18 +34,20 @@ CFLAGS := -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings
 all: pdclib.a
 
 pdclib.a: $(OBJFILES)
+       @echo " AR      $@"
        @ar rc pdclib.a $?
+       @echo
 
 test: $(FILE)
        $(FILE)
 
 tests: testdrivers
-       -@rc=0; count=0; for file in $(TSTFILES); do echo " TST $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking PDCLib): $$count  Tests failed: $$rc"
+       -@rc=0; count=0; echo; for file in $(TSTFILES); do echo " TST   $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking PDCLib): $$count  Tests failed: $$rc"; echo
 
 testdrivers: $(TSTFILES)
 
 regtests: regtestdrivers
-       -@rc=0; count=0; for file in $(REGFILES); do echo " RTST        $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking system libc): $$count  Tests failed: $$rc"
+       -@rc=0; count=0; echo; for file in $(REGFILES); do echo " RTST  $$file"; ./$$file; rc=`expr $$rc + $$?`; count=`expr $$count + 1`; done; echo; echo "Tests executed (linking system libc): $$count  Tests failed: $$rc"; echo
 
 regtestdrivers: $(REGFILES)
 
@@ -102,13 +104,13 @@ help:
        @echo "help             - print this list"
 
 %.o: %.c Makefile
-       @echo " CC      $@"
+       @echo " CC      $(patsubst functions/%,%,$@)"
        @$(CC) $(CFLAGS) -DNDEBUG -MMD -MP -MT "$*.d $*.t" -g -std=c99 -I./includes -I./internals -c $< -o $@
 
 %.t: %.c Makefile pdclib.a
-       @echo " CC      $@"
+       @echo " CC      $(patsubst functions/%,%,$@)"
        @$(CC) $(CFLAGS) -DTEST -std=c99 -I./includes -I./internals $< pdclib.a -o $@
 
 %.r: %.c Makefile
-       @echo " CC      $@"
+       @echo " CC      $(patsubst functions/%,%,$@)"
        @$(CC) $(CFLAGS) -DTEST -DREGTEST -std=c99 -I./internals $< -o $@
index 2286d0d3c00273c7717faddf802c1652cf60094c..22718ee67e778439d964d99d834201e878525f1e 100644 (file)
@@ -165,8 +165,6 @@ void * sbrk( intptr_t );
 int main( void )
 {
 #ifndef REGTEST
-    printf( "Start of malloc() testing...\n" );
-    {
     void * ptr1, * ptr2, * ptr3, * ptr4, * ptr5, * ptr6, * ptr7, * ptr8, * ptr9;
     char * pages_start = _PDCLIB_allocpages( 0 );
     /* allocating 10 byte; expected: 1 page allocation, node split */
@@ -239,8 +237,6 @@ int main( void )
     TESTCASE( memset( ptr9, 0, 4072 ) == ptr9 );
     TESTCASE( PAGETEST( 9 ) );
     NODETRACE( 17 );
-    printf( "End of malloc() testing.\n" );
-    }
 #else
     puts( "No testing of malloc() - test driver does not know internals of system function." );
 #endif
index 42664b26449050c512a1f50ff99f857c57a2a621..302c27b8e24b1a4b9ab7e74b23a1d84115f678bf 100644 (file)
@@ -1,24 +1,24 @@
-/* $Id$ */\r
-\r
-/* PDCLib testing suite <_PDCLIB_test.h>\r
-\r
-   This file is part of the Public Domain C Library (PDCLib).\r
-   Permission is granted to use, modify, and / or redistribute at will.\r
-*/\r
-\r
-/* -------------------------------------------------------------------------- */\r
-/* Helper macros for test drivers                                             */\r
-/* -------------------------------------------------------------------------- */\r
-\r
-#include <stdio.h>\r
-\r
-char const abcde[] = "abcde";\r
-char const abcdx[] = "abcdx";\r
-\r
-int NO_TESTDRIVER = 0;\r
-\r
-//#define BEGIN_TESTS   unsigned int rc = 0\r
-static unsigned int rc = 0;\r
-#define TESTCASE( x ) if ( x ) {} \\r
-                      else { rc += 1; printf( "Testcase failed: " __FILE__ ", line %d - " #x "\n", __LINE__ ); }\r
-#define TEST_RESULTS  rc\r
+/* $Id$ */
+
+/* PDCLib testing suite <_PDCLIB_test.h>
+
+   This file is part of the Public Domain C Library (PDCLib).
+   Permission is granted to use, modify, and / or redistribute at will.
+*/
+
+/* -------------------------------------------------------------------------- */
+/* Helper macros for test drivers                                             */
+/* -------------------------------------------------------------------------- */
+
+#include <stdio.h>
+
+char const abcde[] = "abcde";
+char const abcdx[] = "abcdx";
+
+int NO_TESTDRIVER = 0;
+
+//#define BEGIN_TESTS   unsigned int rc = 0
+static unsigned int rc = 0;
+#define TESTCASE( x ) if ( x ) {} \
+                      else { rc += 1; printf( "FAILED: " __FILE__ ", line %d - " #x "\n", __LINE__ ); }
+#define TEST_RESULTS  rc