30#define S_BUFF_LEN (4096-SIZEOF_LONG)
34 s_buff F=(s_buff)
omAlloc0(
sizeof(*F));
63 printf(
"link closed");
84 return F->buff[F->bp];
90 printf(
"link closed");
93 if (F->bp>=F->end)
return 0;
95 while((
p<F->end)&&(F->buff[
p]<=
' '))
p++;
96 if (
p>=F->end)
return 0;
104 printf(
"link closed");
117 printf(
"link closed");
127 }
while((!F->is_eof) && (c<=
' '));
128 if (c==
'-') { neg=-1; c=
s_getc(F); }
150 if (*c==
'-') { neg=-1; c++; }
164 printf(
"link closed");
173 }
while((!F->is_eof) && (c<=
' '));
174 if (c==
'-') { neg=-1; c=
s_getc(F); }
193 if (*c==
'-') { neg=-1; c++; }
207 printf(
"link closed");
211 while((!F->is_eof)&&(
i<len))
223 printf(
"link closed");
232 }
while((!F->is_eof) && (c<=
' '));
233 if (c==
'-') { neg=-1; c=
s_getc(F); }
237 mpz_add_ui(a,a,(c-
'0'));
241 if (neg==-1) mpz_neg(a,a);
253 if (c==
'-') { neg=-1; c=**
s;(*s)++; }
257 mpz_add_ui(a,a,(c-
'0'));
261 if (neg==-1) mpz_neg(a,a);
268 printf(
"link closed");
277 }
while((!F->is_eof) && (c<=
' '));
278 if (c==
'-') { neg=-1; c=
s_getc(F); }
285 || ((c>=
'a') && (c<=
'z'))
286 || ((c>=
'A') && (c<=
'Z')))
301 memset(str+old_str_l,0,old_str_l);
305 if(mpz_set_str(a,str,base)!=0)
WerrorS(
"wrong mpz number");
307 if (neg==-1) mpz_neg(a,a);
319 if (*c==
'-') { neg=-1; c++; }
326 || ((*c>=
'a') && (*c<=
'z'))
327 || ((*c>=
'A') && (*c<=
'Z')))
342 memset(str+old_str_l,0,old_str_l);
346 if(mpz_set_str(a,str,base)!=0)
WerrorS(
"wrong mpz number");
348 if (neg==-1) mpz_neg(a,a);
354 if (F!=
NULL)
return F->is_eof;
const CanonicalForm int s
void WerrorS(const char *s)
#define omFreeSize(addr, size)
#define omRealloc(addr, size)
void s_readmpz(s_buff F, 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)
long s_readlong(s_buff F)
s_buff s_open_by_name(const char *n)
int s_readint_S(char **s)
void s_readmpz_S(char **s, mpz_t a)
int s_readbytes(char *buff, int len, s_buff F)
long s_readlong_S(char **s)
void s_ungetc(int c, s_buff F)