summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-11-15 22:27:41 +0100
committerKevin Ryde <user42@zip.com.au>2001-11-15 22:27:41 +0100
commit3db5e61327668e5b1c4e517161b660251cbee3a7 (patch)
tree3b5dd72790b9773a4c0a1e41dc93c22131f5a899 /gmp-impl.h
parentcc9aa932213e08202b0cc306f739a21d5d5ea613 (diff)
downloadgmp-3db5e61327668e5b1c4e517161b660251cbee3a7.tar.gz
* scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c, scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files. * gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent additions.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index 97b962be0..afb63f892 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -2249,7 +2249,6 @@ struct gmp_snprintf_t {
size_t size;
};
-
/* Add the bytes printed by the call to the total retval, or bail out on an
error. */
#define DOPRNT_ACCUMULATE(call) \
@@ -2301,6 +2300,33 @@ int __gmp_doprnt_mpf _PROTO ((const struct doprnt_funs_t *funs,
#endif /* _GMP_H_HAVE_VA_LIST */
+struct gmp_doscan_params_t {
+ int base;
+ int ignore;
+ char type;
+ int width;
+};
+
+typedef int (*gmp_doscan_scan_t) _PROTO ((void *data, const char *fmt, ...));
+typedef void *(*gmp_doscan_step_t) _PROTO ((void *data, int new_chars));
+typedef int (*gmp_doscan_get_t) _PROTO ((void *data));
+typedef int (*gmp_doscan_unget_t) _PROTO ((int c, void *data));
+
+struct gmp_doscan_funs_t {
+ gmp_doscan_scan_t scan;
+ gmp_doscan_step_t step;
+ gmp_doscan_get_t get;
+ gmp_doscan_unget_t unget;
+};
+extern const struct gmp_doscan_funs_t __gmp_fscanf_funs;
+extern const struct gmp_doscan_funs_t __gmp_sscanf_funs;
+
+#if _GMP_H_HAVE_VA_LIST
+int __gmp_doscan _PROTO ((const struct gmp_doscan_funs_t *funs, void *data,
+ const char *orig_fmt, va_list orig_ap));
+#endif
+
+
/* For testing and debugging. */
#define MPZ_CHECK_FORMAT(z) \
do { \