diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-11-08 21:57:33 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-11-08 21:57:33 +0200 |
commit | 235cdcf449ae3630d53da430267c76b6d8b58d76 (patch) | |
tree | 1b0282db5d31221572ba77dcd1a95d3a2e2a3693 | |
parent | 767a091d2b99cd2afe8c427ed944ba588aedb02b (diff) | |
parent | a5397f50278d484584b4c157d0deafe72bed32b4 (diff) | |
download | egawk-235cdcf449ae3630d53da430267c76b6d8b58d76.tar.gz egawk-235cdcf449ae3630d53da430267c76b6d8b58d76.tar.bz2 egawk-235cdcf449ae3630d53da430267c76b6d8b58d76.zip |
Merge branch 'master' into feature/fix-comments
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 292 | ||||
-rw-r--r-- | doc/gawk.texi | 16 | ||||
-rw-r--r-- | doc/gawktexi.in | 16 | ||||
-rw-r--r-- | gawkapi.h | 12 |
6 files changed, 186 insertions, 160 deletions
@@ -1,3 +1,8 @@ +2017-11-08 Arnold D. Robbins <arnold@skeeve.com> + + * gawkapi.h (AWK_NUMBER_TYPE): Move this enum out to the + top level so that it works correctly with C++. + 2017-10-24 Arnold D. Robbins <arnold@skeeve.com> * NEWS: Updated with info about OS/2. diff --git a/doc/ChangeLog b/doc/ChangeLog index f171d47c..47c80563 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-08 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (General Data Types): Move AWK_NUMBER_TYPE + enum out to top level, corresponding to code change. + 2017-10-19 Arnold D. Robbins <arnold@skeeve.com> * 4.2.0: Release tar ball made. diff --git a/doc/gawk.info b/doc/gawk.info index f2b5a11b..1a2c16e9 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -23845,13 +23845,19 @@ use them. Using these macros makes accessing the fields of the 'awk_value_t' more readable. +'enum AWK_NUMBER_TYPE {' +' AWK_NUMBER_TYPE_DOUBLE,' +' AWK_NUMBER_TYPE_MPFR,' +' AWK_NUMBER_TYPE_MPZ' +'};' + This 'enum' is used in the following structure for defining the + type of numeric value that is being worked with. It is declared at + the top level of the file so that it works correctly for C++ as + well as for C. + 'typedef struct awk_number {' ' double d;' -' enum AWK_NUMBER_TYPE {' -' AWK_NUMBER_TYPE_DOUBLE,' -' AWK_NUMBER_TYPE_MPFR,' -' AWK_NUMBER_TYPE_MPZ' -' } type;' +' enum AWK_NUMBER_TYPE type;' ' void *ptr;' '} awk_number_t;' This represents a numeric value. Internally, 'gawk' stores every @@ -36310,143 +36316,143 @@ Ref: figure-call-new-function956146 Node: Extension API Description958208 Node: Extension API Functions Introduction959850 Node: General Data Types965390 -Ref: General Data Types-Footnote-1973511 -Node: Memory Allocation Functions973810 -Ref: Memory Allocation Functions-Footnote-1978018 -Node: Constructor Functions978117 -Node: Registration Functions981703 -Node: Extension Functions982388 -Node: Exit Callback Functions987603 -Node: Extension Version String988853 -Node: Input Parsers989516 -Node: Output Wrappers1002237 -Node: Two-way processors1006749 -Node: Printing Messages1009014 -Ref: Printing Messages-Footnote-11010185 -Node: Updating ERRNO1010338 -Node: Requesting Values1011077 -Ref: table-value-types-returned1011814 -Node: Accessing Parameters1012750 -Node: Symbol Table Access1013985 -Node: Symbol table by name1014497 -Node: Symbol table by cookie1016286 -Ref: Symbol table by cookie-Footnote-11020471 -Node: Cached values1020535 -Ref: Cached values-Footnote-11024071 -Node: Array Manipulation1024224 -Ref: Array Manipulation-Footnote-11025315 -Node: Array Data Types1025352 -Ref: Array Data Types-Footnote-11028010 -Node: Array Functions1028102 -Node: Flattening Arrays1032600 -Node: Creating Arrays1039576 -Node: Redirection API1044345 -Node: Extension API Variables1047178 -Node: Extension Versioning1047889 -Ref: gawk-api-version1048318 -Node: Extension GMP/MPFR Versioning1050046 -Node: Extension API Informational Variables1051674 -Node: Extension API Boilerplate1052747 -Node: Changes from API V11056721 -Node: Finding Extensions1057381 -Node: Extension Example1057940 -Node: Internal File Description1058738 -Node: Internal File Ops1062818 -Ref: Internal File Ops-Footnote-11074218 -Node: Using Internal File Ops1074358 -Ref: Using Internal File Ops-Footnote-11076741 -Node: Extension Samples1077015 -Node: Extension Sample File Functions1078544 -Node: Extension Sample Fnmatch1086193 -Node: Extension Sample Fork1087680 -Node: Extension Sample Inplace1088898 -Node: Extension Sample Ord1092115 -Node: Extension Sample Readdir1092951 -Ref: table-readdir-file-types1093840 -Node: Extension Sample Revout1094645 -Node: Extension Sample Rev2way1095234 -Node: Extension Sample Read write array1095974 -Node: Extension Sample Readfile1097916 -Node: Extension Sample Time1099011 -Node: Extension Sample API Tests1100359 -Node: gawkextlib1100851 -Node: Extension summary1103307 -Node: Extension Exercises1107009 -Node: Language History1108507 -Node: V7/SVR3.11110163 -Node: SVR41112315 -Node: POSIX1113749 -Node: BTL1115129 -Node: POSIX/GNU1115858 -Node: Feature History1121636 -Node: Common Extensions1137495 -Node: Ranges and Locales1138778 -Ref: Ranges and Locales-Footnote-11143394 -Ref: Ranges and Locales-Footnote-21143421 -Ref: Ranges and Locales-Footnote-31143656 -Node: Contributors1143877 -Node: History summary1149822 -Node: Installation1151202 -Node: Gawk Distribution1152146 -Node: Getting1152630 -Node: Extracting1153593 -Node: Distribution contents1155231 -Node: Unix Installation1161711 -Node: Quick Installation1162393 -Node: Shell Startup Files1164807 -Node: Additional Configuration Options1165896 -Node: Configuration Philosophy1167757 -Node: Non-Unix Installation1170126 -Node: PC Installation1170586 -Node: PC Binary Installation1171424 -Node: PC Compiling1171859 -Node: PC Using1172976 -Node: Cygwin1176021 -Node: MSYS1176791 -Node: VMS Installation1177292 -Node: VMS Compilation1178083 -Ref: VMS Compilation-Footnote-11179312 -Node: VMS Dynamic Extensions1179370 -Node: VMS Installation Details1181055 -Node: VMS Running1183308 -Node: VMS GNV1187587 -Node: VMS Old Gawk1188322 -Node: Bugs1188793 -Node: Bug address1189456 -Node: Usenet1192248 -Node: Maintainers1193025 -Node: Other Versions1194286 -Node: Installation summary1201048 -Node: Notes1202250 -Node: Compatibility Mode1203115 -Node: Additions1203897 -Node: Accessing The Source1204822 -Node: Adding Code1206259 -Node: New Ports1212478 -Node: Derived Files1216966 -Ref: Derived Files-Footnote-11222612 -Ref: Derived Files-Footnote-21222647 -Ref: Derived Files-Footnote-31223245 -Node: Future Extensions1223359 -Node: Implementation Limitations1224017 -Node: Extension Design1225200 -Node: Old Extension Problems1226354 -Ref: Old Extension Problems-Footnote-11227872 -Node: Extension New Mechanism Goals1227929 -Ref: Extension New Mechanism Goals-Footnote-11231293 -Node: Extension Other Design Decisions1231482 -Node: Extension Future Growth1233595 -Node: Old Extension Mechanism1234431 -Node: Notes summary1236194 -Node: Basic Concepts1237376 -Node: Basic High Level1238057 -Ref: figure-general-flow1238339 -Ref: figure-process-flow1239024 -Ref: Basic High Level-Footnote-11242325 -Node: Basic Data Typing1242510 -Node: Glossary1245838 -Node: Copying1277674 -Node: GNU Free Documentation License1315213 -Node: Index1340331 +Ref: General Data Types-Footnote-1973751 +Node: Memory Allocation Functions974050 +Ref: Memory Allocation Functions-Footnote-1978258 +Node: Constructor Functions978357 +Node: Registration Functions981943 +Node: Extension Functions982628 +Node: Exit Callback Functions987843 +Node: Extension Version String989093 +Node: Input Parsers989756 +Node: Output Wrappers1002477 +Node: Two-way processors1006989 +Node: Printing Messages1009254 +Ref: Printing Messages-Footnote-11010425 +Node: Updating ERRNO1010578 +Node: Requesting Values1011317 +Ref: table-value-types-returned1012054 +Node: Accessing Parameters1012990 +Node: Symbol Table Access1014225 +Node: Symbol table by name1014737 +Node: Symbol table by cookie1016526 +Ref: Symbol table by cookie-Footnote-11020711 +Node: Cached values1020775 +Ref: Cached values-Footnote-11024311 +Node: Array Manipulation1024464 +Ref: Array Manipulation-Footnote-11025555 +Node: Array Data Types1025592 +Ref: Array Data Types-Footnote-11028250 +Node: Array Functions1028342 +Node: Flattening Arrays1032840 +Node: Creating Arrays1039816 +Node: Redirection API1044585 +Node: Extension API Variables1047418 +Node: Extension Versioning1048129 +Ref: gawk-api-version1048558 +Node: Extension GMP/MPFR Versioning1050286 +Node: Extension API Informational Variables1051914 +Node: Extension API Boilerplate1052987 +Node: Changes from API V11056961 +Node: Finding Extensions1057621 +Node: Extension Example1058180 +Node: Internal File Description1058978 +Node: Internal File Ops1063058 +Ref: Internal File Ops-Footnote-11074458 +Node: Using Internal File Ops1074598 +Ref: Using Internal File Ops-Footnote-11076981 +Node: Extension Samples1077255 +Node: Extension Sample File Functions1078784 +Node: Extension Sample Fnmatch1086433 +Node: Extension Sample Fork1087920 +Node: Extension Sample Inplace1089138 +Node: Extension Sample Ord1092355 +Node: Extension Sample Readdir1093191 +Ref: table-readdir-file-types1094080 +Node: Extension Sample Revout1094885 +Node: Extension Sample Rev2way1095474 +Node: Extension Sample Read write array1096214 +Node: Extension Sample Readfile1098156 +Node: Extension Sample Time1099251 +Node: Extension Sample API Tests1100599 +Node: gawkextlib1101091 +Node: Extension summary1103547 +Node: Extension Exercises1107249 +Node: Language History1108747 +Node: V7/SVR3.11110403 +Node: SVR41112555 +Node: POSIX1113989 +Node: BTL1115369 +Node: POSIX/GNU1116098 +Node: Feature History1121876 +Node: Common Extensions1137735 +Node: Ranges and Locales1139018 +Ref: Ranges and Locales-Footnote-11143634 +Ref: Ranges and Locales-Footnote-21143661 +Ref: Ranges and Locales-Footnote-31143896 +Node: Contributors1144117 +Node: History summary1150062 +Node: Installation1151442 +Node: Gawk Distribution1152386 +Node: Getting1152870 +Node: Extracting1153833 +Node: Distribution contents1155471 +Node: Unix Installation1161951 +Node: Quick Installation1162633 +Node: Shell Startup Files1165047 +Node: Additional Configuration Options1166136 +Node: Configuration Philosophy1167997 +Node: Non-Unix Installation1170366 +Node: PC Installation1170826 +Node: PC Binary Installation1171664 +Node: PC Compiling1172099 +Node: PC Using1173216 +Node: Cygwin1176261 +Node: MSYS1177031 +Node: VMS Installation1177532 +Node: VMS Compilation1178323 +Ref: VMS Compilation-Footnote-11179552 +Node: VMS Dynamic Extensions1179610 +Node: VMS Installation Details1181295 +Node: VMS Running1183548 +Node: VMS GNV1187827 +Node: VMS Old Gawk1188562 +Node: Bugs1189033 +Node: Bug address1189696 +Node: Usenet1192488 +Node: Maintainers1193265 +Node: Other Versions1194526 +Node: Installation summary1201288 +Node: Notes1202490 +Node: Compatibility Mode1203355 +Node: Additions1204137 +Node: Accessing The Source1205062 +Node: Adding Code1206499 +Node: New Ports1212718 +Node: Derived Files1217206 +Ref: Derived Files-Footnote-11222852 +Ref: Derived Files-Footnote-21222887 +Ref: Derived Files-Footnote-31223485 +Node: Future Extensions1223599 +Node: Implementation Limitations1224257 +Node: Extension Design1225440 +Node: Old Extension Problems1226594 +Ref: Old Extension Problems-Footnote-11228112 +Node: Extension New Mechanism Goals1228169 +Ref: Extension New Mechanism Goals-Footnote-11231533 +Node: Extension Other Design Decisions1231722 +Node: Extension Future Growth1233835 +Node: Old Extension Mechanism1234671 +Node: Notes summary1236434 +Node: Basic Concepts1237616 +Node: Basic High Level1238297 +Ref: figure-general-flow1238579 +Ref: figure-process-flow1239264 +Ref: Basic High Level-Footnote-11242565 +Node: Basic Data Typing1242750 +Node: Glossary1246078 +Node: Copying1277914 +Node: GNU Free Documentation License1315453 +Node: Index1340571 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 0485a566..2913673c 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -32888,13 +32888,18 @@ The @code{val_type} member indicates what kind of value the Using these macros makes accessing the fields of the @code{awk_value_t} more readable. +@item enum AWK_NUMBER_TYPE @{ +@itemx @ @ @ @ AWK_NUMBER_TYPE_DOUBLE, +@itemx @ @ @ @ AWK_NUMBER_TYPE_MPFR, +@itemx @ @ @ @ AWK_NUMBER_TYPE_MPZ +@itemx @}; +This @code{enum} is used in the following structure for defining the +type of numeric value that is being worked with. It is declared at the +top level of the file so that it works correctly for C++ as well as for C. + @item typedef struct awk_number @{ @itemx @ @ @ @ double d; -@itemx @ @ @ @ enum AWK_NUMBER_TYPE @{ -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_DOUBLE, -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_MPFR, -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_MPZ -@itemx @ @ @ @ @} type; +@itemx @ @ @ @ enum AWK_NUMBER_TYPE type; @itemx @ @ @ @ void *ptr; @itemx @} awk_number_t; This represents a numeric value. Internally, @command{gawk} stores @@ -32909,7 +32914,6 @@ in data received from @command{gawk}. In addition, by examining the member is either a GMP integer (type @code{mpz_ptr}), or an MPFR floating-point value (type @code{mpfr_ptr_t}), and cast it appropriately. - @item typedef void *awk_scalar_t; Scalars can be represented as an opaque type. These values are obtained from @command{gawk} and then passed back into it. This is discussed diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 518ab01f..807945eb 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -31902,13 +31902,18 @@ The @code{val_type} member indicates what kind of value the Using these macros makes accessing the fields of the @code{awk_value_t} more readable. +@item enum AWK_NUMBER_TYPE @{ +@itemx @ @ @ @ AWK_NUMBER_TYPE_DOUBLE, +@itemx @ @ @ @ AWK_NUMBER_TYPE_MPFR, +@itemx @ @ @ @ AWK_NUMBER_TYPE_MPZ +@itemx @}; +This @code{enum} is used in the following structure for defining the +type of numeric value that is being worked with. It is declared at the +top level of the file so that it works correctly for C++ as well as for C. + @item typedef struct awk_number @{ @itemx @ @ @ @ double d; -@itemx @ @ @ @ enum AWK_NUMBER_TYPE @{ -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_DOUBLE, -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_MPFR, -@itemx @ @ @ @ @ @ @ @ AWK_NUMBER_TYPE_MPZ -@itemx @ @ @ @ @} type; +@itemx @ @ @ @ enum AWK_NUMBER_TYPE type; @itemx @ @ @ @ void *ptr; @itemx @} awk_number_t; This represents a numeric value. Internally, @command{gawk} stores @@ -31923,7 +31928,6 @@ in data received from @command{gawk}. In addition, by examining the member is either a GMP integer (type @code{mpz_ptr}), or an MPFR floating-point value (type @code{mpfr_ptr_t}), and cast it appropriately. - @item typedef void *awk_scalar_t; Scalars can be represented as an opaque type. These values are obtained from @command{gawk} and then passed back into it. This is discussed @@ -323,13 +323,15 @@ typedef struct awk_string { size_t len; /* length thereof, in chars */ } awk_string_t; +enum AWK_NUMBER_TYPE { + AWK_NUMBER_TYPE_DOUBLE, + AWK_NUMBER_TYPE_MPFR, + AWK_NUMBER_TYPE_MPZ +}; + typedef struct awk_number { double d; /* always populated in data received from gawk */ - enum AWK_NUMBER_TYPE { - AWK_NUMBER_TYPE_DOUBLE, - AWK_NUMBER_TYPE_MPFR, - AWK_NUMBER_TYPE_MPZ - } type; + enum AWK_NUMBER_TYPE type; void *ptr; /* either NULL or mpfr_ptr or mpz_ptr */ } awk_number_t; |