Loading...
Searching...
No Matches
s_buff.h
Go to the documentation of this file.
#ifndef S_BUFFIO_H
#define S_BUFFIO_H
#include "coeffs/si_gmp.h"
struct s_buff_s
{
char * buff; // buffer
int fd; // file descrr.
int bp; // current pos. in buff (of the last read char)
int end; // last position in buff
int is_eof;
};
typedef struct s_buff_s * s_buff;
struct ip_sring;
typedef struct ip_sring * ring;
typedef struct
{
s_buff f_read;
FILE *f_write;
ring r;
pid_t pid; /* only valid for fork/tcp mode*/
int fd_read,fd_write; /* only valid for fork/tcp mode*/
char level;
char send_quit_at_exit;
char quit_sent;
#define SI_RING_CACHE 20
ring rings[SI_RING_CACHE];
} ssiInfo;
s_buff s_open(int fd);
s_buff s_open_by_name(const char *n);
int s_close(s_buff &f);
int s_getc(s_buff F);
void s_ungetc(int c, s_buff F);
int s_readint(s_buff F);
int s_readint_S(char **s);
long s_readlong(s_buff F);
long s_readlong_S(char**s);
int s_readbytes(char *buff,int len, s_buff F);
void s_readmpz(s_buff F, mpz_ptr a);
void s_readmpz_S(char**s, mpz_t a);
void s_readmpz_base(s_buff F, mpz_ptr a, int base);
void s_readmpz_base_S(char**s, mpz_ptr a, int base);
int s_isready(s_buff F);
int s_iseof(s_buff F);
#endif
f
FILE * f
Definition checklibs.c:9
s
const CanonicalForm int s
Definition facAbsFact.cc:51
ssiInfo::fd_write
int fd_write
Definition s_buff.h:26
s_open
s_buff s_open(int fd)
Definition s_buff.cc:32
ssiInfo::rings
ring rings[SI_RING_CACHE]
Definition s_buff.h:31
s_readmpz
void s_readmpz(s_buff F, mpz_ptr a)
ssiInfo::pid
pid_t pid
Definition s_buff.h:25
ssiInfo::f_read
s_buff f_read
Definition s_buff.h:22
s_readmpz_base
void s_readmpz_base(s_buff F, mpz_ptr a, int base)
Definition s_buff.cc:264
s_getc
int s_getc(s_buff F)
Definition s_buff.cc:59
s_readmpz_base_S
void s_readmpz_base_S(char **s, mpz_ptr a, int base)
Definition s_buff.cc:310
SI_RING_CACHE
#define SI_RING_CACHE
Definition s_buff.h:30
s_isready
int s_isready(s_buff F)
Definition s_buff.cc:86
s_readint
int s_readint(s_buff F)
Definition s_buff.cc:113
s_buff_s::end
int end
Definition s_buff.h:11
ssiInfo::send_quit_at_exit
char send_quit_at_exit
Definition s_buff.h:28
ssiInfo::level
char level
Definition s_buff.h:27
s_buff_s::buff
char * buff
Definition s_buff.h:8
ssiInfo::quit_sent
char quit_sent
Definition s_buff.h:29
s_readlong
long s_readlong(s_buff F)
Definition s_buff.cc:160
ssiInfo::f_write
FILE * f_write
Definition s_buff.h:23
ssiInfo::r
ring r
Definition s_buff.h:24
s_buff_s::is_eof
int is_eof
Definition s_buff.h:12
s_buff_s::fd
int fd
Definition s_buff.h:9
s_close
int s_close(s_buff &f)
Definition s_buff.cc:46
s_open_by_name
s_buff s_open_by_name(const char *n)
Definition s_buff.cc:40
s_readint_S
int s_readint_S(char **s)
Definition s_buff.cc:141
s_readmpz_S
void s_readmpz_S(char **s, mpz_t a)
Definition s_buff.cc:244
s_readbytes
int s_readbytes(char *buff, int len, s_buff F)
Definition s_buff.cc:203
s_readlong_S
long s_readlong_S(char **s)
Definition s_buff.cc:184
s_buff_s::bp
int bp
Definition s_buff.h:10
s_iseof
int s_iseof(s_buff F)
Definition s_buff.cc:352
ssiInfo::fd_read
int fd_read
Definition s_buff.h:26
s_ungetc
void s_ungetc(int c, s_buff F)
Definition s_buff.cc:100
s_buff_s
Definition s_buff.h:7
ssiInfo
Definition s_buff.h:21
si_gmp.h
fd
int status int fd
Definition si_signals.h:69
ip_sring
Definition ring.h:254