author: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300
committer: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300
commit: 868b2b66b564b5c00e3a74d10be45db7151627ac
parent: cce2ae8d3312493b7653358bb4af201d3271377b
Commit Summary:
Diffstat:
1 file changed, 38 insertions, 0 deletions
diff --git a/mpu/mpu-ioreal.h b/mpu/mpu-ioreal.h
new file mode 100644
index 0000000..0258de2
--- /dev/null
+++ b/mpu/mpu-ioreal.h
@@ -0,0 +1,55 @@
+
+/***************************************************************
+ __MPU_IOREAL.H
+
+ This file contains declarations of functions for
+ REAL input/output operations.
+
+ PART OF : MPU - library .
+
+ USAGE : Internal only .
+
+ NOTE : Include "libmpu.h" before this FILE .
+
+ Copyright (C) 2000 - 2024 by Andrew V.Kosteltsev.
+ All Rights Reserved.
+ ***************************************************************/
+
+#ifndef __MPU_IOREAL_H
+#define __MPU_IOREAL_H
+
+
+#define ASCII_TO_REAL_ERROR (-1) /* error */
+#define LONGHAND_REAL_NUMBER 0 /* прочитано простое число */
+ /* (например, 1e1) */
+#define REAL_PART_OF_COMPLEX 1 /* прочитана вещественная часть */
+ /* комплексного числа */
+ /* (например, 1r1) */
+#define IMAGINARY_OF_COMPLEX 2 /* прочитана мнимая часть */
+ /* комплексного числа */
+ /* (например, 1i1, 1j1) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+extern void ei_real_to_ascii ( __mpu_char8_t *string,
+ EMUSHORT *ei,
+ int ndigs,
+ int exp_delim,
+ int exp_digs,
+ int gen_plus,
+ int nb );
+
+extern int ei_ascii_to_real ( EMUSHORT *ei,
+ __mpu_char8_t *ss,
+ int nb );
+
+
+
+#ifdef __cplusplus
+} /* ... extern "C" */
+#endif
+
+#endif /* __MPU_IOREAL_H */