/netbsd-src/external/lgpl3/mpc/dist/tests/ |
H A D | tpl_native.c | 27 tpl_read_int (mpc_datafile_context_t* datafile_context, int *nread, const char *name) in tpl_read_int() argument 31 if (datafile_context->nextchar == EOF) in tpl_read_int() 35 datafile_context->pathname, datafile_context->line_number); in tpl_read_int() 38 ungetc (datafile_context->nextchar, datafile_context->fd); in tpl_read_int() 39 n = fscanf (datafile_context->fd, "%i", nread); in tpl_read_int() 40 if (ferror (datafile_context->fd) || n == 0 || n == EOF) in tpl_read_int() 43 name, datafile_context->pathname, datafile_context->line_number); in tpl_read_int() 46 datafile_context->nextchar = getc (datafile_context->fd); in tpl_read_int() 47 tpl_skip_whitespace_comments (datafile_context); in tpl_read_int() 59 tpl_read_ui (mpc_datafile_context_t* datafile_context, unsigned long int *ui) in tpl_read_ui() argument [all …]
|
H A D | tpl_mpfr.c | 24 tpl_read_mpfr_prec (mpc_datafile_context_t* datafile_context) in tpl_read_mpfr_prec() argument 29 if (datafile_context->nextchar == EOF) { in tpl_read_mpfr_prec() 32 datafile_context->pathname, datafile_context->line_number); in tpl_read_mpfr_prec() 35 ungetc (datafile_context->nextchar, datafile_context->fd); in tpl_read_mpfr_prec() 36 n = fscanf (datafile_context->fd, "%lu", &prec); in tpl_read_mpfr_prec() 37 if (ferror (datafile_context->fd)) /* then also n == EOF */ in tpl_read_mpfr_prec() 41 datafile_context->pathname, datafile_context->line_number); in tpl_read_mpfr_prec() 44 datafile_context->nextchar = getc (datafile_context->fd); in tpl_read_mpfr_prec() 45 tpl_skip_whitespace_comments (datafile_context); in tpl_read_mpfr_prec() 50 tpl_read_mpfr_mantissa (mpc_datafile_context_t* datafile_context, mpfr_ptr x) in tpl_read_mpfr_mantissa() argument [all …]
|
H A D | read_line.c | 24 read_param (mpc_datafile_context_t* datafile_context, in read_param() argument 30 tpl_read_int (datafile_context, &(p->i),""); in read_param() 33 tpl_read_ui (datafile_context, &(p->ui)); in read_param() 36 tpl_read_si (datafile_context, &(p->si)); in read_param() 71 tpl_read_mpz (datafile_context, p->mpz); in read_param() 82 tpl_read_mpfr_inex (datafile_context, &p->mpfr_inex); in read_param() 85 tpl_read_mpfr (datafile_context, in read_param() 89 tpl_read_mpfr_rnd (datafile_context, &p->mpfr_rnd); in read_param() 93 tpl_read_mpc_inex (datafile_context, &p->mpc_inex_data); in read_param() 96 tpl_read_mpc (datafile_context, &p->mpc_data); in read_param() [all …]
|
H A D | read_description.c | 24 static size_t read_keyworddesc (mpc_datafile_context_t* datafile_context, 66 read_keyworddesc (mpc_datafile_context_t* datafile_context, in read_keyworddesc() argument 76 while (datafile_context->nextchar != EOF in read_keyworddesc() 77 && datafile_context->nextchar != '#' in read_keyworddesc() 78 && datafile_context->nextchar != '\n') in read_keyworddesc() 92 buffer[pos++] = (char) datafile_context->nextchar; in read_keyworddesc() 93 datafile_context->nextchar = getc (datafile_context->fd); in read_keyworddesc() 163 mpc_datafile_context_t datafile_context; in read_description() local 173 open_datafile (&datafile_context, filename); in read_description() 176 tpl_skip_whitespace_comments(&datafile_context); in read_description() [all …]
|
H A D | tpl_gmp.c | 24 tpl_read_mpz (mpc_datafile_context_t* datafile_context, mpz_t mpz) in tpl_read_mpz() argument 26 if (datafile_context->nextchar == EOF) { in tpl_read_mpz() 29 datafile_context->pathname, datafile_context->line_number); in tpl_read_mpz() 32 ungetc (datafile_context->nextchar, datafile_context->fd); in tpl_read_mpz() 33 if (mpz_inp_str (mpz, datafile_context->fd, 0) == 0) { in tpl_read_mpz() 36 datafile_context->pathname, datafile_context->line_number); in tpl_read_mpz() 39 datafile_context->nextchar = getc (datafile_context->fd); in tpl_read_mpz() 40 tpl_skip_whitespace_comments (datafile_context); in tpl_read_mpz()
|
H A D | open_datafile.c | 29 open_datafile (mpc_datafile_context_t* datafile_context, in open_datafile() argument 39 datafile_context->pathname = in open_datafile() 41 if (datafile_context->pathname == NULL) in open_datafile() 46 sprintf (datafile_context->pathname, "%s/%s", src_dir, data_filename); in open_datafile() 47 datafile_context->fd = fopen (datafile_context->pathname, "r"); in open_datafile() 48 if (datafile_context->fd == NULL) in open_datafile() 50 fprintf (stderr, "Unable to open %s\n", datafile_context->pathname); in open_datafile() 54 datafile_context->line_number = 1; in open_datafile() 55 datafile_context->nextchar = getc (datafile_context->fd); in open_datafile() 56 tpl_skip_whitespace_comments (datafile_context); in open_datafile()
|
H A D | tpl_mpc.c | 24 tpl_read_mpc_rnd (mpc_datafile_context_t* datafile_context, mpc_rnd_t* rnd) in tpl_read_mpc_rnd() argument 27 tpl_read_mpfr_rnd (datafile_context, &re); in tpl_read_mpc_rnd() 28 tpl_read_mpfr_rnd (datafile_context, &im); in tpl_read_mpc_rnd() 33 tpl_read_mpc (mpc_datafile_context_t* datafile_context, mpc_data_t* z) in tpl_read_mpc() argument 35 tpl_read_mpfr (datafile_context, mpc_realref (z->mpc), &z->known_sign_real); in tpl_read_mpc() 36 tpl_read_mpfr (datafile_context, mpc_imagref (z->mpc), &z->known_sign_imag); in tpl_read_mpc() 40 tpl_read_mpc_inex (mpc_datafile_context_t* datafile_context, in tpl_read_mpc_inex() argument 43 tpl_read_ternary(datafile_context, &ternarypair->real); in tpl_read_mpc_inex() 44 tpl_read_ternary(datafile_context, &ternarypair->imag); in tpl_read_mpc_inex()
|
H A D | mpc-tests.h | 297 void open_datafile (mpc_datafile_context_t* datafile_context, 302 void read_line (mpc_datafile_context_t* datafile_context, 304 void check_data (mpc_datafile_context_t* datafile_context, 317 void tpl_read_int (mpc_datafile_context_t* datafile_context, 319 void tpl_read_ui (mpc_datafile_context_t* datafile_context, 321 void tpl_read_si (mpc_datafile_context_t* datafile_context, 323 void tpl_read_mpz (mpc_datafile_context_t* datafile_context, 325 void tpl_skip_whitespace_comments (mpc_datafile_context_t* datafile_context); 326 void tpl_read_ternary (mpc_datafile_context_t* datafile_context, 328 void tpl_read_mpfr (mpc_datafile_context_t* datafile_context, [all …]
|
H A D | data_check.tpl | 42 mpc_datafile_context_t datafile_context; 43 mpc_datafile_context_t *dc = &datafile_context; 52 while (datafile_context.nextchar != EOF) {
|