Changeset 5222 for trunk/psLib/src/mathtypes
- Timestamp:
- Oct 3, 2005, 3:31:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/mathtypes/psVector.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/mathtypes/psVector.c
r5213 r5222 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 59$ $Name: not supported by cvs2svn $12 * @date $Date: 2005- 09-30 23:09:13$11 * @version $Revision: 1.60 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-10-04 01:31:40 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 19 19 #include <stdio.h> 20 20 #include <math.h> 21 #include <unistd.h> 21 22 22 23 #include "psMemory.h" … … 603 604 char *name) 604 605 { 605 /* 606 XXXX: This is seg faulting. So I'm getting rid of it. 607 FILE *f; 608 f = fdopen(fd, "a+"); 609 fprintf (f, "vector: %s\n", name); 610 611 for (int i = 0; i < a[0].n; i++) { 612 fprintf (f, "%f\n", p_psVectorGetElementF64(a, i)); 613 } 614 fprintf (f, "\n"); 615 // XXXX: temp fix: this should be recoded. 616 // fclose(f); 617 return (true); 618 */ 619 620 printf ("vector: %s\n", name); 606 char line[1024]; 607 608 sprintf (line, "vector: %s\n", name); 609 write (fd, line, strlen(line)); 610 621 611 for (int i = 0; i < a[0].n; i++) { 622 printf("%f\n", p_psVectorGetElementF64(a, i)); 623 } 624 printf("\n"); 625 fflush(stdout); 612 sprintf (line, "%f\n", p_psVectorGetElementF64(a, i)); 613 write (fd, line, strlen(line)); 614 } 615 sprintf (line, "\n"); 616 write (fd, line, strlen(line)); 626 617 return (true); 627 618 }
Note:
See TracChangeset
for help on using the changeset viewer.
