libtpccurveio
 All Data Structures Files Functions Variables Enumerations Enumerator Defines
Defines | Functions
idwc.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include "include/dft.h"
#include "include/dftunit.h"
#include "include/idwc.h"
Include dependency graph for idwc.c:

Go to the source code of this file.

Defines

#define MAX_IDWC_LINE_LEN   512

Functions

int idwcWrite (DFT *dft, char *filename)
int idwcRead (char *filename, DFT *dft)

Define Documentation

#define MAX_IDWC_LINE_LEN   512

Definition at line 39 of file idwc.c.

Referenced by idwcRead().


Function Documentation

int idwcRead ( char *  filename,
DFT dft 
)

Read IDWC file into DFT data structure. Any previous content of DFT is deleted.

Returns:
Returns nonzero in case an error is encountered and sets dfterrmsg.
Parameters:
filenameName of IDWC file to be read
dftPointer to DFT data where to regional TAC data is read

Definition at line 116 of file idwc.c.

References DFT::_type, dftEmpty(), dfterrmsg, dftFrametimes(), dftSetmem(), DFT::frameNr, DFT::isweight, MAX_IDWC_LINE_LEN, DFT::timetype, DFT::timeunit, DFT::voi, Voi::voiname, DFT::voiNr, DFT::w, DFT::x, and Voi::y.

Referenced by dftRead().

Here is the call graph for this function:

int idwcWrite ( DFT dft,
char *  filename 
)

Write DFT data into IDWC file format. If file exists, a backup file (+BACKUP_EXTENSION) is written.

Returns:
Returns nonzero in case an error is encountered and sets dfterrmsg.
Parameters:
dftPointer to DFT data that is written in IDWC format
filenameName of IDWC file to be written; also "stdout" is accepted

Definition at line 57 of file idwc.c.

References BACKUP_EXTENSION, dfterrmsg, DFT::frameNr, DFT::voi, DFT::voiNr, DFT::w, DFT::x, and Voi::y.