/* $Id: util.h,v 5.122 2013/11/24 08:23:08 sasa Exp $ */
/*19.01.2022	04.03.1999	Белых А.И.	util.h
Описание подпрограмм утилит
*/
#include <scr.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <libintl.h>
#include <unistd.h>
//#include "spisok.h"
#include "iceb_tu_str.h"
#include "iceb_tu_int.h"
#include "iceb_tu_file.h"
#include "iceb_tu_double.h"
#include "iceb_tu_spisok.h"

int 	iceb_tu_vstavfil(const char*,FILE*);
void	kodkontr(class iceb_tu_str*,class iceb_tu_str*,const char*,const char*);
double	iceb_tu_atof(const char*);
int	dirmak1(char*,char*,int,int);
int	dirmak(char *name,char *proekt);
void	iceb_tu_dpm(short*,short*,short*,short);
void	iceb_tu_mesc(short,short,char*);
void	iceb_tu_mesc(short,short,class iceb_tu_str*);
double	iceb_tu_okrug(double,double);
short	iceb_tu_period(short,short,short,short,short,short,short);
int	iceb_tu_POLE(const char*,char*,int,char);
int	iceb_tu_polen(char const*,char*,int,int,char);
int	iceb_tu_polen(char const*,class iceb_tu_spisok*,int,char);
int	iceb_tu_polen(char const*,class masiv_din_int*,int,char);
int	iceb_tu_polen(char const*,int*,int,char);
int	iceb_tu_polen(char const*,short*,int,char);
int	iceb_tu_polen(char const*,long*,int,char);
int	iceb_tu_polen(char const*,double*,int,char);
int	iceb_tu_polen(char const*,float*,int,char);
int	iceb_tu_polen(char const*,class iceb_tu_str*,int,char);
short	iceb_tu_pole1(const char*,const char*,char,short,int*);
int	iceb_tu_pole2(const char*,char);
int	iceb_tu_pole3(const char*,char*,int,char);
int	iceb_tu_pole3(const char*,class iceb_tu_str*,int,char);
short	iceb_tu_pole4(char*,const char*,char);
void	iceb_tu_preobr(double,char*,short);
void	iceb_tu_preobr(double,class iceb_tu_str*,short);
void	iceb_tu_prnb(double,char*);
void	iceb_tu_prnb(double,class iceb_tu_str*);
void	iceb_tu_prnb1(double,char*);
char	*iceb_tu_prnbr(double);
int	iceb_tu_rsdat(short*,short*,short*,const char*,int);
short	iceb_tu_rsdat1(short*,short*,const char*);
int	iceb_tu_SRAV(const char*,const char*,int);
int	iceb_tu_SRAV1(short,short,short,short,short,short);
int	iceb_tu_strstrm(const char*,const char*);
int	iceb_tu_fgets_bps(char*,int,FILE*);
char	*iceb_tu_prcn(double);
int	runsystem1(const char*,int);
int	readkey(int,char**,char**,char**,char**,int*,FILE*);
void	iceb_tu_denrog(short*,short*,short*,int);
void	iceb_tu_sozmas(short**,char*);
void	iceb_tu_sozmas(short**,char*,FILE*);
int	iceb_tu_sravmydat(short,short,short,short,short,short);
int	iceb_tu_sravmydat(const char *data1,const char *data2);
int	iceb_tu_sravmydat(const char *data1,const char *data2,int metka);
int 	iceb_tu_proverka(const char*,const char*,int,int);
int 	iceb_tu_proverka(const char*,int,int,int);
void	iceb_tu_zagolov(const char*,const char *datan,const char *datak,const char*,FILE*);
void	iceb_tu_zagolov(const char*,struct tm*,short,short,short,short,short,short,const char*,FILE*);
void	iceb_tu_zagolov(const char*,short,short,short,short,short,short,const char*,FILE*);
void	iceb_tu_startfil(FILE*);
char	*workid();
int      iceb_tu_rstime(short*,short*,short*,const char*);
void iceb_tu_poltekdat(short *dt,short *mt,short *gt);
const char *iceb_tu_poltekdat();
int iceb_tu_kol_str(int max_kol_std_na_liste,int ras_kol_str);
int iceb_tu_kol_str_l(int max_kol_std_na_liste,int ras_kol_str);
void iceb_tu_ud_lp(char *stroka);
void iceb_tu_ud_simv(char *stroka,const char*);
void iceb_tu_ekrs(char *stroka,int razmer,char ekran,const char *simv);
void iceb_tu_z_plus(char *stroka_in,int dlinna,char *stroka_plus);
void iceb_tu_tolower_str(char*);
void iceb_tu_toupper_str(char*);
int  iceb_tu_srav_r(const char*,const char*,int);
void iceb_tu_fplus(const char *stroka,class iceb_tu_str *stroka1,FILE *ff);
void iceb_tu_fplus(int metka_sp,const char *stroka,class iceb_tu_spisok *stroka1,FILE *ff);
const char *iceb_tu_datzap(const char *data);
const char *iceb_tu_datzap_mg(const char *data);
void iceb_tu_fio(const char *fio,class iceb_tu_str *fio_in);

int iceb_tu_zvstr(class iceb_tu_str *stroka,const char *obr,const char *zamena);
void iceb_tu_zvstrp(char *stroka,int poz_zam,const char *vstr,int dlinna_str);

void iceb_tu_cpbstr(char *strin,int dlstrin,const char *strout,const char *udstr);
void iceb_tu_cpbstr(class iceb_tu_str *strin,const char *strout,const char *udstr);
void iceb_tu_cpbstr(class iceb_tu_spisok *strin,const char *strout,const char *udstr);
int iceb_tu_ustpeh(int dlinna_stroki,int orient,FILE *ff);
int iceb_tu_cp(const char *imaf_out,const char *imaf_in);
int iceb_tu_cat(const char *imaf1,const char *imaf2);
const char *iceb_tu_adrsimv(int nomer_simv,const char *str);

int iceb_tu_kolbait(int kolih_simv,const char *str);
int iceb_tu_kolsimv(int kolbait_str,const char *stroka);

int iceb_tu_strlen(const char *stroka);
int iceb_tu_poldan(const char *obr,char *str,const char *imaf);
int iceb_tu_poldan(const char *obr,class iceb_tu_str *str,const char *imaf);
void iceb_tu_ud_1_simv(char *stroka,int nomer_us);
void iceb_tu_vsimv(char *stroka,int dlinastr,int poz,const char *kodsimv);
void iceb_tu_zsimv(char *stroka,int dlinastr,int poz,const char *simvol);
const char *iceb_tu_vremzap(char *vrem);
const char *iceb_tu_vremzap(time_t vrem);
const char *iceb_tu_kszap(char *kto);
const char *iceb_tu_kszap(int kto);
const char *iceb_tu_getlogin();
const char *iceb_tu_sqlfiltr(const char *stroka);
const char *iceb_tu_filtr_xml(const char *stroka);
const char *iceb_tu_filtr_from_xml(const char *stroka);
const char *iceb_tu_nofwords(double number);
const char *iceb_tu_propis(double hs,int metka_1s);

void iceb_tu_vstav(class iceb_tu_str *stroka,int znah,int poz1,int poz2,int hag);
void iceb_tu_vstav(class iceb_tu_str *stroka,const char *strin,int poz1,int poz2,int hag);
void iceb_tu_vstav(char *stroka,const char *strin,int poz1,int poz2,int hag,int kolbait_stroka);
void iceb_tu_vstav(char *stroka,int strin,int poz1,int poz2,int hag,int kolbait_stroka);

const char *iceb_tu_tosqldat(const char *data);
void iceb_tu_strspisok(const char *stroka,int razdelitel,class iceb_tu_spisok *spisok);
const char *iceb_tu_getcurrentdir();
int iceb_tu_fgets(class iceb_tu_str *str,FILE *ff);
const char *iceb_tu_double_to_char_zp(double suma,int drob);
const char *iceb_tu_tipz(const char *pm);
const char *iceb_tu_getfiosin(const char *fio,int metka);

