Changeset 4944 for trunk/psLib/src
- Timestamp:
- Sep 2, 2005, 11:32:06 AM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 9 edited
-
astro/psTime.c (modified) (3 diffs)
-
astro/psTime.h (modified) (2 diffs)
-
math/psMinimize.c (modified) (2 diffs)
-
mathtypes/psImage.c (modified) (3 diffs)
-
mathtypes/psImage.h (modified) (2 diffs)
-
mathtypes/psVector.c (modified) (3 diffs)
-
mathtypes/psVector.h (modified) (2 diffs)
-
sys/psTrace.c (modified) (3 diffs)
-
sys/psTrace.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.c
r4937 r4944 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.6 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 8-31 22:28:35$12 * @version $Revision: 1.69 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-09-02 21:32:03 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1360 1360 } 1361 1361 1362 psTime* psTimeFromISO(const char *input) 1362 psTime* psTimeFromISO(const char *input, 1363 psTimeType type) 1363 1364 { 1364 1365 psS32 millisecond; … … 1391 1392 outTime = p_psTimeFromTM(&tmTime); 1392 1393 outTime->nsec = millisecond * 1000000; 1394 outTime->type = type; 1393 1395 1394 1396 return outTime; -
trunk/psLib/src/astro/psTime.h
r4937 r4944 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 8-31 22:28:35$13 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-09-02 21:32:03 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 281 281 */ 282 282 psTime* psTimeFromISO( 283 const char* input ///< Input time to be converted. 283 const char* input, ///< Input time to be converted. 284 psTimeType type ///< Time type. 284 285 ); 285 286 -
trunk/psLib/src/math/psMinimize.c
r4898 r4944 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.13 2$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 8-30 01:14:13$11 * @version $Revision: 1.133 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-02 21:32:06 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 2192 2192 2193 2193 if (psTraceGetLevel (".psLib.dataManip.VectorFitPolynomial1DOrd") >= 5) { 2194 FILE *f = psTraceGetDestination ();2194 FILE *f = fdopen((psTraceGetDestination ()), "a+"); 2195 2195 fprintf (f, "VectorFitPolynomial1D()\n"); 2196 2196 for (int i = 0; i < x->n; i++) { 2197 2197 fprintf (f, "(x, y, yErr) is (%f, %f, %f)\n", x->data.F64[i], y->data.F64[i], yErr->data.F64[i]); 2198 2198 } 2199 fclose(f); 2199 2200 } 2200 2201 -
trunk/psLib/src/mathtypes/psImage.c
r4920 r4944 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1. 79$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 8-31 02:07:11$11 * @version $Revision: 1.80 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-02 21:32:06 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 473 473 } 474 474 475 bool p_psImagePrint (FILE *f, psImage *a, char *name) 476 { 477 475 bool p_psImagePrint (int fd, psImage *a, char *name) 476 { 477 FILE *f; 478 f = fdopen(fd, "a+"); 478 479 fprintf (f, "matrix: %s\n", name); 479 480 … … 485 486 } 486 487 fprintf (f, "\n"); 488 fclose(f); 487 489 return (true); 488 490 } -
trunk/psLib/src/mathtypes/psImage.h
r4920 r4944 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 8-31 02:07:11$13 * @version $Revision: 1.66 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-09-02 21:32:06 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 239 239 */ 240 240 bool p_psImagePrint( 241 FILE *f, ///< Destination stream241 int fd, ///< Destination file descriptor 242 242 psImage *a, ///< image to print 243 243 char *name ///< name of the image (for title) -
trunk/psLib/src/mathtypes/psVector.c
r4898 r4944 9 9 * @author Robert DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1.5 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 8-30 01:14:13$11 * @version $Revision: 1.51 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-02 21:32:06 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 599 599 } 600 600 601 bool p_psVectorPrint ( FILE *f,601 bool p_psVectorPrint (int fd, 602 602 psVector *a, 603 603 char *name) 604 604 { 605 605 FILE *f; 606 f = fdopen(fd, "a+"); 606 607 fprintf (f, "vector: %s\n", name); 607 608 … … 610 611 } 611 612 fprintf (f, "\n"); 613 fclose(f); 612 614 return (true); 613 615 } -
trunk/psLib/src/mathtypes/psVector.h
r4898 r4944 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 8-30 01:14:13$13 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-09-02 21:32:06 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 192 192 */ 193 193 bool p_psVectorPrint ( 194 FILE *f, ///< output stream194 int fd, ///< output file descriptor 195 195 psVector *a, ///< vector to print 196 196 char *name ///< name of vector (for title) -
trunk/psLib/src/sys/psTrace.c
r4578 r4944 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.5 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 7-18 20:54:22$11 * @version $Revision: 1.56 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-02 21:32:06 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 55 55 static p_psComponent* cRoot = NULL; // The root of the trace component 56 56 static FILE *traceFP = NULL; // File destination for messages. 57 //static int traceFD = 0; 57 58 58 59 static void componentFree(p_psComponent* comp); … … 525 526 526 527 // XXX EAM : I've added code to close the old traceFP (safely) 527 void psTraceSetDestination(FILE * fp) 528 { 529 530 bool special; 531 532 // XXX EAM perhaps return an error? 533 if (fp == NULL) { 528 void psTraceSetDestination(int fd) 529 { 530 531 532 /* 533 bool special; 534 535 // XXX EAM perhaps return an error? 536 if (fp == NULL) { 537 return; 538 } 539 540 // cannot close traceFP if one of the special FILE ptrs 541 special = (traceFP == NULL); 542 special |= (traceFP == stdin); 543 special |= (traceFP == stdout); 544 special |= (traceFP == stderr); 545 546 if (!special) { 547 fclose (traceFP); 548 } 549 traceFP = fp; 550 */ 551 if (fd == -1) { 534 552 return; 535 553 } 536 537 // cannot close traceFP if one of the special FILE ptrs 538 special = (traceFP == NULL); 539 special |= (traceFP == stdin); 540 special |= (traceFP == stdout); 541 special |= (traceFP == stderr); 542 543 if (!special) { 544 fclose (traceFP); 545 } 546 traceFP = fp; 547 } 548 549 FILE *psTraceGetDestination() 550 { 551 if (traceFP == NULL) { 554 if (fd == 1) { 552 555 traceFP = stdout; 553 } 554 return traceFP; 556 } else if (fd == 2) { 557 traceFP = stderr; 558 } else if (fd == 0) { 559 traceFP = stdin; 560 } else if (fd > 2) { 561 traceFP = fdopen(fd, "w"); 562 } 563 } 564 565 int psTraceGetDestination() 566 { 567 int fd; 568 fd = fileno(traceFP); 569 return fd; 555 570 } 556 571 -
trunk/psLib/src/sys/psTrace.h
r4610 r4944 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 7-26 00:44:44$11 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-09-02 21:32:06 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 106 106 /// Set the destination of future trace messages. 107 107 void psTraceSetDestination( 108 FILE * fp ///< Pointer to file108 int fd ///< File descriptor 109 109 ); 110 110 … … 113 113 * @return FILE*: File Destination 114 114 */ 115 FILE *psTraceGetDestination(void);115 int psTraceGetDestination(void); 116 116 117 117 /* \} */// End of SystemGroup Functions
Note:
See TracChangeset
for help on using the changeset viewer.
