aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-12-10 11:58:18 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-12-10 11:58:18 +0200
commitcfa3ac1c6a0fcbe794df853f25c757e4acd5fcc0 (patch)
tree8148617543a022cd38ea259ef4ba438cad422b12
parent09e98ee95fb453adc0f1783937477cd065611581 (diff)
downloadegawk-cfa3ac1c6a0fcbe794df853f25c757e4acd5fcc0.tar.gz
egawk-cfa3ac1c6a0fcbe794df853f25c757e4acd5fcc0.tar.bz2
egawk-cfa3ac1c6a0fcbe794df853f25c757e4acd5fcc0.zip
Reformat some comments in extension/rwarray.c.
-rw-r--r--extension/ChangeLog4
-rw-r--r--extension/rwarray.c20
2 files changed, 16 insertions, 8 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 9578a94a..fc90156f 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,7 @@
+2021-12-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * rwarray.c (write_number, read_number): Reformat comments a bit.
+
2021-12-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
* rwarray.c (write_number): Since mpfr_fpif_export is experimental
diff --git a/extension/rwarray.c b/extension/rwarray.c
index 1356005c..59d6b0f7 100644
--- a/extension/rwarray.c
+++ b/extension/rwarray.c
@@ -314,19 +314,23 @@ write_number(FILE *fp, awk_value_t *val)
return awk_false;
#ifdef USE_MPFR_FPIF
- /* This would be preferable, but it is not available
+ /*
+ * This would be preferable, but it is not available
* on older platforms with mpfr 3.x. It's also marked
* experimental in mpfr 4.1, so perhaps not ready for
- * production use yet. */
+ * production use yet.
+ */
if (mpfr_fpif_export(fp, val->num_ptr) != 0)
#else
#define MPFR_STR_BASE 62 /* maximize base to minimize string len */
#define MPFR_STR_ROUND MPFR_RNDN
- /* XXX does the choice of MPFR_RNDN matter, given
+ /*
+ * XXX does the choice of MPFR_RNDN matter, given
* that the precision is 0, so we should be rendering
- * in full precision? */
- /* We need to write a terminating space, since
- * mpfr_inp_str reads until it hits a space or EOF */
+ * in full precision?
+ */
+ // We need to write a terminating space, since
+ // mpfr_inp_str reads until it hits a space or EOF
if ((mpfr_out_str(fp, MPFR_STR_BASE, 0, val->num_ptr, MPFR_STR_ROUND) == 0) || (putc(' ', fp) == EOF))
#endif
return awk_false;
@@ -614,8 +618,8 @@ read_number(FILE *fp, awk_value_t *value, uint32_t code)
/* preferable if widely available and stable */
if (mpfr_fpif_import(mpfr_val, fp) != 0)
#else
- /* N.B. need to consume the terminating space we wrote
- * after mpfr_out_str */
+ // N.B. need to consume the terminating space we wrote
+ // after mpfr_out_str
if ((mpfr_inp_str(mpfr_val, fp, MPFR_STR_BASE, MPFR_STR_ROUND) == 0) || (getc(fp) != ' '))
#endif
return awk_false;