gCAD3D 2.40
xa_appDat.c File Reference

application data More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "../ut/ut_os.h"

Functions

int appdat_open__ (FILE **fo, char *mode)
 
int appDat_aload (char *lBuf, int bufSiz, FILE *fpi)
 

Variables

char APP_act_nam [128]
 

Detailed Description

application data

=====================================================
List_functions_start:
appdat_open__ open applicationData-file for read or write
appDat_aload copy section "APPDAT" into file <temp>/<appNam>.appdat
List_functions_end:
=====================================================

Function Documentation

int appdat_open__ ( FILE **  fo,
char *  mode 
)
* appdat_open__ open applicationData-file for read or write
* Input:
* mode "w"=write, "r"=read
* Output:
* fo file, already opened
* retCod 0=OK, -1=error
*
* ApplicationData is stored with the model (as ascii-text).
* Store ApplicationData:
* open file with appdat_open__(&fp, "w")
* write data (as ascii-text !)
* Restore ApplicationData:
* open file with appdat_open__(&fp, "r")
* read data (as ascii-text !)
*
* See ../APP/Demo_appDat1.c
*
int appDat_aload ( char *  lBuf,
int  bufSiz,
FILE *  fpi 
)
* appDat_aload copy section "APPDAT" into file <temp>/<appNam>.appdat
* Write all data until "SECTIONEND" from file fpi
* into file <tmpdir>/<appNam>.appdat
* Data can be ascii|binary
* Input:
* lbuf buffer with line "SECTION APPDAT appNam [nrBytes]"
* bufSiz size of lbuf
*

Variable Documentation

char APP_act_nam[128]