My Project
Loading...
Searching...
No Matches
s_buff.h
Go to the documentation of this file.
1#ifndef S_BUFFIO_H
2#define S_BUFFIO_H
3
4#include "coeffs/si_gmp.h"
5
6struct s_buff_s
7{
8 char * buff; // buffer
9 int fd; // file descrr.
10 int bp; // current pos. in buff (of the last read char)
11 int end; // last position in buff
12 int is_eof;
13};
14
15typedef struct s_buff_s * s_buff;
16
17struct ip_sring;
18typedef struct ip_sring * ring;
19
20typedef struct
21{
22 s_buff f_read;
23 FILE *f_write;
24 ring r;
25 pid_t pid; /* only valid for fork/tcp mode*/
26 int fd_read,fd_write; /* only valid for fork/tcp mode*/
27 char level;
30
31} ssiInfo;
32
33s_buff s_open(int fd);
34s_buff s_open_by_name(const char *n);
35int s_close(s_buff &f);
36
37int s_getc(s_buff F);
38void s_ungetc(int c, s_buff F);
39
40int s_readint(s_buff F);
41long s_readlong(s_buff F);
42int s_readbytes(char *buff,int len, s_buff F);
43void s_readmpz(s_buff F, mpz_ptr a);
44void s_readmpz_base(s_buff F, mpz_ptr a, int base);
45int s_isready(s_buff F);
46int s_iseof(s_buff F);
47#endif
FILE * f
Definition: checklibs.c:9
s_buff s_open(int fd)
Definition: s_buff.cc:31
void s_readmpz(s_buff F, mpz_ptr a)
pid_t pid
Definition: s_buff.h:25
s_buff f_read
Definition: s_buff.h:22
void s_readmpz_base(s_buff F, mpz_ptr a, int base)
Definition: s_buff.cc:209
int s_getc(s_buff F)
Definition: s_buff.cc:58
int s_isready(s_buff F)
Definition: s_buff.cc:85
int s_readint(s_buff F)
Definition: s_buff.cc:112
int end
Definition: s_buff.h:11
char send_quit_at_exit
Definition: s_buff.h:28
char level
Definition: s_buff.h:27
char * buff
Definition: s_buff.h:8
char quit_sent
Definition: s_buff.h:29
long s_readlong(s_buff F)
Definition: s_buff.cc:140
FILE * f_write
Definition: s_buff.h:23
ring r
Definition: s_buff.h:24
int is_eof
Definition: s_buff.h:12
int fd
Definition: s_buff.h:9
int s_close(s_buff &f)
Definition: s_buff.cc:45
s_buff s_open_by_name(const char *n)
Definition: s_buff.cc:39
int s_readbytes(char *buff, int len, s_buff F)
Definition: s_buff.cc:168
int bp
Definition: s_buff.h:10
int s_iseof(s_buff F)
Definition: s_buff.cc:254
int fd_read
Definition: s_buff.h:26
void s_ungetc(int c, s_buff F)
Definition: s_buff.cc:99
Definition: s_buff.h:7
Definition: s_buff.h:21
int status int fd
Definition: si_signals.h:59
Definition: ring.h:248