Index: /trunk/psLib/test/Makefile
===================================================================
--- /trunk/psLib/test/Makefile	(revision 526)
+++ /trunk/psLib/test/Makefile	(revision 526)
@@ -0,0 +1,73 @@
+##############################################################################
+##
+##  Makefile:   test
+##
+##  $Revision: 1.1 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-04-27 02:20:28 $
+##
+##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+###############################################################################
+
+# Define variable prefix to the top level project - psLib
+# This is necessary for definition is Makefile.Globals uses prefix
+
+ifndef prefix
+    export prefix=$(shell cd ..;pwd)
+endif
+
+# Define the two targets to be built
+
+TARGET_STATIC  = libpstest.a
+TARGET_DYNAMIC = libpstest.$(DLL)
+
+# Include the make global definitions for the project
+
+include ../src/Makefile.Globals
+
+# Set CFLAGS used by the implicit rule to compile .c
+
+CFLAGS := $(CFLAGS_RELOC)
+
+# Define the source objects
+ 
+SRC_OBJS = psTest.o
+
+# Define PHONY target "all" which will make all the necessary items
+
+all: $(TARGET_STATIC) $(TARGET_DYNAMIC)
+
+# Rule to make static library
+
+libpstest.a: $(SRC_OBJS)
+# The ar option -r is to add/replace object and -s is to create
+# a symbol table in the archive
+	$(AR) rcs $@ $(SRC_OBJS)
+
+# Rule to make dynamic library
+
+libpstest.$(DLL): $(SRC_OBJS)
+	$(CC) $(LDFLAGS_DLL) $(SRC_OBJS) -o $@  
+
+# Define PHONY target "install" which will install necessary files
+
+install: $(TARGET_STATIC) $(TARGET_DYNAMIC)
+	install *.h $(includedir)
+	install $(TARGET_STATIC) $(libexecdir)
+	install $(TARGET_DYNAMIC) $(libexecdir)
+
+# Define PHONY target "distclean" which will cleanup the distribution
+
+distclean:	clean
+	$(RM) $(TARGET_STATIC)
+	$(RM) $(TARGET_DYNAMIC)
+	$(RM) $(libexecdir)/$(TARGET_STATIC)
+	$(RM) $(libexecdir)/$(TARGET_DYNAMIC)
+
+# Define PHONY target "clean" which will cleanup the development area
+
+clean:
+	@echo "    Deleting intermediate files for 'test'"
+	$(RM) $(SRC_OBJS) *.lint
+
+%.lint: %.c
+	splint +posixlib -exportlocal -realcompare $(INCLUDE_GLOBAL) $? > $@; cat $@ 
Index: /trunk/psLib/test/psTest.c
===================================================================
--- /trunk/psLib/test/psTest.c	(revision 525)
+++ /trunk/psLib/test/psTest.c	(revision 526)
@@ -18,5 +18,5 @@
 #define HEADER_BOTTOM "\\------------------------------------------------------------------------/\n\n"
 
-void p_printPositiveTestHeader(const char* testPointFile, const char* packageName, const char* testPointName)
+void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName)
 {
     char TP[80];
@@ -24,12 +24,12 @@
     snprintf(TP,80,"%s{%s}",packageName,testPointName);
 
-    printf(HEADER_TOP);
-    printf(HEADER_LINE_STRING, "TestFile", testPointFile);
-    printf(HEADER_LINE_STRING, "TestPoint", TP);
-    printf(HEADER_LINE_STRING, "TestType","Positive");
-    printf(HEADER_BOTTOM);
+    fprintf(fp, HEADER_TOP);
+    fprintf(fp, HEADER_LINE_STRING, "TestFile", testPointFile);
+    fprintf(fp, HEADER_LINE_STRING, "TestPoint", TP);
+    fprintf(fp, HEADER_LINE_STRING, "TestType","Positive");
+    fprintf(fp, HEADER_BOTTOM);
 }
 
-void p_printNegativeTestHeader(const char* testPointFile, const char* packageName,
+void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
                                const char* testPointName,const char* expectedError, int exitValue)
 {
@@ -38,20 +38,20 @@
     snprintf(TP,80,"%s{%s}",packageName,testPointName);
 
-    printf(HEADER_TOP);
-    printf(HEADER_LINE_STRING, "TestFile", testPointFile);
-    printf(HEADER_LINE_STRING, "TestPoint", TP);
-    printf(HEADER_LINE_STRING,"TestType","Negative");
-    printf(HEADER_LINE_STRING,"ExpectedErrorText",expectedError);
-    printf(HEADER_LINE_INT,"ExpectedStatusValue",exitValue);
-    printf(HEADER_BOTTOM);
+    fprintf(fp, HEADER_TOP);
+    fprintf(fp, HEADER_LINE_STRING, "TestFile", testPointFile);
+    fprintf(fp, HEADER_LINE_STRING, "TestPoint", TP);
+    fprintf(fp, HEADER_LINE_STRING,"TestType","Negative");
+    fprintf(fp, HEADER_LINE_STRING,"ExpectedErrorText",expectedError);
+    fprintf(fp, HEADER_LINE_INT,"ExpectedStatusValue",exitValue);
+    fprintf(fp, HEADER_BOTTOM);
 }
 
 
-void p_printFooter(const char* testPointFile, const char* packageName,const char* testPointName, bool success)
+void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName,const char* testPointName, bool success)
 {
     if (success) {
-        printf("\n---> TESTPOINT PASSED (%s{%s} | %s)\n\n", packageName,testPointName, testPointFile);
+        fprintf(fp, "\n---> TESTPOINT PASSED (%s{%s} | %s)\n\n", packageName,testPointName, testPointFile);
     } else {
-        printf("\n---> TESTPOINT FAILED (%s{%s} | %s)\n\n", packageName,testPointName,testPointFile);
+        fprintf(fp, "\n---> TESTPOINT FAILED (%s{%s} | %s)\n\n", packageName,testPointName,testPointFile);
     }
 }
Index: /trunk/psLib/test/psTest.h
===================================================================
--- /trunk/psLib/test/psTest.h	(revision 525)
+++ /trunk/psLib/test/psTest.h	(revision 526)
@@ -6,22 +6,22 @@
 #include <stdbool.h>
 
-#define printPositiveTestHeader(packageName, testPointName) \
-p_printPositiveTestHeader(__FILE__, packageName, testPointName)
+#define printPositiveTestHeader(filePtr, packageName, testPointName) \
+p_printPositiveTestHeader(filePtr, __FILE__, packageName, testPointName)
 
-#define printNegativeTestHeader(packageName, testPointName, expectedError, exitValue) \
-p_printNegativeTestHeader(__FILE__, packageName, testPointName, expectedError, exitValue)
+#define printNegativeTestHeader(filePtr, packageName, testPointName, expectedError, exitValue) \
+p_printNegativeTestHeader(filePtr, __FILE__, packageName, testPointName, expectedError, exitValue)
 
-#define printFooter(packageName, testPointName, success) \
-p_printFooter(__FILE__, packageName, testPointName, success)
+#define printFooter(filePtr, packageName, testPointName, success) \
+p_printFooter(filePtr, __FILE__, packageName, testPointName, success)
 
 
 /////////////////////////// PRIVATE FUNCTIONS //////////////////////////////
 
-void p_printPositiveTestHeader(const char* testPointFile, const char* packageName, const char* testPointName);
+void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName);
 
-void p_printNegativeTestHeader(const char* testPointFile, const char* packageName,
+void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
                                const char* testPointName,const char* expectedError, int exitValue);
 
-void p_printFooter(const char* testPointFile, const char* packageName, const char* testPointName, bool
+void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName, bool
                    success);
 #endif
