gCAD3D 2.40
ut_log.c File Reference

write log-messages into file, display file More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_geo.h"
#include "../xa/xa_msg.h"

Functions

char * OS_get_tmp_dir ()
 
char * OS_date1 ()
 
int LOG_A_set_fnam (char *fnam)
 
int LOG_A_write (char *s1)
 
int LOG_A__ (int msgTyp, char *txt,...)
 
int LOG_A_pt2 (Point2 *pte)
 
int LOG_A_pt3 (Point *pte)
 
int LOG_A_disp ()
 
int LOG_A_init (char *appNam)
 
int LOG_A_exit (int errNr)
 

Variables

static FILE * LOG_A_fp =NULL
 
static char LOG_A_fnam [128]
 
static char * LOG_A_txt [] ={"INF ","WNG ","ERR "}
 

Detailed Description

write log-messages into file, display file

=====================================================
List_functions_start:
LOG_A__ write
LOG_A_pt2 report errPos
LOG_A_pt3 report errPos
LOG_A_write write, internal
LOG_A_set_fnam (re)define logfilename
LOG_A_init set logfilename
LOG_A_exit close logfile
List_functions_end:
=================================================================

Function Documentation

char* OS_get_tmp_dir ( )

returns tempDir (with closing '/') <gcad_dir_local>tmp/

char* OS_date1 ( )
* Format: 2002/09/04-13:30:33
* printf ("# %s\n", OS_date1());
*
int LOG_A_set_fnam ( char *  fnam)

LOG_A_set_fnam (re)define logfilename

int LOG_A_write ( char *  s1)
int LOG_A__ ( int  msgTyp,
char *  txt,
  ... 
)
* LOG write message into logfile
* Input:
* msgTyp MSG_typ_INF = 0
*
* see also gis_msg__
*
int LOG_A_pt2 ( Point2 pte)
int LOG_A_pt3 ( Point pte)
int LOG_A_disp ( )
* disp logfile
* close, display, open-append
*
int LOG_A_init ( char *  appNam)

set automatic logfilename

int LOG_A_exit ( int  errNr)

if (errNr >= 0) then nr of errors is reported with TX_Print

Variable Documentation

FILE* LOG_A_fp =NULL
static
char LOG_A_fnam[128]
static
char* LOG_A_txt[] ={"INF ","WNG ","ERR "}
static