utility-functions
More...
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/stat.h>
#include "../ut/ckit_ut.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_umem.h"
|
#define | ON 0 |
|
#define | OFF 1 |
|
|
void | UTX_str_file (char *txbuf, long *fSiz, char *fnam) |
|
int | UTX_ck_num_i (char *s1) |
|
int | CSV_read__ (CSV_struct *fTyp, char *sb, int sSiz, FILE *fpi) |
|
int | UTX_wrf_str (char *fnam, char *txt) |
|
int | MSG_Tip (char *key) |
|
int | UTI_round_i2b (int i1) |
|
int | UTI_round_b2i (int i1) |
|
int | UTX_cnr_chr (char *txt, char c1) |
|
char * | UTX_CleanCR (char *string) |
|
int | UTX_endDelChar (char *txtbuf, char chr) |
|
int | MSG_get_1 (char *msg, int msgSiz, char *key, char *fmt,...) |
|
int | MSG_err_1 (char *key, char *fmt,...) |
|
int | MSG_pri_1 (char *key, char *fmt,...) |
|
char * | MSG_get_str (char *key) |
|
int | gCad_fini () |
|
void | TX_Print (char *txt,...) |
| ========================================================== More...
|
|
void | TX_Error (char *txt,...) |
| ========================================================== More...
|
|
void | TX_Write (char *txt) |
| ========================================================== More...
|
|
int | UTX_fgetLine (char *cbuf, int sizBuf, char *filNam, int lNr) |
|
int | UTX_tmp_file (char *fBuf, long *fSiz, char *fNam) |
|
utility-functions
utility-functions for Gui-Toolbox only
=====================================================
List_functions_start:
List_functions_end:
=====================================================
cc -c gui_gtk_ut.c
void UTX_str_file |
( |
char * |
txbuf, |
|
|
long * |
fSiz, |
|
|
char * |
fnam |
|
) |
| |
UTX_str_file read file -> string Used by UTX_tmp_file() fSiz must have filesize; see OS_FilSiz.
int UTX_ck_num_i |
( |
char * |
s1 | ) |
|
RetCod: -1 s1 does NOT start with an integer
else nr of characters (including sign)
int CSV_read__ |
( |
CSV_struct * |
fTyp, |
|
|
char * |
sb, |
|
|
int |
sSiz, |
|
|
FILE * |
fpi |
|
) |
| |
int UTX_wrf_str |
( |
char * |
fnam, |
|
|
char * |
txt |
|
) |
| |
int MSG_Tip |
( |
char * |
key | ) |
|
MSG_Tip add tooltip to last created GUI-widget
msg out of files msg_de.txt msg_en.txt ..
int UTI_round_i2b |
( |
int |
i1 | ) |
|
Purpose: save Integers in a single byte.
int UTI_round_b2i |
( |
int |
i1 | ) |
|
UTI_round_b2i make integer from byte (back from UTI_round_i2b)
int UTX_cnr_chr |
( |
char * |
txt, |
|
|
char |
c1 |
|
) |
| |
returns nr of char c1 in string txt
char* UTX_CleanCR |
( |
char * |
string | ) |
|
UTX_CleanCR Delete Blanks, CR
's and LF's at end of
string
returns positon of stringterminator \0
int UTX_endDelChar |
( |
char * |
txtbuf, |
|
|
char |
chr |
|
) |
| |
UTX_endDelChar if last char of string == chr: remove it.
int MSG_get_1 |
( |
char * |
msg, |
|
|
int |
msgSiz, |
|
|
char * |
key, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
int MSG_err_1 |
( |
char * |
key, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
int MSG_pri_1 |
( |
char * |
key, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
char* MSG_get_str |
( |
char * |
key | ) |
|
void TX_Print |
( |
char * |
txt, |
|
|
|
... |
|
) |
| |
==========================================================
========================================================== formatiertes Rausschreiben; wie bei printf; mehr als 4 Parm's Problem?
void TX_Error |
( |
char * |
txt, |
|
|
|
... |
|
) |
| |
==========================================================
==========================================================
void TX_Write |
( |
char * |
txt | ) |
|
==========================================================
========================================================== direkt rausschreiben.
int UTX_fgetLine |
( |
char * |
cbuf, |
|
|
int |
sizBuf, |
|
|
char * |
filNam, |
|
|
int |
lNr |
|
) |
| |
first line has lineNr 1
sizBuf size of cbuf
rc -1 File does not exist
rc -2 Line does not exist
rc 0 OK
int UTX_tmp_file |
( |
char * |
fBuf, |
|
|
long * |
fSiz, |
|
|
char * |
fNam |
|
) |
| |