C-KIT-GUI-GTK 0.62
ut_txt.h
Go to the documentation of this file.
1 /* ut_txt.h
2 
3 
4 2002-02-25 term_buf u term_anz von ut_txfil.h hierher. RF.
5 
6 */
7 
8 
9 
10 #define TXT_Typ_EOF 0
11 #define TXT_Typ_spec 1
12 #define TXT_Typ_text 2 /* nicht in " eingeschlossenen Texte */
13 #define TXT_Typ_num 3
14 #define TXT_Typ_string 4 /* in " eingeschlossenen Texte */
15 
16 
17 
18 
19 
20 
22 #define term_anz 1
23 #define term_buf "\n"
24 
25 // #define term_anz 2
26 // #define term_buf "\r\n"
27 
28 
30 #ifdef _MSC_VER
31 #define fnam_del '\\'
32 #define fnam_del_s "\\"
33 #else
34 #define fnam_del '/'
35 #define fnam_del_s "/"
36 #endif
37 
38 
39 
40 
41 // ------------- inline functions ------------------------------------
42 #define UTX_Clear(str) str[0] = '\0'
43 
45 
47 #define UTX_Siz(sSiz,sStart0,sStart1) sStart0 + sSiz - sStart1
48 
55 
57 #define UTX_skip_1bl(tp) {++(*(tp)); while(**(tp) == ' ') ++(*(tp));}
58 
59 
61 #define UTX_pos_skipLeadBlk(p1) while(*p1 == ' ') ++p1
62 
63 
65 #define UTX_pos_EOS(p1) strchr(p1, '\0')
66 
67 // -------------------------------------------------------------------
68 extern const char TX_NUL;
69 
70 
71 
72 
73 
74 /*****************************************************************************/
75 /* PROTOTYPES */
76 /*****************************************************************************/
77 
78  void UTX_cp_word_2_upper (char* txtout, char* txtin);
79  char* UTX_cp_word_term (char* txtOut, char* txtIn, char term);
80  char UTX_cp_word_t (char *txtOut, char **cBuf);
81  char* UTX_cp_word__ (char *txtOut, char *txtIn);
82  int UTX_cp_right (char *sOut, char *sIn, int cNr);
83  char* UTX_cp_expr (char *cbo, char *cbi);
84 
85  int UTX_ftyp_s (char *ftyp, char *cbuf, int mode);
86  int UTX_fnam_s (char *fnam, char *cbuf);
87  int UTX_fdir_s (char *fdir, char *cbuf);
88 
89  char UTX_pos_del (char**, char**);
90  long UTX_pos_del_next (char *cBuf, long cPos);
91  long UTX_pos_del_prev (char *cBuf, long cPos);
92  char* UTX_pos_eos (char*);
93  char* UTX_pos_1n (char*);
94 //void UTX_pos_skipLeadBlk (char *buf);
95  char* UTX_pos_skipBrack (char *cbuf);
96  char* UTX_pos_skipBrack1 (char *cbuf);
97  int UTX_pos_skipTermWord (char **wNxt, char *cbuf);
98  char* UTX_pos_skipWord (char *cbuf);
99  char* UTX_pos_skipWords (int wNr, char *p1);
100  char* UTX_pos_skipStr (char *cbuf);
101  char* UTX_pos_skipDeli1 (char *p1);
102  int UTX_pos_skip_int (char **ps);
103 
104  int UTX_ckc_Del1 (char c1);
105  int UTX_ckc_Del2 (char c1);
106  int UTX_ck_num_i (char *s1);
107  int UTX_ck_num_f (char **pOut, char *cbuf);
108  int UTX_ck_num_digNr (char **cpo, char *cpi);
109  int UTX_cmp_word_wordtab (char *wdtab[], char *wd1);
110 
111  char* UTX_2db_tx (double *d1, double *d2, char *cbuf);
112  double UTX_db_tx (char **po, char *pi);
113 
114  int UTX_add_i_u (char[], int);
115  int UTX_add_db (char outBuf[], double *db1);
116  int UTX_add_pt (char outBuf[], void *pt1);
117  int UTX_add_fl_u (char[], double);
118  int UTX_add_fl_u2 (char[], double, double);
119  int UTX_add_fl_u3 (char[], double, double, double, char chDel);
120  int UTX_add_fl_ua (char[], double *da, int dNr, char chDel);
121  int UTX_add_fl_f (char[], double, int);
122  char* UTX_add_fl_1uf (char *outBuf, double d1);
123  int UTX_add_fl_10 (char[], double);
124  int UTX_add_fl_15 (char[], double);
125 
126  int UTX_del_chr (char *cbuf, char cx);
127  int UTX_del_foll0 (char strBuf[]);
128  void UTX_del_follBl (char *cbuf);
129  int UTX_del_FilTx (char *dtxt, char *filNam);
130 
131  char* UTX_fgets (char* line, int len, FILE* fp);
132  int UTX_fgetLine (char *cbuf, int sizBuf, char *filNam, int lNr);
133  int UTX_fsavLine (char *cbuf, char *filNam, int lnMaxSiz, int lNr);
134  int UTX_fRevL (char *fno, char *fni);
135 
136  void UTX_ins_s2 (char*, char*, int);
137 
138  char* UTX_CleanCR (char* string);
139  void UTX_CleanSC (char*);
140  void UTX_CleanAN (char*);
141  int UTX_CleanCommC (char *cBuf);
142  int UTX_Clean_db (char*);
143  int UTX_chg_chr1 (char newChr, char oldChr, char *cBuf);
144  int UTX_chg_str1 (long *datSiz,
145  void *datStart, void *insDat, void *delPos, long delSiz);
146  int UTX_chg_str2 (int sSiz, char *sDat, char *sOld, char *sNew);
147  int UTX_chg_nr (char *txtOut, int iNr);
148  int UTX_chg_wordn (char *sOut, char *wNew, int wNr, long lenMax);
149  char* UTX_CleanBracks (char* txtbuf, char ch1, char chr2);
150  int UTX_endDelChar (char* txtbuf, char chr);
151 
152  int UTX_get_word (char** txtIn,char** w_next,char* txtOut,double* val,
153  char* deli);
154  char* UTX_find_word1 (char *was, char *wo);
155  char* UTX_find_Del1 (char *p1);
156  char* UTX_find_strrstr (char *cbuf, char *str);
157  int UTX_strcmp_right (char *string, char *text);
158 
159  int UTX_ck_casenChr(char *s1, char *s2, int cNr);
160 
161  char *UTX_memFind (char *buf, char *str);
162  char *UTX_memFind1 (char *buf, long bufSiz, char *str, long strSiz);
163  char *UTX_memstr (char* von, char* bis, char* sstr);
164  int UTX_insert1 (char *cbuf, long *bufSiz, char *auxBuf, long cPos);
165  int UTX_cut1 (char *cbuf, long *bufSiz, long cPos, long txLen);
166 
167  int UTX_wTab_ck (char *wTab[], char *w1);
168  char** UTX_wTab_file (char *memspc, int memSiz, char *fnam);
169 
170  int UTX_wordnr (char *cbuf);
171  int UTX_setup_set (char *fn, char *par, char *val);
172  int UTX_setup_get (char *cval, char *ctyp, char *fnam, int mode);
173  int UTX_setup_modw (char *fn, char *par, char *wNew, int wNr);
174  int UTX_setup_decs (char *s1, char **pv);
175 
176  int UTX_cat_file (FILE *fpo, char *fnam);
177  int UTX_dir_listf (char *outFilNam, char *fPath, char *fNam, char *fTyp);
178  int UTX_cnr_chr (char *txt, char c1);
179 
180  int UTX_str_file (char* txbuf, long *fSiz, char *fnam);
181 
182 /* ------------ eof ---------------- */
int UTX_ck_num_i(char *s1)
Definition: ckit_ut.c:139
char * UTX_memFind1(char *buf, long bufSiz, char *str, long strSiz)
char * UTX_find_word1(char *was, char *wo)
char ** UTX_wTab_file(char *memspc, int memSiz, char *fnam)
int UTX_wTab_ck(char *wTab[], char *w1)
char * UTX_CleanBracks(char *txtbuf, char ch1, char chr2)
int UTX_chg_wordn(char *sOut, char *wNew, int wNr, long lenMax)
int UTX_fRevL(char *fno, char *fni)
int UTX_endDelChar(char *txtbuf, char chr)
Definition: ckit_ut.c:450
int UTX_chg_str2(int sSiz, char *sDat, char *sOld, char *sNew)
int UTX_ck_num_digNr(char **cpo, char *cpi)
void UTX_del_follBl(char *cbuf)
int UTX_pos_skip_int(char **ps)
int UTX_add_fl_u(char[], double)
int UTX_get_word(char **txtIn, char **w_next, char *txtOut, double *val, char *deli)
char * UTX_memFind(char *buf, char *str)
int UTX_del_FilTx(char *dtxt, char *filNam)
int UTX_cut1(char *cbuf, long *bufSiz, long cPos, long txLen)
char UTX_pos_del(char **, char **)
void UTX_cp_word_2_upper(char *txtout, char *txtin)
int UTX_CleanCommC(char *cBuf)
int UTX_setup_set(char *fn, char *par, char *val)
int UTX_chg_chr1(char newChr, char oldChr, char *cBuf)
int UTX_chg_nr(char *txtOut, int iNr)
char * UTX_pos_skipBrack1(char *cbuf)
int UTX_pos_skipTermWord(char **wNxt, char *cbuf)
int UTX_str_file(char *txbuf, long *fSiz, char *fnam)
Definition: ckit_ut.c:108
int UTX_fsavLine(char *cbuf, char *filNam, int lnMaxSiz, int lNr)
char * UTX_2db_tx(double *d1, double *d2, char *cbuf)
void UTX_CleanAN(char *)
int UTX_cat_file(FILE *fpo, char *fnam)
char * UTX_cp_word_term(char *txtOut, char *txtIn, char term)
void UTX_ins_s2(char *, char *, int)
char * UTX_pos_1n(char *)
int UTX_add_fl_ua(char[], double *da, int dNr, char chDel)
int UTX_fgetLine(char *cbuf, int sizBuf, char *filNam, int lNr)
Definition: ckit_ut.c:601
int UTX_del_foll0(char strBuf[])
static char txbuf[256]
Definition: ut_os_w32.c:108
const char TX_NUL
int UTX_wordnr(char *cbuf)
void UTX_CleanSC(char *)
char * UTX_cp_word__(char *txtOut, char *txtIn)
char * UTX_pos_skipDeli1(char *p1)
char * UTX_cp_expr(char *cbo, char *cbi)
int UTX_ckc_Del1(char c1)
int UTX_add_fl_10(char[], double)
char * UTX_find_strrstr(char *cbuf, char *str)
char * UTX_CleanCR(char *string)
Definition: ckit_ut.c:407
char * UTX_fgets(char *line, int len, FILE *fp)
char * UTX_add_fl_1uf(char *outBuf, double d1)
int UTX_setup_modw(char *fn, char *par, char *wNew, int wNr)
char * UTX_pos_skipWords(int wNr, char *p1)
int UTX_ftyp_s(char *ftyp, char *cbuf, int mode)
int UTX_add_fl_15(char[], double)
char * UTX_pos_eos(char *)
char UTX_cp_word_t(char *txtOut, char **cBuf)
int UTX_setup_get(char *cval, char *ctyp, char *fnam, int mode)
char * UTX_find_Del1(char *p1)
int UTX_add_i_u(char[], int)
int UTX_fnam_s(char *fnam, char *cbuf)
char * UTX_pos_skipStr(char *cbuf)
int UTX_cmp_word_wordtab(char *wdtab[], char *wd1)
long UTX_pos_del_prev(char *cBuf, long cPos)
int UTX_add_pt(char outBuf[], void *pt1)
int UTX_Clean_db(char *)
int UTX_chg_str1(long *datSiz, void *datStart, void *insDat, void *delPos, long delSiz)
int UTX_ckc_Del2(char c1)
int UTX_setup_decs(char *s1, char **pv)
int UTX_cnr_chr(char *txt, char c1)
Definition: ckit_ut.c:384
int UTX_insert1(char *cbuf, long *bufSiz, char *auxBuf, long cPos)
double UTX_db_tx(char **po, char *pi)
int UTX_dir_listf(char *outFilNam, char *fPath, char *fNam, char *fTyp)
int UTX_ck_casenChr(char *s1, char *s2, int cNr)
int UTX_ck_num_f(char **pOut, char *cbuf)
long UTX_pos_del_next(char *cBuf, long cPos)
int UTX_del_chr(char *cbuf, char cx)
int UTX_add_db(char outBuf[], double *db1)
int UTX_cp_right(char *sOut, char *sIn, int cNr)
int UTX_add_fl_f(char[], double, int)
int UTX_strcmp_right(char *string, char *text)
int UTX_add_fl_u3(char[], double, double, double, char chDel)
char * UTX_pos_skipBrack(char *cbuf)
char * UTX_memstr(char *von, char *bis, char *sstr)
int UTX_fdir_s(char *fdir, char *cbuf)
char * UTX_pos_skipWord(char *cbuf)
int UTX_add_fl_u2(char[], double, double)