diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 302 | ||||
-rw-r--r-- | doc/gawk.texi | 69 | ||||
-rw-r--r-- | doc/gawktexi.in | 69 |
4 files changed, 249 insertions, 196 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index c9c618d2..68c139a9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -12,6 +12,11 @@ * gawktexi.in: Update description of awk_ext_func_t structure. +2016-11-30 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Document typed regex changes as relates to API. + Still stuff left to do. + 2016-11-21 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Finish off discussion of strongly typed regexp diff --git a/doc/gawk.info b/doc/gawk.info index 9033acab..67b52f5e 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -23627,7 +23627,8 @@ use them. ' AWK_STRING,' ' 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_REGEX' '} awk_valtype_t;' This 'enum' indicates the type of a value. It is used in the following 'struct'. @@ -23647,6 +23648,7 @@ use them. type. '#define str_value u.s' +'#define regex_value str_value' '#define num_value u.d' '#define array_cookie u.a' '#define scalar_cookie u.scl' @@ -23665,7 +23667,7 @@ use them. This is also discussed in a general fashion in the text following this list, and in more detail in *note Cached values::. - Scalar values in 'awk' are either numbers or strings. The + Scalar values in 'awk' are numbers, strings, or typed regexps. The 'awk_value_t' struct represents values. The 'val_type' member indicates what is in the 'union'. @@ -23674,6 +23676,12 @@ require more work. Because 'gawk' allows embedded NUL bytes in string values, a string must be represented as a pair containing a data pointer and length. This is the 'awk_string_t' type. + Typed regexp values (*note Strong Regexp Constants::) are not of much +use to extension functions. Extension functions can tell that they've +received them, and create them for scalar values. Otherwise, they can +examine the text of the regexp through 'regex_value.str' and +'regex_value.len'. + Identifiers (i.e., the names of global variables) can be associated with either scalar values or with arrays. In addition, 'gawk' provides true arrays of arrays, where any given array element can itself be an @@ -23833,6 +23841,11 @@ code would use them: This function simply creates a numeric value in the 'awk_value_t' variable pointed to by 'result'. +'static inline awk_value_t *' +'make_regex(const char *string, size_t length, awk_value_t *result);' + This function creates a strongly typed regexp value. 'string' is + the regular expression of length 'len'. + File: gawk.info, Node: Registration Functions, Next: Printing Messages, Prev: Constructor Functions, Up: Extension API Description @@ -24580,8 +24593,9 @@ was discussed earlier, in *note General Data Types::. 'awk_bool_t sym_update_scalar(awk_scalar_t cookie, awk_value_t *value);' Update the value associated with a scalar cookie. Return false if - the new value is not of type 'AWK_STRING' or 'AWK_NUMBER'. Here - too, the predefined variables may not be updated. + the new value is not of type 'AWK_STRING', 'AWK_REGEX', or + 'AWK_NUMBER'. Here too, the predefined variables may not be + updated. It is not obvious at first glance how to work with scalar cookies or what their raison d'e^tre really is. In theory, the 'sym_lookup()' and @@ -24695,8 +24709,8 @@ follows: 'awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result);' Create a cached string or numeric value from 'value' for efficient - later assignment. Only values of type 'AWK_NUMBER' and - 'AWK_STRING' are allowed. Any other type is rejected. + later assignment. Only values of type 'AWK_NUMBER', 'AWK_REGEX', + and 'AWK_STRING' are allowed. Any other type is rejected. 'AWK_UNDEFINED' could be allowed, but doing so would result in inferior performance. @@ -25348,7 +25362,7 @@ versions are available at compile time as C preprocessor defines to support conditional compilation, and as enum constants to facilitate debugging: -API Version C preprocessor define enum constant +API Version C Preprocessor Define enum constant -------------------------------------------------------------------- Major 'gawk_api_major_version' 'GAWK_API_MAJOR_VERSION' Minor 'gawk_api_minor_version' 'GAWK_API_MINOR_VERSION' @@ -35806,142 +35820,142 @@ Ref: figure-call-new-function948497 Node: Extension API Description950559 Node: Extension API Functions Introduction952201 Node: General Data Types957512 -Ref: General Data Types-Footnote-1963467 -Node: Memory Allocation Functions963766 -Ref: Memory Allocation Functions-Footnote-1966611 -Node: Constructor Functions966710 -Node: Registration Functions968455 -Node: Extension Functions969140 -Node: Exit Callback Functions974338 -Node: Extension Version String975588 -Node: Input Parsers976251 -Node: Output Wrappers986133 -Node: Two-way processors990645 -Node: Printing Messages992910 -Ref: Printing Messages-Footnote-1994081 -Node: Updating ERRNO994234 -Node: Requesting Values994973 -Ref: table-value-types-returned995710 -Node: Accessing Parameters996593 -Node: Symbol Table Access997828 -Node: Symbol table by name998340 -Node: Symbol table by cookie1000129 -Ref: Symbol table by cookie-Footnote-11004281 -Node: Cached values1004345 -Ref: Cached values-Footnote-11007852 -Node: Array Manipulation1007943 -Ref: Array Manipulation-Footnote-11009034 -Node: Array Data Types1009071 -Ref: Array Data Types-Footnote-11011729 -Node: Array Functions1011821 -Node: Flattening Arrays1015679 -Node: Creating Arrays1022587 -Node: Redirection API1027356 -Node: Extension API Variables1030187 -Node: Extension Versioning1030820 -Ref: gawk-api-version1031257 -Node: Extension API Informational Variables1032985 -Node: Extension API Boilerplate1034049 -Node: Changes from API V11037911 -Node: Finding Extensions1038571 -Node: Extension Example1039130 -Node: Internal File Description1039928 -Node: Internal File Ops1044008 -Ref: Internal File Ops-Footnote-11055408 -Node: Using Internal File Ops1055548 -Ref: Using Internal File Ops-Footnote-11057931 -Node: Extension Samples1058205 -Node: Extension Sample File Functions1059734 -Node: Extension Sample Fnmatch1067383 -Node: Extension Sample Fork1068870 -Node: Extension Sample Inplace1070088 -Node: Extension Sample Ord1073298 -Node: Extension Sample Readdir1074134 -Ref: table-readdir-file-types1075023 -Node: Extension Sample Revout1075828 -Node: Extension Sample Rev2way1076417 -Node: Extension Sample Read write array1077157 -Node: Extension Sample Readfile1079099 -Node: Extension Sample Time1080194 -Node: Extension Sample API Tests1081542 -Node: gawkextlib1082034 -Node: Extension summary1084481 -Node: Extension Exercises1088183 -Node: Language History1089681 -Node: V7/SVR3.11091337 -Node: SVR41093489 -Node: POSIX1094923 -Node: BTL1096302 -Node: POSIX/GNU1097031 -Node: Feature History1102893 -Node: Common Extensions1117263 -Node: Ranges and Locales1118546 -Ref: Ranges and Locales-Footnote-11123162 -Ref: Ranges and Locales-Footnote-21123189 -Ref: Ranges and Locales-Footnote-31123424 -Node: Contributors1123645 -Node: History summary1129205 -Node: Installation1130585 -Node: Gawk Distribution1131529 -Node: Getting1132013 -Node: Extracting1132974 -Node: Distribution contents1134612 -Node: Unix Installation1140697 -Node: Quick Installation1141379 -Node: Shell Startup Files1143793 -Node: Additional Configuration Options1144871 -Node: Configuration Philosophy1146676 -Node: Non-Unix Installation1149045 -Node: PC Installation1149505 -Node: PC Binary Installation1150343 -Node: PC Compiling1150778 -Node: PC Using1151895 -Node: Cygwin1154940 -Node: MSYS1155710 -Node: VMS Installation1156211 -Node: VMS Compilation1157002 -Ref: VMS Compilation-Footnote-11158231 -Node: VMS Dynamic Extensions1158289 -Node: VMS Installation Details1159974 -Node: VMS Running1162227 -Node: VMS GNV1166506 -Node: VMS Old Gawk1167241 -Node: Bugs1167712 -Node: Bug address1168375 -Node: Usenet1170772 -Node: Maintainers1171547 -Node: Other Versions1172923 -Node: Installation summary1179507 -Node: Notes1180542 -Node: Compatibility Mode1181407 -Node: Additions1182189 -Node: Accessing The Source1183114 -Node: Adding Code1184549 -Node: New Ports1190768 -Node: Derived Files1195256 -Ref: Derived Files-Footnote-11200741 -Ref: Derived Files-Footnote-21200776 -Ref: Derived Files-Footnote-31201374 -Node: Future Extensions1201488 -Node: Implementation Limitations1202146 -Node: Extension Design1203329 -Node: Old Extension Problems1204483 -Ref: Old Extension Problems-Footnote-11206001 -Node: Extension New Mechanism Goals1206058 -Ref: Extension New Mechanism Goals-Footnote-11209422 -Node: Extension Other Design Decisions1209611 -Node: Extension Future Growth1211724 -Node: Old Extension Mechanism1212560 -Node: Notes summary1214323 -Node: Basic Concepts1215505 -Node: Basic High Level1216186 -Ref: figure-general-flow1216468 -Ref: figure-process-flow1217153 -Ref: Basic High Level-Footnote-11220454 -Node: Basic Data Typing1220639 -Node: Glossary1223967 -Node: Copying1255914 -Node: GNU Free Documentation License1293453 -Node: Index1318571 +Ref: General Data Types-Footnote-1963823 +Node: Memory Allocation Functions964122 +Ref: Memory Allocation Functions-Footnote-1966967 +Node: Constructor Functions967066 +Node: Registration Functions969028 +Node: Extension Functions969713 +Node: Exit Callback Functions974911 +Node: Extension Version String976161 +Node: Input Parsers976824 +Node: Output Wrappers986706 +Node: Two-way processors991218 +Node: Printing Messages993483 +Ref: Printing Messages-Footnote-1994654 +Node: Updating ERRNO994807 +Node: Requesting Values995546 +Ref: table-value-types-returned996283 +Node: Accessing Parameters997166 +Node: Symbol Table Access998401 +Node: Symbol table by name998913 +Node: Symbol table by cookie1000702 +Ref: Symbol table by cookie-Footnote-11004873 +Node: Cached values1004937 +Ref: Cached values-Footnote-11008458 +Node: Array Manipulation1008549 +Ref: Array Manipulation-Footnote-11009640 +Node: Array Data Types1009677 +Ref: Array Data Types-Footnote-11012335 +Node: Array Functions1012427 +Node: Flattening Arrays1016285 +Node: Creating Arrays1023193 +Node: Redirection API1027962 +Node: Extension API Variables1030793 +Node: Extension Versioning1031426 +Ref: gawk-api-version1031863 +Node: Extension API Informational Variables1033591 +Node: Extension API Boilerplate1034655 +Node: Changes from API V11038517 +Node: Finding Extensions1039177 +Node: Extension Example1039736 +Node: Internal File Description1040534 +Node: Internal File Ops1044614 +Ref: Internal File Ops-Footnote-11056014 +Node: Using Internal File Ops1056154 +Ref: Using Internal File Ops-Footnote-11058537 +Node: Extension Samples1058811 +Node: Extension Sample File Functions1060340 +Node: Extension Sample Fnmatch1067989 +Node: Extension Sample Fork1069476 +Node: Extension Sample Inplace1070694 +Node: Extension Sample Ord1073904 +Node: Extension Sample Readdir1074740 +Ref: table-readdir-file-types1075629 +Node: Extension Sample Revout1076434 +Node: Extension Sample Rev2way1077023 +Node: Extension Sample Read write array1077763 +Node: Extension Sample Readfile1079705 +Node: Extension Sample Time1080800 +Node: Extension Sample API Tests1082148 +Node: gawkextlib1082640 +Node: Extension summary1085087 +Node: Extension Exercises1088789 +Node: Language History1090287 +Node: V7/SVR3.11091943 +Node: SVR41094095 +Node: POSIX1095529 +Node: BTL1096908 +Node: POSIX/GNU1097637 +Node: Feature History1103499 +Node: Common Extensions1117869 +Node: Ranges and Locales1119152 +Ref: Ranges and Locales-Footnote-11123768 +Ref: Ranges and Locales-Footnote-21123795 +Ref: Ranges and Locales-Footnote-31124030 +Node: Contributors1124251 +Node: History summary1129811 +Node: Installation1131191 +Node: Gawk Distribution1132135 +Node: Getting1132619 +Node: Extracting1133580 +Node: Distribution contents1135218 +Node: Unix Installation1141303 +Node: Quick Installation1141985 +Node: Shell Startup Files1144399 +Node: Additional Configuration Options1145477 +Node: Configuration Philosophy1147282 +Node: Non-Unix Installation1149651 +Node: PC Installation1150111 +Node: PC Binary Installation1150949 +Node: PC Compiling1151384 +Node: PC Using1152501 +Node: Cygwin1155546 +Node: MSYS1156316 +Node: VMS Installation1156817 +Node: VMS Compilation1157608 +Ref: VMS Compilation-Footnote-11158837 +Node: VMS Dynamic Extensions1158895 +Node: VMS Installation Details1160580 +Node: VMS Running1162833 +Node: VMS GNV1167112 +Node: VMS Old Gawk1167847 +Node: Bugs1168318 +Node: Bug address1168981 +Node: Usenet1171378 +Node: Maintainers1172153 +Node: Other Versions1173529 +Node: Installation summary1180113 +Node: Notes1181148 +Node: Compatibility Mode1182013 +Node: Additions1182795 +Node: Accessing The Source1183720 +Node: Adding Code1185155 +Node: New Ports1191374 +Node: Derived Files1195862 +Ref: Derived Files-Footnote-11201347 +Ref: Derived Files-Footnote-21201382 +Ref: Derived Files-Footnote-31201980 +Node: Future Extensions1202094 +Node: Implementation Limitations1202752 +Node: Extension Design1203935 +Node: Old Extension Problems1205089 +Ref: Old Extension Problems-Footnote-11206607 +Node: Extension New Mechanism Goals1206664 +Ref: Extension New Mechanism Goals-Footnote-11210028 +Node: Extension Other Design Decisions1210217 +Node: Extension Future Growth1212330 +Node: Old Extension Mechanism1213166 +Node: Notes summary1214929 +Node: Basic Concepts1216111 +Node: Basic High Level1216792 +Ref: figure-general-flow1217074 +Ref: figure-process-flow1217759 +Ref: Basic High Level-Footnote-11221060 +Node: Basic Data Typing1221245 +Node: Glossary1224573 +Node: Copying1256520 +Node: GNU Free Documentation License1294059 +Node: Index1319177 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 4998f81e..35db3479 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -32559,7 +32559,8 @@ multibyte encoding. @itemx @ @ @ @ AWK_STRING, @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_REGEX @itemx @} awk_valtype_t; This @code{enum} indicates the type of a value. It is used in the following @code{struct}. @@ -32579,6 +32580,7 @@ The @code{val_type} member indicates what kind of value the @code{union} holds, and each member is of the appropriate type. @item #define str_value@ @ @ @ @ @ u.s +@itemx #define regex_value@ @ @ @ str_value @itemx #define num_value@ @ @ @ @ @ u.d @itemx #define array_cookie@ @ @ u.a @itemx #define scalar_cookie@ @ u.scl @@ -32599,7 +32601,7 @@ and in more detail in @ref{Cached values}. @end table -Scalar values in @command{awk} are either numbers or strings. The +Scalar values in @command{awk} are numbers, strings, or typed regexps. The @code{awk_value_t} struct represents values. The @code{val_type} member indicates what is in the @code{union}. @@ -32608,6 +32610,12 @@ require more work. Because @command{gawk} allows embedded @sc{nul} bytes in string values, a string must be represented as a pair containing a data pointer and length. This is the @code{awk_string_t} type. +Typed regexp values (@pxref{Strong Regexp Constants}) are not of +much use to extension functions. Extension functions can tell that +they've received them, and create them for scalar values. Otherwise, +they can examine the text of the regexp through @code{regex_value.str} +and @code{regex_value.len}. + Identifiers (i.e., the names of global variables) can be associated with either scalar values or with arrays. In addition, @command{gawk} provides true arrays of arrays, where any given array element can @@ -32774,6 +32782,11 @@ It returns @code{result}. @itemx make_number(double num, awk_value_t *result); This function simply creates a numeric value in the @code{awk_value_t} variable pointed to by @code{result}. + +@item static inline awk_value_t * +@itemx make_regex(const char *string, size_t length, awk_value_t *result); +This function creates a strongly typed regexp value. +@code{string} is the regular expression of length @code{len}. @end table @node Registration Functions @@ -33458,6 +33471,7 @@ value type, as appropriate. This behavior is summarized in @float Table,table-value-types-returned @caption{API value types returned} +@c FIXME: This needs doing. @docbook <informaltable> <tgroup cols="6"> @@ -33533,6 +33547,7 @@ value type, as appropriate. This behavior is summarized in </informaltable> @end docbook +@c FIXME: This needs doing. @ifnotplaintext @ifnotdocbook @multitable @columnfractions .50 .50 @@ -33555,27 +33570,29 @@ value type, as appropriate. This behavior is summarized in @end ifnotplaintext @ifplaintext @example - +-------------------------------------------------+ - | Type of Actual Value: | - +------------+------------+-----------+-----------+ - | String | Number | Array | Undefined | -+-----------+-----------+------------+------------+-----------+-----------+ -| | String | String | String | False | False | -| |-----------+------------+------------+-----------+-----------+ -| | Number | Number if | Number | False | False | -| | | can be | | | | -| | | converted, | | | | -| | | else false | | | | -| |-----------+------------+------------+-----------+-----------+ -| Type | Array | False | False | Array | False | -| Requested |-----------+------------+------------+-----------+-----------+ -| | Scalar | Scalar | Scalar | False | False | -| |-----------+------------+------------+-----------+-----------+ -| | Undefined | String | Number | Array | Undefined | -| |-----------+------------+------------+-----------+-----------+ -| | Value | False | False | False | False | -| | cookie | | | | | -+-----------+-----------+------------+------------+-----------+-----------+ + +-------------------------------------------------------------+ + | Type of Actual Value: | + +------------+------------+-----------+-----------+-----------+ + | String | Number | Regex | Array | Undefined | ++-----------+-----------+------------+------------+-----------+-----------+-----------+ +| | String | String | String | String | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Number | Number if | Number | false | false | false | +| | | can be | | | | | +| | | converted, | | | | | +| | | else false | | | | | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Regex | false | false | Regex | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| Type | Array | false | false | false | Array | false | +| Requested +-----------+------------+------------+-----------+-----------+-----------+ +| | Scalar | Scalar | Scalar | Scalar | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Undefined | String | Number | Regex | Array | Undefined | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Value | false | false | false | false | false | +| | Cookie | | | | | | ++-----------+-----------+------------+------------+-----------+-----------+-----------+ @end example @end ifplaintext @end float @@ -33675,7 +33692,7 @@ Return false if the value cannot be retrieved. @item awk_bool_t sym_update_scalar(awk_scalar_t cookie, awk_value_t *value); Update the value associated with a scalar cookie. Return false if -the new value is not of type @code{AWK_STRING} or @code{AWK_NUMBER}. +the new value is not of type @code{AWK_STRING}, @code{AWK_REGEX}, or @code{AWK_NUMBER}. Here too, the predefined variables may not be updated. @end table @@ -33796,7 +33813,7 @@ is what the routines in this @value{SECTION} let you do. The functions are as f @table @code @item awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result); Create a cached string or numeric value from @code{value} for -efficient later assignment. Only values of type @code{AWK_NUMBER} +efficient later assignment. Only values of type @code{AWK_NUMBER}, @code{AWK_REGEX}, and @code{AWK_STRING} are allowed. Any other type is rejected. @code{AWK_UNDEFINED} could be allowed, but doing so would result in inferior performance. @@ -34540,7 +34557,7 @@ debugging: @float Table,gawk-api-version @caption{gawk API version constants} @multitable {@b{API Version}} {@code{gawk_api_major_version}} {@code{GAWK_API_MAJOR_VERSION}} -@headitem API Version @tab C preprocessor define @tab enum constant +@headitem API Version @tab C Preprocessor Define @tab enum constant @item Major @tab @code{gawk_api_major_version} @tab @code{GAWK_API_MAJOR_VERSION} @item Minor @tab @code{gawk_api_minor_version} @tab @code{GAWK_API_MINOR_VERSION} @end multitable diff --git a/doc/gawktexi.in b/doc/gawktexi.in index ca571514..f7f232a9 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -31573,7 +31573,8 @@ multibyte encoding. @itemx @ @ @ @ AWK_STRING, @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_REGEX @itemx @} awk_valtype_t; This @code{enum} indicates the type of a value. It is used in the following @code{struct}. @@ -31593,6 +31594,7 @@ The @code{val_type} member indicates what kind of value the @code{union} holds, and each member is of the appropriate type. @item #define str_value@ @ @ @ @ @ u.s +@itemx #define regex_value@ @ @ @ str_value @itemx #define num_value@ @ @ @ @ @ u.d @itemx #define array_cookie@ @ @ u.a @itemx #define scalar_cookie@ @ u.scl @@ -31613,7 +31615,7 @@ and in more detail in @ref{Cached values}. @end table -Scalar values in @command{awk} are either numbers or strings. The +Scalar values in @command{awk} are numbers, strings, or typed regexps. The @code{awk_value_t} struct represents values. The @code{val_type} member indicates what is in the @code{union}. @@ -31622,6 +31624,12 @@ require more work. Because @command{gawk} allows embedded @sc{nul} bytes in string values, a string must be represented as a pair containing a data pointer and length. This is the @code{awk_string_t} type. +Typed regexp values (@pxref{Strong Regexp Constants}) are not of +much use to extension functions. Extension functions can tell that +they've received them, and create them for scalar values. Otherwise, +they can examine the text of the regexp through @code{regex_value.str} +and @code{regex_value.len}. + Identifiers (i.e., the names of global variables) can be associated with either scalar values or with arrays. In addition, @command{gawk} provides true arrays of arrays, where any given array element can @@ -31788,6 +31796,11 @@ It returns @code{result}. @itemx make_number(double num, awk_value_t *result); This function simply creates a numeric value in the @code{awk_value_t} variable pointed to by @code{result}. + +@item static inline awk_value_t * +@itemx make_regex(const char *string, size_t length, awk_value_t *result); +This function creates a strongly typed regexp value. +@code{string} is the regular expression of length @code{len}. @end table @node Registration Functions @@ -32472,6 +32485,7 @@ value type, as appropriate. This behavior is summarized in @float Table,table-value-types-returned @caption{API value types returned} +@c FIXME: This needs doing. @docbook <informaltable> <tgroup cols="6"> @@ -32547,6 +32561,7 @@ value type, as appropriate. This behavior is summarized in </informaltable> @end docbook +@c FIXME: This needs doing. @ifnotplaintext @ifnotdocbook @multitable @columnfractions .50 .50 @@ -32569,27 +32584,29 @@ value type, as appropriate. This behavior is summarized in @end ifnotplaintext @ifplaintext @example - +-------------------------------------------------+ - | Type of Actual Value: | - +------------+------------+-----------+-----------+ - | String | Number | Array | Undefined | -+-----------+-----------+------------+------------+-----------+-----------+ -| | String | String | String | False | False | -| |-----------+------------+------------+-----------+-----------+ -| | Number | Number if | Number | False | False | -| | | can be | | | | -| | | converted, | | | | -| | | else false | | | | -| |-----------+------------+------------+-----------+-----------+ -| Type | Array | False | False | Array | False | -| Requested |-----------+------------+------------+-----------+-----------+ -| | Scalar | Scalar | Scalar | False | False | -| |-----------+------------+------------+-----------+-----------+ -| | Undefined | String | Number | Array | Undefined | -| |-----------+------------+------------+-----------+-----------+ -| | Value | False | False | False | False | -| | cookie | | | | | -+-----------+-----------+------------+------------+-----------+-----------+ + +-------------------------------------------------------------+ + | Type of Actual Value: | + +------------+------------+-----------+-----------+-----------+ + | String | Number | Regex | Array | Undefined | ++-----------+-----------+------------+------------+-----------+-----------+-----------+ +| | String | String | String | String | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Number | Number if | Number | false | false | false | +| | | can be | | | | | +| | | converted, | | | | | +| | | else false | | | | | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Regex | false | false | Regex | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| Type | Array | false | false | false | Array | false | +| Requested +-----------+------------+------------+-----------+-----------+-----------+ +| | Scalar | Scalar | Scalar | Scalar | false | false | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Undefined | String | Number | Regex | Array | Undefined | +| +-----------+------------+------------+-----------+-----------+-----------+ +| | Value | false | false | false | false | false | +| | Cookie | | | | | | ++-----------+-----------+------------+------------+-----------+-----------+-----------+ @end example @end ifplaintext @end float @@ -32689,7 +32706,7 @@ Return false if the value cannot be retrieved. @item awk_bool_t sym_update_scalar(awk_scalar_t cookie, awk_value_t *value); Update the value associated with a scalar cookie. Return false if -the new value is not of type @code{AWK_STRING} or @code{AWK_NUMBER}. +the new value is not of type @code{AWK_STRING}, @code{AWK_REGEX}, or @code{AWK_NUMBER}. Here too, the predefined variables may not be updated. @end table @@ -32810,7 +32827,7 @@ is what the routines in this @value{SECTION} let you do. The functions are as f @table @code @item awk_bool_t create_value(awk_value_t *value, awk_value_cookie_t *result); Create a cached string or numeric value from @code{value} for -efficient later assignment. Only values of type @code{AWK_NUMBER} +efficient later assignment. Only values of type @code{AWK_NUMBER}, @code{AWK_REGEX}, and @code{AWK_STRING} are allowed. Any other type is rejected. @code{AWK_UNDEFINED} could be allowed, but doing so would result in inferior performance. @@ -33554,7 +33571,7 @@ debugging: @float Table,gawk-api-version @caption{gawk API version constants} @multitable {@b{API Version}} {@code{gawk_api_major_version}} {@code{GAWK_API_MAJOR_VERSION}} -@headitem API Version @tab C preprocessor define @tab enum constant +@headitem API Version @tab C Preprocessor Define @tab enum constant @item Major @tab @code{gawk_api_major_version} @tab @code{GAWK_API_MAJOR_VERSION} @item Minor @tab @code{gawk_api_minor_version} @tab @code{GAWK_API_MINOR_VERSION} @end multitable |