diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 309 | ||||
-rw-r--r-- | doc/gawk.texi | 100 | ||||
-rw-r--r-- | doc/gawktexi.in | 100 |
4 files changed, 295 insertions, 218 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 8e311ec8..696dafaa 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -9,6 +9,10 @@ <arkadiusz@drabczyk.org> for pointing out the lack of documentation. +2021-03-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Constructor Functions): Add doc on `make_bool'. + 2021-03-21 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Other Environment Variables): Document "fnv1a" diff --git a/doc/gawk.info b/doc/gawk.info index f5f417a6..057f18d9 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -25520,7 +25520,8 @@ use them. ' AWK_STRNUM,' ' AWK_ARRAY,' ' AWK_SCALAR, /* opaque access to a variable */' -' AWK_VALUE_COOKIE /* for updating a previously created value */' +' AWK_VALUE_COOKIE, /* for updating a previously created value */' +' AWK_BOOL' '} awk_valtype_t;' This 'enum' indicates the type of a value. It is used in the following 'struct'. @@ -25533,6 +25534,7 @@ use them. ' awk_array_t a;' ' awk_scalar_t scl;' ' awk_value_cookie_t vc;' +' awk_bool_t b;' ' } u;' '} awk_value_t;' An "'awk' value." The 'val_type' member indicates what kind of @@ -25548,6 +25550,7 @@ use them. '#define array_cookie u.a' '#define scalar_cookie u.scl' '#define value_cookie u.vc' +'#define bool_value u.b' Using these macros makes accessing the fields of the 'awk_value_t' more readable. @@ -25858,6 +25861,11 @@ code would use them: a 'char *' value pointing to data previously obtained from 'gawk_malloc()', 'gawk_calloc()', or 'gawk_realloc()'. +'static inline awk_value_t *' +'make_bool(awk_bool_t boolval, awk_value_t *result);' + This function creates a boolean value in the 'awk_value_t' variable + pointed to by 'result'. + File: gawk.info, Node: API Ownership of MPFR and GMP Values, Next: Registration Functions, Prev: Constructor Functions, Up: Extension API Description @@ -26583,16 +26591,17 @@ summarized in *note Table 17.2: table-value-types-returned. Type of Actual Value -------------------------------------------------------------------------- - String Strnum Number Regex Array Undefined -------------------------------------------------------------------------------- - String String String String String false false - Strnum false Strnum Strnum false false false - Number Number Number Number false false false -Type Regex false false false Regex false false -Requested Array false false false false Array false - Scalar Scalar Scalar Scalar Scalar false false - Undefined String Strnum Number Regex Array Undefined - Value false false false false false false + String Strnum Number Regex Bool Array Undefined +---------------------------------------------------------------------------------------- + String String String String String String false false + Strnum false Strnum Strnum false false false false + Number Number Number Number false Number false false +Type Regex false false false Regex false false false +Requested Bool false false false false Bool false false + Array false false false false false Array false + Scalar Scalar Scalar Scalar Scalar Scalar false false + Undefined String Strnum Number Regex Bool Array Undefined + Value false false false false false false false cookie Table 17.2: API value types returned @@ -38575,145 +38584,145 @@ Node: Extension API Description1023773 Node: Extension API Functions Introduction1025486 Ref: table-api-std-headers1027322 Node: General Data Types1031571 -Ref: General Data Types-Footnote-11040201 -Node: Memory Allocation Functions1040500 -Ref: Memory Allocation Functions-Footnote-11045001 -Node: Constructor Functions1045100 -Node: API Ownership of MPFR and GMP Values1048566 -Node: Registration Functions1049879 -Node: Extension Functions1050579 -Node: Exit Callback Functions1055901 -Node: Extension Version String1057151 -Node: Input Parsers1057814 -Node: Output Wrappers1070535 -Node: Two-way processors1075047 -Node: Printing Messages1077312 -Ref: Printing Messages-Footnote-11078483 -Node: Updating ERRNO1078636 -Node: Requesting Values1079375 -Ref: table-value-types-returned1080112 -Node: Accessing Parameters1081048 -Node: Symbol Table Access1082285 -Node: Symbol table by name1082797 -Ref: Symbol table by name-Footnote-11085821 -Node: Symbol table by cookie1085949 -Ref: Symbol table by cookie-Footnote-11090134 -Node: Cached values1090198 -Ref: Cached values-Footnote-11093734 -Node: Array Manipulation1093887 -Ref: Array Manipulation-Footnote-11094978 -Node: Array Data Types1095015 -Ref: Array Data Types-Footnote-11097673 -Node: Array Functions1097765 -Node: Flattening Arrays1102263 -Node: Creating Arrays1109239 -Node: Redirection API1114006 -Node: Extension API Variables1116839 -Node: Extension Versioning1117550 -Ref: gawk-api-version1117979 -Node: Extension GMP/MPFR Versioning1119710 -Node: Extension API Informational Variables1121338 -Node: Extension API Boilerplate1122411 -Node: Changes from API V11126385 -Node: Finding Extensions1127957 -Node: Extension Example1128516 -Node: Internal File Description1129314 -Node: Internal File Ops1133394 -Ref: Internal File Ops-Footnote-11144744 -Node: Using Internal File Ops1144884 -Ref: Using Internal File Ops-Footnote-11147267 -Node: Extension Samples1147541 -Node: Extension Sample File Functions1149070 -Node: Extension Sample Fnmatch1156719 -Node: Extension Sample Fork1158206 -Node: Extension Sample Inplace1159424 -Node: Extension Sample Ord1163050 -Node: Extension Sample Readdir1163886 -Ref: table-readdir-file-types1164775 -Node: Extension Sample Revout1165842 -Node: Extension Sample Rev2way1166431 -Node: Extension Sample Read write array1167171 -Node: Extension Sample Readfile1169113 -Node: Extension Sample Time1170208 -Node: Extension Sample API Tests1171960 -Node: gawkextlib1172452 -Node: Extension summary1175370 -Node: Extension Exercises1179072 -Node: Language History1180314 -Node: V7/SVR3.11181970 -Node: SVR41184122 -Node: POSIX1185556 -Node: BTL1186937 -Node: POSIX/GNU1187666 -Node: Feature History1193444 -Node: Common Extensions1209763 -Node: Ranges and Locales1211046 -Ref: Ranges and Locales-Footnote-11215662 -Ref: Ranges and Locales-Footnote-21215689 -Ref: Ranges and Locales-Footnote-31215924 -Node: Contributors1216147 -Node: History summary1222144 -Node: Installation1223524 -Node: Gawk Distribution1224468 -Node: Getting1224952 -Node: Extracting1225915 -Node: Distribution contents1227553 -Node: Unix Installation1234033 -Node: Quick Installation1234715 -Node: Shell Startup Files1237129 -Node: Additional Configuration Options1238218 -Node: Configuration Philosophy1240533 -Node: Non-Unix Installation1242902 -Node: PC Installation1243362 -Node: PC Binary Installation1244200 -Node: PC Compiling1244635 -Node: PC Using1245752 -Node: Cygwin1249305 -Node: MSYS1250529 -Node: VMS Installation1251131 -Node: VMS Compilation1251922 -Ref: VMS Compilation-Footnote-11253151 -Node: VMS Dynamic Extensions1253209 -Node: VMS Installation Details1254894 -Node: VMS Running1257147 -Node: VMS GNV1261426 -Node: VMS Old Gawk1262161 -Node: Bugs1262632 -Node: Bug address1263295 -Node: Usenet1266277 -Node: Maintainers1267281 -Node: Other Versions1268466 -Node: Installation summary1276331 -Node: Notes1277540 -Node: Compatibility Mode1278334 -Node: Additions1279116 -Node: Accessing The Source1280041 -Node: Adding Code1281478 -Node: New Ports1287697 -Node: Derived Files1292072 -Ref: Derived Files-Footnote-11297732 -Ref: Derived Files-Footnote-21297767 -Ref: Derived Files-Footnote-31298365 -Node: Future Extensions1298479 -Node: Implementation Limitations1299137 -Node: Extension Design1300347 -Node: Old Extension Problems1301491 -Ref: Old Extension Problems-Footnote-11303009 -Node: Extension New Mechanism Goals1303066 -Ref: Extension New Mechanism Goals-Footnote-11306430 -Node: Extension Other Design Decisions1306619 -Node: Extension Future Growth1308732 -Node: Notes summary1309338 -Node: Basic Concepts1310496 -Node: Basic High Level1311177 -Ref: figure-general-flow1311459 -Ref: figure-process-flow1312144 -Ref: Basic High Level-Footnote-11315445 -Node: Basic Data Typing1315630 -Node: Glossary1318958 -Node: Copying1350843 -Node: GNU Free Documentation License1388386 -Node: Index1413506 +Ref: General Data Types-Footnote-11040277 +Node: Memory Allocation Functions1040576 +Ref: Memory Allocation Functions-Footnote-11045077 +Node: Constructor Functions1045176 +Node: API Ownership of MPFR and GMP Values1048829 +Node: Registration Functions1050142 +Node: Extension Functions1050842 +Node: Exit Callback Functions1056164 +Node: Extension Version String1057414 +Node: Input Parsers1058077 +Node: Output Wrappers1070798 +Node: Two-way processors1075310 +Node: Printing Messages1077575 +Ref: Printing Messages-Footnote-11078746 +Node: Updating ERRNO1078899 +Node: Requesting Values1079638 +Ref: table-value-types-returned1080375 +Node: Accessing Parameters1081483 +Node: Symbol Table Access1082720 +Node: Symbol table by name1083232 +Ref: Symbol table by name-Footnote-11086256 +Node: Symbol table by cookie1086384 +Ref: Symbol table by cookie-Footnote-11090569 +Node: Cached values1090633 +Ref: Cached values-Footnote-11094169 +Node: Array Manipulation1094322 +Ref: Array Manipulation-Footnote-11095413 +Node: Array Data Types1095450 +Ref: Array Data Types-Footnote-11098108 +Node: Array Functions1098200 +Node: Flattening Arrays1102698 +Node: Creating Arrays1109674 +Node: Redirection API1114441 +Node: Extension API Variables1117274 +Node: Extension Versioning1117985 +Ref: gawk-api-version1118414 +Node: Extension GMP/MPFR Versioning1120145 +Node: Extension API Informational Variables1121773 +Node: Extension API Boilerplate1122846 +Node: Changes from API V11126820 +Node: Finding Extensions1128392 +Node: Extension Example1128951 +Node: Internal File Description1129749 +Node: Internal File Ops1133829 +Ref: Internal File Ops-Footnote-11145179 +Node: Using Internal File Ops1145319 +Ref: Using Internal File Ops-Footnote-11147702 +Node: Extension Samples1147976 +Node: Extension Sample File Functions1149505 +Node: Extension Sample Fnmatch1157154 +Node: Extension Sample Fork1158641 +Node: Extension Sample Inplace1159859 +Node: Extension Sample Ord1163485 +Node: Extension Sample Readdir1164321 +Ref: table-readdir-file-types1165210 +Node: Extension Sample Revout1166277 +Node: Extension Sample Rev2way1166866 +Node: Extension Sample Read write array1167606 +Node: Extension Sample Readfile1169548 +Node: Extension Sample Time1170643 +Node: Extension Sample API Tests1172395 +Node: gawkextlib1172887 +Node: Extension summary1175805 +Node: Extension Exercises1179507 +Node: Language History1180749 +Node: V7/SVR3.11182405 +Node: SVR41184557 +Node: POSIX1185991 +Node: BTL1187372 +Node: POSIX/GNU1188101 +Node: Feature History1193879 +Node: Common Extensions1210198 +Node: Ranges and Locales1211481 +Ref: Ranges and Locales-Footnote-11216097 +Ref: Ranges and Locales-Footnote-21216124 +Ref: Ranges and Locales-Footnote-31216359 +Node: Contributors1216582 +Node: History summary1222579 +Node: Installation1223959 +Node: Gawk Distribution1224903 +Node: Getting1225387 +Node: Extracting1226350 +Node: Distribution contents1227988 +Node: Unix Installation1234468 +Node: Quick Installation1235150 +Node: Shell Startup Files1237564 +Node: Additional Configuration Options1238653 +Node: Configuration Philosophy1240968 +Node: Non-Unix Installation1243337 +Node: PC Installation1243797 +Node: PC Binary Installation1244635 +Node: PC Compiling1245070 +Node: PC Using1246187 +Node: Cygwin1249740 +Node: MSYS1250964 +Node: VMS Installation1251566 +Node: VMS Compilation1252357 +Ref: VMS Compilation-Footnote-11253586 +Node: VMS Dynamic Extensions1253644 +Node: VMS Installation Details1255329 +Node: VMS Running1257582 +Node: VMS GNV1261861 +Node: VMS Old Gawk1262596 +Node: Bugs1263067 +Node: Bug address1263730 +Node: Usenet1266712 +Node: Maintainers1267716 +Node: Other Versions1268901 +Node: Installation summary1276766 +Node: Notes1277975 +Node: Compatibility Mode1278769 +Node: Additions1279551 +Node: Accessing The Source1280476 +Node: Adding Code1281913 +Node: New Ports1288132 +Node: Derived Files1292507 +Ref: Derived Files-Footnote-11298167 +Ref: Derived Files-Footnote-21298202 +Ref: Derived Files-Footnote-31298800 +Node: Future Extensions1298914 +Node: Implementation Limitations1299572 +Node: Extension Design1300782 +Node: Old Extension Problems1301926 +Ref: Old Extension Problems-Footnote-11303444 +Node: Extension New Mechanism Goals1303501 +Ref: Extension New Mechanism Goals-Footnote-11306865 +Node: Extension Other Design Decisions1307054 +Node: Extension Future Growth1309167 +Node: Notes summary1309773 +Node: Basic Concepts1310931 +Node: Basic High Level1311612 +Ref: figure-general-flow1311894 +Ref: figure-process-flow1312579 +Ref: Basic High Level-Footnote-11315880 +Node: Basic Data Typing1316065 +Node: Glossary1319393 +Node: Copying1351278 +Node: GNU Free Documentation License1388821 +Node: Index1413941 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index e87a1e84..88b0a2ca 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -35586,7 +35586,8 @@ multibyte encoding. @itemx @ @ @ @ AWK_STRNUM, @itemx @ @ @ @ AWK_ARRAY, @itemx @ @ @ @ AWK_SCALAR,@ @ @ @ @ @ @ @ @ /* opaque access to a variable */ -@itemx @ @ @ @ AWK_VALUE_COOKIE@ @ @ @ /* for updating a previously created value */ +@itemx @ @ @ @ AWK_VALUE_COOKIE,@ @ @ /* for updating a previously created value */ +@itemx @ @ @ @ AWK_BOOL @itemx @} awk_valtype_t; This @code{enum} indicates the type of a value. It is used in the following @code{struct}. @@ -35599,6 +35600,7 @@ It is used in the following @code{struct}. @itemx @ @ @ @ @ @ @ @ awk_array_t@ @ @ @ @ @ @ @ a; @itemx @ @ @ @ @ @ @ @ awk_scalar_t@ @ @ @ @ @ @ scl; @itemx @ @ @ @ @ @ @ @ awk_value_cookie_t@ vc; +@itemx @ @ @ @ @ @ @ @ awk_bool_t@ @ @ @ @ @ @ @ @ b; @itemx @ @ @ @ @} u; @itemx @} awk_value_t; An ``@command{awk} value.'' @@ -35614,6 +35616,7 @@ The @code{val_type} member indicates what kind of value the @itemx #define array_cookie@ @ @ u.a @itemx #define scalar_cookie@ @ u.scl @itemx #define value_cookie@ @ @ u.vc +@itemx #define bool_value@ @ @ @ @ u.b Using these macros makes accessing the fields of the @code{awk_value_t} more readable. @@ -35941,6 +35944,11 @@ the regular expression of length @code{len}. It expects @code{string} to be a @samp{char *} value pointing to data previously obtained from @code{gawk_malloc()}, @code{gawk_calloc()}, or @code{gawk_realloc()}. +@item static inline awk_value_t * +@itemx make_bool(awk_bool_t boolval, awk_value_t *result); +This function creates a boolean value in the @code{awk_value_t} variable +pointed to by @code{result}. + @end table @node API Ownership of MPFR and GMP Values @@ -36741,7 +36749,8 @@ value type, as appropriate. This behavior is summarized in <colspec colname="c6"/> <colspec colname="c7"/> <colspec colname="c8"/> - <spanspec spanname="hspan" namest="c3" nameend="c8" align="center"/> + <colspec colname="c9"/> + <spanspec spanname="hspan" namest="c3" nameend="c9" align="center"/> <thead> <row><entry></entry><entry spanname="hspan"><para>Type of Actual Value</para></entry></row> <row> @@ -36751,6 +36760,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Strnum</para></entry> <entry><para>Number</para></entry> <entry><para>Regex</para></entry> + <entry><para>Bool</para></entry> <entry><para>Array</para></entry> <entry><para>Undefined</para></entry> </row> @@ -36763,6 +36773,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>String</para></entry> <entry><para>String</para></entry> <entry><para>String</para></entry> + <entry><para>String</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -36775,6 +36786,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> </row> <row> <entry></entry> @@ -36783,6 +36795,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Number</para></entry> <entry><para>Number</para></entry> <entry><para>false</para></entry> + <entry><para>Number</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -36791,6 +36804,7 @@ value type, as appropriate. This behavior is summarized in <entry><para><emphasis role="bold">Regex</emphasis></para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> <entry><para>Regex</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> @@ -36798,11 +36812,23 @@ value type, as appropriate. This behavior is summarized in </row> <row> <entry><para><emphasis role="bold">Requested</emphasis></para></entry> + <entry><para><emphasis role="bold">Bool</emphasis></para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>Bool</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + </row> + <row> + <entry><para></para></entry> <entry><para><emphasis role="bold">Array</emphasis></para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> <entry><para>Array</para></entry> <entry><para>false</para></entry> </row> @@ -36813,6 +36839,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Scalar</para></entry> <entry><para>Scalar</para></entry> <entry><para>Scalar</para></entry> + <entry><para>Scalar</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -36823,6 +36850,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Strnum</para></entry> <entry><para>Number</para></entry> <entry><para>Regex</para></entry> + <entry><para>Bool</para></entry> <entry><para>Array</para></entry> <entry><para>Undefined</para></entry> </row> @@ -36835,6 +36863,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> </row> </tbody> </tgroup> @@ -36851,43 +36880,46 @@ value type, as appropriate. This behavior is summarized in \vglue-1.1\baselineskip @end tex @c @multitable @columnfractions .166 .166 .198 .15 .15 .166 -@multitable {Requested} {Undefined} {Number} {Number} {Scalar} {Regex} {Array} {Undefined} -@headitem @tab @tab String @tab Strnum @tab Number @tab Regex @tab Array @tab Undefined -@item @tab @b{String} @tab String @tab String @tab String @tab String @tab false @tab false -@item @tab @b{Strnum} @tab false @tab Strnum @tab Strnum @tab false @tab false @tab false -@item @tab @b{Number} @tab Number @tab Number @tab Number @tab false @tab false @tab false -@item @b{Type} @tab @b{Regex} @tab false @tab false @tab false @tab Regex @tab false @tab false -@item @b{Requested} @tab @b{Array} @tab false @tab false @tab false @tab false @tab Array @tab false -@item @tab @b{Scalar} @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab false @tab false -@item @tab @b{Undefined} @tab String @tab Strnum @tab Number @tab Regex @tab Array @tab Undefined -@item @tab @b{Value cookie} @tab false @tab false @tab false @tab false @tab false @tab false +@multitable {Requested} {Undefined} {Number} {Number} {Scalar} {Regex} {Number} {Array} {Undefined} +@headitem @tab @tab String @tab Strnum @tab Number @tab Regex @tab Bool @tab Array @tab Undefined +@item @tab @b{String} @tab String @tab String @tab String @tab String @tab String @tab false @tab false +@item @tab @b{Strnum} @tab false @tab Strnum @tab Strnum @tab false @tab false @tab false @tab false +@item @tab @b{Number} @tab Number @tab Number @tab Number @tab false @tab Number @tab false @tab false +@item @b{Type} @tab @b{Regex} @tab false @tab false @tab false @tab Regex @tab false @tab false @tab false +@item @b{Requested} @tab @b{Bool} @tab false @tab false @tab false @tab false @tab Bool @tab false @tab false +@item @tab @b{Array} @tab false @tab false @tab false @tab false @tab false @tab Array @tab false +@item @tab @b{Scalar} @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab false @tab false +@item @tab @b{Undefined} @tab String @tab Strnum @tab Number @tab Regex @tab Bool @tab Array @tab Undefined +@item @tab @b{Value cookie} @tab false @tab false @tab false @tab false @tab false @tab false @tab false @end multitable @end ifnotdocbook @end ifnotplaintext @ifplaintext @verbatim - +-------------------------------------------------------+ - | Type of Actual Value: | - +--------+--------+--------+--------+-------+-----------+ - | String | Strnum | Number | Regex | Array | Undefined | -+-----------+-----------+--------+--------+--------+--------+-------+-----------+ -| | String | String | String | String | String | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Strnum | false | Strnum | Strnum | false | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Number | Number | Number | Number | false | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Regex | false | false | false | Regex | false | false | -| Type +-----------+--------+--------+--------+--------+-------+-----------+ -| Requested | Array | false | false | false | false | Array | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Scalar | Scalar | Scalar | Scalar | Scalar | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Undefined | String | Strnum | Number | Regex | Array | Undefined | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Value | false | false | false | false | false | false | -| | Cookie | | | | | | | -+-----------+-----------+--------+--------+--------+--------+-------+-----------+ + +----------------------------------------------------------------+ + | Type of Actual Value: | + +--------+--------+--------+--------+--------+-------+-----------+ + | String | Strnum | Number | Regex | Bool | Array | Undefined | ++-----------+-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | String | String | String | String | String | String | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Strnum | false | Strnum | Strnum | false | false | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Number | Number | Number | Number | false | Number | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Regex | false | false | false | Regex | false | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| Type | Bool | false | false | false | false | Bool | false | false | +| Requested +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Array | false | false | false | false | false | Array | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Scalar | Scalar | Scalar | Scalar | Scalar | Scalar | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Undefined | String | Strnum | Number | Regex | Bool | Array | Undefined | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Value | false | false | false | false | false | false | false | +| | Cookie | | | | | | | | ++-----------+-----------+--------+--------+--------+--------+--------+-------+-----------+ @end verbatim @end ifplaintext @end float diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 95606cf3..598d6a1b 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -34429,7 +34429,8 @@ multibyte encoding. @itemx @ @ @ @ AWK_STRNUM, @itemx @ @ @ @ AWK_ARRAY, @itemx @ @ @ @ AWK_SCALAR,@ @ @ @ @ @ @ @ @ /* opaque access to a variable */ -@itemx @ @ @ @ AWK_VALUE_COOKIE@ @ @ @ /* for updating a previously created value */ +@itemx @ @ @ @ AWK_VALUE_COOKIE,@ @ @ /* for updating a previously created value */ +@itemx @ @ @ @ AWK_BOOL @itemx @} awk_valtype_t; This @code{enum} indicates the type of a value. It is used in the following @code{struct}. @@ -34442,6 +34443,7 @@ It is used in the following @code{struct}. @itemx @ @ @ @ @ @ @ @ awk_array_t@ @ @ @ @ @ @ @ a; @itemx @ @ @ @ @ @ @ @ awk_scalar_t@ @ @ @ @ @ @ scl; @itemx @ @ @ @ @ @ @ @ awk_value_cookie_t@ vc; +@itemx @ @ @ @ @ @ @ @ awk_bool_t@ @ @ @ @ @ @ @ @ b; @itemx @ @ @ @ @} u; @itemx @} awk_value_t; An ``@command{awk} value.'' @@ -34457,6 +34459,7 @@ The @code{val_type} member indicates what kind of value the @itemx #define array_cookie@ @ @ u.a @itemx #define scalar_cookie@ @ u.scl @itemx #define value_cookie@ @ @ u.vc +@itemx #define bool_value@ @ @ @ @ u.b Using these macros makes accessing the fields of the @code{awk_value_t} more readable. @@ -34784,6 +34787,11 @@ the regular expression of length @code{len}. It expects @code{string} to be a @samp{char *} value pointing to data previously obtained from @code{gawk_malloc()}, @code{gawk_calloc()}, or @code{gawk_realloc()}. +@item static inline awk_value_t * +@itemx make_bool(awk_bool_t boolval, awk_value_t *result); +This function creates a boolean value in the @code{awk_value_t} variable +pointed to by @code{result}. + @end table @node API Ownership of MPFR and GMP Values @@ -35584,7 +35592,8 @@ value type, as appropriate. This behavior is summarized in <colspec colname="c6"/> <colspec colname="c7"/> <colspec colname="c8"/> - <spanspec spanname="hspan" namest="c3" nameend="c8" align="center"/> + <colspec colname="c9"/> + <spanspec spanname="hspan" namest="c3" nameend="c9" align="center"/> <thead> <row><entry></entry><entry spanname="hspan"><para>Type of Actual Value</para></entry></row> <row> @@ -35594,6 +35603,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Strnum</para></entry> <entry><para>Number</para></entry> <entry><para>Regex</para></entry> + <entry><para>Bool</para></entry> <entry><para>Array</para></entry> <entry><para>Undefined</para></entry> </row> @@ -35606,6 +35616,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>String</para></entry> <entry><para>String</para></entry> <entry><para>String</para></entry> + <entry><para>String</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -35618,6 +35629,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> </row> <row> <entry></entry> @@ -35626,6 +35638,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Number</para></entry> <entry><para>Number</para></entry> <entry><para>false</para></entry> + <entry><para>Number</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -35634,6 +35647,7 @@ value type, as appropriate. This behavior is summarized in <entry><para><emphasis role="bold">Regex</emphasis></para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> <entry><para>Regex</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> @@ -35641,11 +35655,23 @@ value type, as appropriate. This behavior is summarized in </row> <row> <entry><para><emphasis role="bold">Requested</emphasis></para></entry> + <entry><para><emphasis role="bold">Bool</emphasis></para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + <entry><para>Bool</para></entry> + <entry><para>false</para></entry> + <entry><para>false</para></entry> + </row> + <row> + <entry><para></para></entry> <entry><para><emphasis role="bold">Array</emphasis></para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> <entry><para>Array</para></entry> <entry><para>false</para></entry> </row> @@ -35656,6 +35682,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Scalar</para></entry> <entry><para>Scalar</para></entry> <entry><para>Scalar</para></entry> + <entry><para>Scalar</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> </row> @@ -35666,6 +35693,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>Strnum</para></entry> <entry><para>Number</para></entry> <entry><para>Regex</para></entry> + <entry><para>Bool</para></entry> <entry><para>Array</para></entry> <entry><para>Undefined</para></entry> </row> @@ -35678,6 +35706,7 @@ value type, as appropriate. This behavior is summarized in <entry><para>false</para></entry> <entry><para>false</para></entry> <entry><para>false</para></entry> + <entry><para>false</para></entry> </row> </tbody> </tgroup> @@ -35694,43 +35723,46 @@ value type, as appropriate. This behavior is summarized in \vglue-1.1\baselineskip @end tex @c @multitable @columnfractions .166 .166 .198 .15 .15 .166 -@multitable {Requested} {Undefined} {Number} {Number} {Scalar} {Regex} {Array} {Undefined} -@headitem @tab @tab String @tab Strnum @tab Number @tab Regex @tab Array @tab Undefined -@item @tab @b{String} @tab String @tab String @tab String @tab String @tab false @tab false -@item @tab @b{Strnum} @tab false @tab Strnum @tab Strnum @tab false @tab false @tab false -@item @tab @b{Number} @tab Number @tab Number @tab Number @tab false @tab false @tab false -@item @b{Type} @tab @b{Regex} @tab false @tab false @tab false @tab Regex @tab false @tab false -@item @b{Requested} @tab @b{Array} @tab false @tab false @tab false @tab false @tab Array @tab false -@item @tab @b{Scalar} @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab false @tab false -@item @tab @b{Undefined} @tab String @tab Strnum @tab Number @tab Regex @tab Array @tab Undefined -@item @tab @b{Value cookie} @tab false @tab false @tab false @tab false @tab false @tab false +@multitable {Requested} {Undefined} {Number} {Number} {Scalar} {Regex} {Number} {Array} {Undefined} +@headitem @tab @tab String @tab Strnum @tab Number @tab Regex @tab Bool @tab Array @tab Undefined +@item @tab @b{String} @tab String @tab String @tab String @tab String @tab String @tab false @tab false +@item @tab @b{Strnum} @tab false @tab Strnum @tab Strnum @tab false @tab false @tab false @tab false +@item @tab @b{Number} @tab Number @tab Number @tab Number @tab false @tab Number @tab false @tab false +@item @b{Type} @tab @b{Regex} @tab false @tab false @tab false @tab Regex @tab false @tab false @tab false +@item @b{Requested} @tab @b{Bool} @tab false @tab false @tab false @tab false @tab Bool @tab false @tab false +@item @tab @b{Array} @tab false @tab false @tab false @tab false @tab false @tab Array @tab false +@item @tab @b{Scalar} @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab Scalar @tab false @tab false +@item @tab @b{Undefined} @tab String @tab Strnum @tab Number @tab Regex @tab Bool @tab Array @tab Undefined +@item @tab @b{Value cookie} @tab false @tab false @tab false @tab false @tab false @tab false @tab false @end multitable @end ifnotdocbook @end ifnotplaintext @ifplaintext @verbatim - +-------------------------------------------------------+ - | Type of Actual Value: | - +--------+--------+--------+--------+-------+-----------+ - | String | Strnum | Number | Regex | Array | Undefined | -+-----------+-----------+--------+--------+--------+--------+-------+-----------+ -| | String | String | String | String | String | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Strnum | false | Strnum | Strnum | false | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Number | Number | Number | Number | false | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Regex | false | false | false | Regex | false | false | -| Type +-----------+--------+--------+--------+--------+-------+-----------+ -| Requested | Array | false | false | false | false | Array | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Scalar | Scalar | Scalar | Scalar | Scalar | false | false | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Undefined | String | Strnum | Number | Regex | Array | Undefined | -| +-----------+--------+--------+--------+--------+-------+-----------+ -| | Value | false | false | false | false | false | false | -| | Cookie | | | | | | | -+-----------+-----------+--------+--------+--------+--------+-------+-----------+ + +----------------------------------------------------------------+ + | Type of Actual Value: | + +--------+--------+--------+--------+--------+-------+-----------+ + | String | Strnum | Number | Regex | Bool | Array | Undefined | ++-----------+-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | String | String | String | String | String | String | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Strnum | false | Strnum | Strnum | false | false | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Number | Number | Number | Number | false | Number | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Regex | false | false | false | Regex | false | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| Type | Bool | false | false | false | false | Bool | false | false | +| Requested +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Array | false | false | false | false | false | Array | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Scalar | Scalar | Scalar | Scalar | Scalar | Scalar | false | false | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Undefined | String | Strnum | Number | Regex | Bool | Array | Undefined | +| +-----------+--------+--------+--------+--------+--------+-------+-----------+ +| | Value | false | false | false | false | false | false | false | +| | Cookie | | | | | | | | ++-----------+-----------+--------+--------+--------+--------+--------+-------+-----------+ @end verbatim @end ifplaintext @end float |