gCAD3D 2.40
ut_os__.c File Reference

opsys functions - OS-independant. More...

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

Functions

int OS_file_sig_cre (int mode, void *data)
 
int OS_file_sig_wait (int mode, void *data)
 

Detailed Description

opsys functions - OS-independant.

=====================================================
List_functions_start:
OS_file_sig_cre create signal-file
OS_file_sig_wait wait for signalfile & get its content
List_functions_end:
=====================================================

Function Documentation

int OS_file_sig_cre ( int  mode,
void *  data 
)
* OS_file_sig_cre create signal-file
* Input:
* mode 0 clear file; data = signalfilename; must be done first
* 1 write data = string (null terminated) -> signalfile
* 2 write data = int (4 bytes) -> signalfile
* 99 cancelled by user (following read gives retCod -1)
* -1 read data = string (null terminated) -> data (size of data !)
* -2 read data = int (4 bytes) -> data
* Output:
* data text or int (mode);
* RetCod: 0 OK, data valid
* -1 cancelled by user
*
int OS_file_sig_wait ( int  mode,
void *  data 
)

RetCod: 0 OK, data valid -1 cancelled by user