IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 3, 2005, 3:31:40 PM (21 years ago)
Author:
drobbin
Message:

Added testing for psArgument functions and updated some psTime (minor changes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psVector.c

    r5213 r5222  
    99*  @author Robert DeSonia, MHPCC
    1010*
    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 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1919#include <stdio.h>
    2020#include <math.h>
     21#include <unistd.h>
    2122
    2223#include "psMemory.h"
     
    603604                      char *name)
    604605{
    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
    621611    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));
    626617    return (true);
    627618}
Note: See TracChangeset for help on using the changeset viewer.