IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2005, 2:15:51 PM (21 years ago)
Author:
drobbin
Message:

Updated/changed psTrace & psLog fxns to use fd (were FILE*) as described in SDRS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tst_psRandom.c

    r4859 r4951  
    1919#include <stdio.h>
    2020#include <math.h>
     21#include <fcntl.h>
     22#include <unistd.h>
    2123#include "pslib_strict.h"
    2224#include "psTest.h"
     
    8082
    8183    // Valid type allocation with seed equal to zero
    82     psLogSetDestination("file:seed_msglog1.txt");
     84    int fd1 = creat("seed_msglog1.txt", 0666);
     85    //    psLogSetDestination("file:seed_msglog1.txt");
     86    psLogSetDestination(fd1);
    8387    myRNG = psRandomAlloc(PS_RANDOM_TAUS, 0);
    84     psLogSetDestination("dest:stderr");
     88    //    psLogSetDestination("dest:stderr");
     89    psLogSetDestination(2);
    8590    if (myRNG == NULL) {
    8691        psError(PS_ERR_UNKNOWN,true,"Could not allocate psRandom structure");
     
    107112        return 6;
    108113    }
     114    close(fd1);
    109115    psFree(myRNG);
    110116
     
    291297    psRandom *myRNG1 = NULL;
    292298    myRNG1 = psRandomAlloc(PS_RANDOM_TAUS, SEED);
    293     psLogSetDestination("file:seed_msglog2.txt");
     299    //    psLogSetDestination("dest:stderr");
     300    psLogSetDestination(0);
    294301    psRandomReset(myRNG1,0);
    295     psLogSetDestination("dest:stderr");
     302    //    psLogSetDestination("dest:stderr");
     303    psLogSetDestination(2);
    296304    psFree(myRNG1);
    297305
Note: See TracChangeset for help on using the changeset viewer.