diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-05-03 09:46:35 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-05-03 09:46:35 -0400 |
commit | ffb353c999bd3d5785b92a3aad78a96ff03a4ced (patch) | |
tree | a83b8a673d1529debe46bfb098355505b5595b32 | |
parent | 78169694440b5258ddb20c4d1fe0eb445a479e1f (diff) | |
download | egawk-ffb353c999bd3d5785b92a3aad78a96ff03a4ced.tar.gz egawk-ffb353c999bd3d5785b92a3aad78a96ff03a4ced.tar.bz2 egawk-ffb353c999bd3d5785b92a3aad78a96ff03a4ced.zip |
Add CPP #defines for gawk_api_major_version and gawk_api_minor_version.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 218 | ||||
-rw-r--r-- | doc/gawk.texi | 21 | ||||
-rw-r--r-- | doc/gawktexi.in | 21 | ||||
-rw-r--r-- | gawkapi.h | 7 |
6 files changed, 150 insertions, 127 deletions
@@ -1,3 +1,8 @@ +2016-05-02 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * gawkapi.h (gawk_api_major_version, gawk_api_minor_version): Add + CPP #define values to support conditional compilation. + 2016-05-02 Arnold D. Robbins <arnold@skeeve.com> * dfa.h, dfa.c: Sync with grep. diff --git a/doc/ChangeLog b/doc/ChangeLog index 903c78f6..ba34c1c3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-02 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * gawktexi.in: Document new CPP defines gawk_api_major_version and + gawk_api_minor_version. + 2016-04-13 Arnold D. Robbins <arnold@skeeve.com> * gawkinet.texi: Some general cleanups. Remove stuff commented diff --git a/doc/gawk.info b/doc/gawk.info index c773fb9e..93f2e4d7 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -24634,13 +24634,16 @@ File: gawk.info, Node: Extension Versioning, Next: Extension API Informational ............................................. The API provides both a "major" and a "minor" version number. The API -versions are available at compile time as constants: +versions are available at compile time as C preprocessor defines to +support conditional compilation, and as enum constants to facilitate +debugging: -'GAWK_API_MAJOR_VERSION' - The major version of the API +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 -'GAWK_API_MINOR_VERSION' - The minor version of the API +Table 16.2: gawk API version constants The minor version increases when new functions are added to the API. Such new functions are always added to the end of the API 'struct'. @@ -25828,7 +25831,7 @@ number and the file name, separated by a forward slash character. On systems where the directory entry contains the file type, the record has a third field (also separated by a slash), which is a single letter indicating the type of the file. The letters and their corresponding -file types are shown in *note Table 16.2: table-readdir-file-types. +file types are shown in *note Table 16.3: table-readdir-file-types. Letter File type -------------------------------------------------------------------------- @@ -25841,7 +25844,7 @@ Letter File type 's' Socket 'u' Anything else (unknown) -Table 16.2: File types returned by the 'readdir' extension +Table 16.3: File types returned by the 'readdir' extension On systems without the file type information, the third field is always 'u'. @@ -35127,105 +35130,106 @@ Node: Flattening Arrays988937 Node: Creating Arrays995845 Node: Extension API Variables1000616 Node: Extension Versioning1001252 -Node: Extension API Informational Variables1003143 -Node: Extension API Boilerplate1004207 -Node: Finding Extensions1008021 -Node: Extension Example1008580 -Node: Internal File Description1009378 -Node: Internal File Ops1013458 -Ref: Internal File Ops-Footnote-11025220 -Node: Using Internal File Ops1025360 -Ref: Using Internal File Ops-Footnote-11027743 -Node: Extension Samples1028017 -Node: Extension Sample File Functions1029546 -Node: Extension Sample Fnmatch1037195 -Node: Extension Sample Fork1038682 -Node: Extension Sample Inplace1039900 -Node: Extension Sample Ord1043110 -Node: Extension Sample Readdir1043946 -Ref: table-readdir-file-types1044835 -Node: Extension Sample Revout1045640 -Node: Extension Sample Rev2way1046229 -Node: Extension Sample Read write array1046969 -Node: Extension Sample Readfile1048911 -Node: Extension Sample Time1050006 -Node: Extension Sample API Tests1051354 -Node: gawkextlib1051846 -Node: Extension summary1054270 -Node: Extension Exercises1057962 -Node: Language History1059459 -Node: V7/SVR3.11061115 -Node: SVR41063267 -Node: POSIX1064701 -Node: BTL1066080 -Node: POSIX/GNU1066809 -Node: Feature History1072330 -Node: Common Extensions1085659 -Node: Ranges and Locales1086942 -Ref: Ranges and Locales-Footnote-11091558 -Ref: Ranges and Locales-Footnote-21091585 -Ref: Ranges and Locales-Footnote-31091820 -Node: Contributors1092041 -Node: History summary1097610 -Node: Installation1098990 -Node: Gawk Distribution1099934 -Node: Getting1100418 -Node: Extracting1101379 -Node: Distribution contents1103017 -Node: Unix Installation1108768 -Node: Quick Installation1109384 -Node: Additional Configuration Options1111811 -Node: Configuration Philosophy1113615 -Node: Non-Unix Installation1115984 -Node: PC Installation1116442 -Node: PC Binary Installation1117762 -Node: PC Compiling1119614 -Ref: PC Compiling-Footnote-11122638 -Node: PC Testing1122747 -Node: PC Using1123927 -Node: Cygwin1128041 -Node: MSYS1128811 -Node: VMS Installation1129312 -Node: VMS Compilation1130103 -Ref: VMS Compilation-Footnote-11131332 -Node: VMS Dynamic Extensions1131390 -Node: VMS Installation Details1133075 -Node: VMS Running1135328 -Node: VMS GNV1139607 -Node: VMS Old Gawk1140342 -Node: Bugs1140813 -Node: Other Versions1145010 -Node: Installation summary1151594 -Node: Notes1152652 -Node: Compatibility Mode1153517 -Node: Additions1154299 -Node: Accessing The Source1155224 -Node: Adding Code1156659 -Node: New Ports1162878 -Node: Derived Files1167366 -Ref: Derived Files-Footnote-11172851 -Ref: Derived Files-Footnote-21172886 -Ref: Derived Files-Footnote-31173484 -Node: Future Extensions1173598 -Node: Implementation Limitations1174256 -Node: Extension Design1175439 -Node: Old Extension Problems1176593 -Ref: Old Extension Problems-Footnote-11178111 -Node: Extension New Mechanism Goals1178168 -Ref: Extension New Mechanism Goals-Footnote-11181532 -Node: Extension Other Design Decisions1181721 -Node: Extension Future Growth1183834 -Node: Old Extension Mechanism1184670 -Node: Notes summary1186433 -Node: Basic Concepts1187615 -Node: Basic High Level1188296 -Ref: figure-general-flow1188578 -Ref: figure-process-flow1189263 -Ref: Basic High Level-Footnote-11192564 -Node: Basic Data Typing1192749 -Node: Glossary1196077 -Node: Copying1228023 -Node: GNU Free Documentation License1265562 -Node: Index1290680 +Ref: gawk-api-version1001689 +Node: Extension API Informational Variables1003445 +Node: Extension API Boilerplate1004509 +Node: Finding Extensions1008323 +Node: Extension Example1008882 +Node: Internal File Description1009680 +Node: Internal File Ops1013760 +Ref: Internal File Ops-Footnote-11025522 +Node: Using Internal File Ops1025662 +Ref: Using Internal File Ops-Footnote-11028045 +Node: Extension Samples1028319 +Node: Extension Sample File Functions1029848 +Node: Extension Sample Fnmatch1037497 +Node: Extension Sample Fork1038984 +Node: Extension Sample Inplace1040202 +Node: Extension Sample Ord1043412 +Node: Extension Sample Readdir1044248 +Ref: table-readdir-file-types1045137 +Node: Extension Sample Revout1045942 +Node: Extension Sample Rev2way1046531 +Node: Extension Sample Read write array1047271 +Node: Extension Sample Readfile1049213 +Node: Extension Sample Time1050308 +Node: Extension Sample API Tests1051656 +Node: gawkextlib1052148 +Node: Extension summary1054572 +Node: Extension Exercises1058264 +Node: Language History1059761 +Node: V7/SVR3.11061417 +Node: SVR41063569 +Node: POSIX1065003 +Node: BTL1066382 +Node: POSIX/GNU1067111 +Node: Feature History1072632 +Node: Common Extensions1085961 +Node: Ranges and Locales1087244 +Ref: Ranges and Locales-Footnote-11091860 +Ref: Ranges and Locales-Footnote-21091887 +Ref: Ranges and Locales-Footnote-31092122 +Node: Contributors1092343 +Node: History summary1097912 +Node: Installation1099292 +Node: Gawk Distribution1100236 +Node: Getting1100720 +Node: Extracting1101681 +Node: Distribution contents1103319 +Node: Unix Installation1109070 +Node: Quick Installation1109686 +Node: Additional Configuration Options1112113 +Node: Configuration Philosophy1113917 +Node: Non-Unix Installation1116286 +Node: PC Installation1116744 +Node: PC Binary Installation1118064 +Node: PC Compiling1119916 +Ref: PC Compiling-Footnote-11122940 +Node: PC Testing1123049 +Node: PC Using1124229 +Node: Cygwin1128343 +Node: MSYS1129113 +Node: VMS Installation1129614 +Node: VMS Compilation1130405 +Ref: VMS Compilation-Footnote-11131634 +Node: VMS Dynamic Extensions1131692 +Node: VMS Installation Details1133377 +Node: VMS Running1135630 +Node: VMS GNV1139909 +Node: VMS Old Gawk1140644 +Node: Bugs1141115 +Node: Other Versions1145312 +Node: Installation summary1151896 +Node: Notes1152954 +Node: Compatibility Mode1153819 +Node: Additions1154601 +Node: Accessing The Source1155526 +Node: Adding Code1156961 +Node: New Ports1163180 +Node: Derived Files1167668 +Ref: Derived Files-Footnote-11173153 +Ref: Derived Files-Footnote-21173188 +Ref: Derived Files-Footnote-31173786 +Node: Future Extensions1173900 +Node: Implementation Limitations1174558 +Node: Extension Design1175741 +Node: Old Extension Problems1176895 +Ref: Old Extension Problems-Footnote-11178413 +Node: Extension New Mechanism Goals1178470 +Ref: Extension New Mechanism Goals-Footnote-11181834 +Node: Extension Other Design Decisions1182023 +Node: Extension Future Growth1184136 +Node: Old Extension Mechanism1184972 +Node: Notes summary1186735 +Node: Basic Concepts1187917 +Node: Basic High Level1188598 +Ref: figure-general-flow1188880 +Ref: figure-process-flow1189565 +Ref: Basic High Level-Footnote-11192866 +Node: Basic Data Typing1193051 +Node: Glossary1196379 +Node: Copying1228325 +Node: GNU Free Documentation License1265864 +Node: Index1290982 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index d1b085f0..5864346c 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -33526,15 +33526,18 @@ information about how @command{gawk} was invoked. @cindex extension API version The API provides both a ``major'' and a ``minor'' version number. -The API versions are available at compile time as constants: - -@table @code -@item GAWK_API_MAJOR_VERSION -The major version of the API - -@item GAWK_API_MINOR_VERSION -The minor version of the API -@end table +The API versions are available at compile time as C preprocessor defines +to support conditional compilation, and as enum constants to facilitate +debugging: + +@float Table,gawk-api-version +@caption{gawk API version constants} +@multitable @columnfractions .33 .33 .33 +@headitem API Version @tab C preprocessor define @tab enum constant +@item Major @tab gawk_api_major_version @tab GAWK_API_MAJOR_VERSION +@item Minor @tab gawk_api_minor_version @tab GAWK_API_MINOR_VERSION +@end multitable +@end float The minor version increases when new functions are added to the API. Such new functions are always added to the end of the API @code{struct}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index e233a383..d704d90e 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -32617,15 +32617,18 @@ information about how @command{gawk} was invoked. @cindex extension API version The API provides both a ``major'' and a ``minor'' version number. -The API versions are available at compile time as constants: - -@table @code -@item GAWK_API_MAJOR_VERSION -The major version of the API - -@item GAWK_API_MINOR_VERSION -The minor version of the API -@end table +The API versions are available at compile time as C preprocessor defines +to support conditional compilation, and as enum constants to facilitate +debugging: + +@float Table,gawk-api-version +@caption{gawk API version constants} +@multitable @columnfractions .33 .33 .33 +@headitem API Version @tab C preprocessor define @tab enum constant +@item Major @tab gawk_api_major_version @tab GAWK_API_MAJOR_VERSION +@item Minor @tab gawk_api_minor_version @tab GAWK_API_MINOR_VERSION +@end multitable +@end float The minor version increases when new functions are added to the API. Such new functions are always added to the end of the API @code{struct}. @@ -260,10 +260,13 @@ typedef struct awk_two_way_processor { awk_const struct awk_two_way_processor *awk_const next; /* for use by gawk */ } awk_two_way_processor_t; +#define gawk_api_major_version 1 +#define gawk_api_minor_version 1 + /* Current version of the API. */ enum { - GAWK_API_MAJOR_VERSION = 1, - GAWK_API_MINOR_VERSION = 1 + GAWK_API_MAJOR_VERSION = gawk_api_major_version, + GAWK_API_MINOR_VERSION = gawk_api_minor_version }; /* A number of typedefs related to different types of values. */ |