aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-05-30 23:45:27 -0400
committerArnold D. Robbins <arnold@skeeve.com>2015-05-30 23:45:27 -0400
commit22ea6af9c93cbbfce581a00c7a41b0c92fd8507d (patch)
tree5646692c3310e7ea76073abb53e8d4b7a1b97875
parent0b876113d778d77543fd8bafef4e37fc2af72bc8 (diff)
parent501c2e5e720e3dbcb2e830c28037dd8b8d46bfcf (diff)
downloadegawk-22ea6af9c93cbbfce581a00c7a41b0c92fd8507d.tar.gz
egawk-22ea6af9c93cbbfce581a00c7a41b0c92fd8507d.tar.bz2
egawk-22ea6af9c93cbbfce581a00c7a41b0c92fd8507d.zip
Merge branch 'gawk-4.1-stable'
-rw-r--r--ChangeLog10
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/gawk.info610
-rw-r--r--doc/gawk.texi2
-rw-r--r--doc/gawktexi.in2
-rw-r--r--floatcomp.c25
-rw-r--r--helpers/ChangeLog4
-rw-r--r--helpers/mb_cur_max.c10
-rw-r--r--helpers/timeformat.c13
-rw-r--r--pc/ChangeLog8
-rw-r--r--pc/Makefile.tst9
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in3
-rw-r--r--test/checknegtime.awk22
15 files changed, 416 insertions, 316 deletions
diff --git a/ChangeLog b/ChangeLog
index 1fd67b68..ce4e8410 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-05-26 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
+
+ * floatcomp.c (count_trailing_zeros): New function.
+ This compiles to a single TZCNT instruction on the x86-64.
+ (adjust_uint): Use it to keep more high-order bits when
+ some of the lowest-order bits are zero. This implements
+ the documented behavior: "If the result cannot be represented
+ exactly as a C 'double', leading nonzero bits are removed one by
+ one until it can be represented exactly."
+
2015-05-26 Arnold D. Robbins <arnold@skeeve.com>
* regcomp.c: Fix offsets so error messages come out correct
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 70a7147c..dd671ff0 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawktexi.in (Bitwise Functions): Update results of testbits.awk.
+
2015-05-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.3: Release tar ball made.
diff --git a/doc/gawk.info b/doc/gawk.info
index 6a52baec..337c148c 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -13404,7 +13404,7 @@ This program produces the following output when run:
-| 123 = 01111011
-| 0123 = 01010011
-| 0x99 = 10011001
- -| compl(0x99) = 0xffffff66 = 11111111111111111111111101100110
+ -| compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110
-| lshift(0x99, 2) = 0x264 = 0000001001100100
-| rshift(0x99, 2) = 0x26 = 00100110
@@ -35143,309 +35143,309 @@ Ref: Time Functions-Footnote-5564193
Ref: Time Functions-Footnote-6564420
Node: Bitwise Functions564686
Ref: table-bitwise-ops565280
-Ref: Bitwise Functions-Footnote-1569588
-Node: Type Functions569761
-Node: I18N Functions570917
-Node: User-defined572568
-Node: Definition Syntax573373
-Ref: Definition Syntax-Footnote-1579060
-Node: Function Example579131
-Ref: Function Example-Footnote-1582053
-Node: Function Caveats582075
-Node: Calling A Function582593
-Node: Variable Scope583551
-Node: Pass By Value/Reference586545
-Node: Return Statement590044
-Node: Dynamic Typing593023
-Node: Indirect Calls593953
-Ref: Indirect Calls-Footnote-1604204
-Node: Functions Summary604332
-Node: Library Functions607037
-Ref: Library Functions-Footnote-1610646
-Ref: Library Functions-Footnote-2610789
-Node: Library Names610960
-Ref: Library Names-Footnote-1614421
-Ref: Library Names-Footnote-2614644
-Node: General Functions614730
-Node: Strtonum Function615833
-Node: Assert Function618855
-Node: Round Function622181
-Node: Cliff Random Function623722
-Node: Ordinal Functions624738
-Ref: Ordinal Functions-Footnote-1627801
-Ref: Ordinal Functions-Footnote-2628053
-Node: Join Function628263
-Ref: Join Function-Footnote-1630033
-Node: Getlocaltime Function630233
-Node: Readfile Function633977
-Node: Shell Quoting635951
-Node: Data File Management637352
-Node: Filetrans Function637984
-Node: Rewind Function642081
-Node: File Checking643467
-Ref: File Checking-Footnote-1644801
-Node: Empty Files645002
-Node: Ignoring Assigns646981
-Node: Getopt Function648531
-Ref: Getopt Function-Footnote-1660001
-Node: Passwd Functions660201
-Ref: Passwd Functions-Footnote-1669042
-Node: Group Functions669130
-Ref: Group Functions-Footnote-1677029
-Node: Walking Arrays677236
-Node: Library Functions Summary680246
-Node: Library Exercises681652
-Node: Sample Programs682931
-Node: Running Examples683701
-Node: Clones684429
-Node: Cut Program685653
-Node: Egrep Program695374
-Ref: Egrep Program-Footnote-1702886
-Node: Id Program702996
-Node: Split Program706676
-Ref: Split Program-Footnote-1710135
-Node: Tee Program710264
-Node: Uniq Program713054
-Node: Wc Program720480
-Ref: Wc Program-Footnote-1724735
-Node: Miscellaneous Programs724829
-Node: Dupword Program726042
-Node: Alarm Program728072
-Node: Translate Program732927
-Ref: Translate Program-Footnote-1737492
-Node: Labels Program737762
-Ref: Labels Program-Footnote-1741113
-Node: Word Sorting741197
-Node: History Sorting745269
-Node: Extract Program747104
-Node: Simple Sed754635
-Node: Igawk Program757709
-Ref: Igawk Program-Footnote-1772040
-Ref: Igawk Program-Footnote-2772242
-Ref: Igawk Program-Footnote-3772364
-Node: Anagram Program772479
-Node: Signature Program775541
-Node: Programs Summary776788
-Node: Programs Exercises778003
-Ref: Programs Exercises-Footnote-1782132
-Node: Advanced Features782223
-Node: Nondecimal Data784213
-Node: Array Sorting785804
-Node: Controlling Array Traversal786504
-Ref: Controlling Array Traversal-Footnote-1794873
-Node: Array Sorting Functions794991
-Ref: Array Sorting Functions-Footnote-1798878
-Node: Two-way I/O799074
-Ref: Two-way I/O-Footnote-1804025
-Ref: Two-way I/O-Footnote-2804212
-Node: TCP/IP Networking804294
-Node: Profiling807201
-Node: Advanced Features Summary815472
-Node: Internationalization817408
-Node: I18N and L10N818888
-Node: Explaining gettext819575
-Ref: Explaining gettext-Footnote-1824598
-Ref: Explaining gettext-Footnote-2824783
-Node: Programmer i18n824948
-Ref: Programmer i18n-Footnote-1829804
-Node: Translator i18n829853
-Node: String Extraction830647
-Ref: String Extraction-Footnote-1831780
-Node: Printf Ordering831866
-Ref: Printf Ordering-Footnote-1834652
-Node: I18N Portability834716
-Ref: I18N Portability-Footnote-1837172
-Node: I18N Example837235
-Ref: I18N Example-Footnote-1840041
-Node: Gawk I18N840114
-Node: I18N Summary840759
-Node: Debugger842100
-Node: Debugging843122
-Node: Debugging Concepts843563
-Node: Debugging Terms845372
-Node: Awk Debugging847947
-Node: Sample Debugging Session848853
-Node: Debugger Invocation849387
-Node: Finding The Bug850773
-Node: List of Debugger Commands857251
-Node: Breakpoint Control858584
-Node: Debugger Execution Control862278
-Node: Viewing And Changing Data865640
-Node: Execution Stack869014
-Node: Debugger Info870651
-Node: Miscellaneous Debugger Commands874722
-Node: Readline Support879731
-Node: Limitations880627
-Node: Debugging Summary882736
-Node: Arbitrary Precision Arithmetic883909
-Node: Computer Arithmetic885325
-Ref: table-numeric-ranges888916
-Ref: Computer Arithmetic-Footnote-1889638
-Node: Math Definitions889695
-Ref: table-ieee-formats893009
-Ref: Math Definitions-Footnote-1893612
-Node: MPFR features893717
-Node: FP Math Caution895390
-Ref: FP Math Caution-Footnote-1896462
-Node: Inexactness of computations896831
-Node: Inexact representation897791
-Node: Comparing FP Values899151
-Node: Errors accumulate900233
-Node: Getting Accuracy901666
-Node: Try To Round904376
-Node: Setting precision905275
-Ref: table-predefined-precision-strings905972
-Node: Setting the rounding mode907802
-Ref: table-gawk-rounding-modes908176
-Ref: Setting the rounding mode-Footnote-1911584
-Node: Arbitrary Precision Integers911763
-Ref: Arbitrary Precision Integers-Footnote-1916680
-Node: POSIX Floating Point Problems916829
-Ref: POSIX Floating Point Problems-Footnote-1920711
-Node: Floating point summary920749
-Node: Dynamic Extensions922939
-Node: Extension Intro924492
-Node: Plugin License925758
-Node: Extension Mechanism Outline926555
-Ref: figure-load-extension926994
-Ref: figure-register-new-function928559
-Ref: figure-call-new-function929651
-Node: Extension API Description931714
-Node: Extension API Functions Introduction933248
-Node: General Data Types938107
-Ref: General Data Types-Footnote-1944062
-Node: Memory Allocation Functions944361
-Ref: Memory Allocation Functions-Footnote-1947206
-Node: Constructor Functions947305
-Node: Registration Functions949050
-Node: Extension Functions949735
-Node: Exit Callback Functions952034
-Node: Extension Version String953284
-Node: Input Parsers953947
-Node: Output Wrappers963832
-Node: Two-way processors968344
-Node: Printing Messages970608
-Ref: Printing Messages-Footnote-1971684
-Node: Updating 'ERRNO'971837
-Node: Requesting Values972578
-Ref: table-value-types-returned973317
-Node: Accessing Parameters974200
-Node: Symbol Table Access975436
-Node: Symbol table by name975948
-Node: Symbol table by cookie977969
-Ref: Symbol table by cookie-Footnote-1982118
-Node: Cached values982182
-Ref: Cached values-Footnote-1985683
-Node: Array Manipulation985774
-Ref: Array Manipulation-Footnote-1986865
-Node: Array Data Types986902
-Ref: Array Data Types-Footnote-1989560
-Node: Array Functions989652
-Node: Flattening Arrays993511
-Node: Creating Arrays1000419
-Node: Redirection API1005191
-Node: Extension API Variables1008022
-Node: Extension Versioning1008655
-Node: Extension API Informational Variables1010546
-Node: Extension API Boilerplate1011610
-Node: Finding Extensions1015424
-Node: Extension Example1015984
-Node: Internal File Description1016782
-Node: Internal File Ops1020862
-Ref: Internal File Ops-Footnote-11032624
-Node: Using Internal File Ops1032764
-Ref: Using Internal File Ops-Footnote-11035147
-Node: Extension Samples1035422
-Node: Extension Sample File Functions1036951
-Node: Extension Sample Fnmatch1044600
-Node: Extension Sample Fork1046087
-Node: Extension Sample Inplace1047305
-Node: Extension Sample Ord1049391
-Node: Extension Sample Readdir1050227
-Ref: table-readdir-file-types1051116
-Node: Extension Sample Revout1051921
-Node: Extension Sample Rev2way1052510
-Node: Extension Sample Read write array1053250
-Node: Extension Sample Readfile1055192
-Node: Extension Sample Time1056287
-Node: Extension Sample API Tests1057635
-Node: gawkextlib1058127
-Node: Extension summary1060574
-Node: Extension Exercises1064266
-Node: Language History1065763
-Node: V7/SVR3.11067419
-Node: SVR41069572
-Node: POSIX1071006
-Node: BTL1072386
-Node: POSIX/GNU1073116
-Node: Feature History1078955
-Node: Common Extensions1092946
-Node: Ranges and Locales1094229
-Ref: Ranges and Locales-Footnote-11098845
-Ref: Ranges and Locales-Footnote-21098872
-Ref: Ranges and Locales-Footnote-31099107
-Node: Contributors1099328
-Node: History summary1104897
-Node: Installation1106277
-Node: Gawk Distribution1107222
-Node: Getting1107706
-Node: Extracting1108529
-Node: Distribution contents1110167
-Node: Unix Installation1116263
-Node: Quick Installation1116945
-Node: Shell Startup Files1119359
-Node: Additional Configuration Options1120437
-Node: Configuration Philosophy1122242
-Node: Non-Unix Installation1124612
-Node: PC Installation1125070
-Node: PC Binary Installation1126390
-Node: PC Compiling1128242
-Ref: PC Compiling-Footnote-11131266
-Node: PC Testing1131375
-Node: PC Using1132555
-Node: Cygwin1136669
-Node: MSYS1137439
-Node: VMS Installation1137940
-Node: VMS Compilation1138731
-Ref: VMS Compilation-Footnote-11139961
-Node: VMS Dynamic Extensions1140019
-Node: VMS Installation Details1141704
-Node: VMS Running1143957
-Node: VMS GNV1146798
-Node: VMS Old Gawk1147533
-Node: Bugs1148004
-Node: Other Versions1152118
-Node: Installation summary1158592
-Node: Notes1159650
-Node: Compatibility Mode1160515
-Node: Additions1161297
-Node: Accessing The Source1162222
-Node: Adding Code1163658
-Node: New Ports1169813
-Node: Derived Files1174301
-Ref: Derived Files-Footnote-11179786
-Ref: Derived Files-Footnote-21179821
-Ref: Derived Files-Footnote-31180419
-Node: Future Extensions1180533
-Node: Implementation Limitations1181191
-Node: Extension Design1182374
-Node: Old Extension Problems1183528
-Ref: Old Extension Problems-Footnote-11185046
-Node: Extension New Mechanism Goals1185103
-Ref: Extension New Mechanism Goals-Footnote-11188467
-Node: Extension Other Design Decisions1188656
-Node: Extension Future Growth1190769
-Node: Old Extension Mechanism1191605
-Node: Notes summary1193368
-Node: Basic Concepts1194550
-Node: Basic High Level1195231
-Ref: figure-general-flow1195513
-Ref: figure-process-flow1196198
-Ref: Basic High Level-Footnote-11199499
-Node: Basic Data Typing1199684
-Node: Glossary1203012
-Node: Copying1234958
-Node: GNU Free Documentation License1272497
-Node: Index1297615
+Ref: Bitwise Functions-Footnote-1569618
+Node: Type Functions569791
+Node: I18N Functions570947
+Node: User-defined572598
+Node: Definition Syntax573403
+Ref: Definition Syntax-Footnote-1579090
+Node: Function Example579161
+Ref: Function Example-Footnote-1582083
+Node: Function Caveats582105
+Node: Calling A Function582623
+Node: Variable Scope583581
+Node: Pass By Value/Reference586575
+Node: Return Statement590074
+Node: Dynamic Typing593053
+Node: Indirect Calls593983
+Ref: Indirect Calls-Footnote-1604234
+Node: Functions Summary604362
+Node: Library Functions607067
+Ref: Library Functions-Footnote-1610676
+Ref: Library Functions-Footnote-2610819
+Node: Library Names610990
+Ref: Library Names-Footnote-1614451
+Ref: Library Names-Footnote-2614674
+Node: General Functions614760
+Node: Strtonum Function615863
+Node: Assert Function618885
+Node: Round Function622211
+Node: Cliff Random Function623752
+Node: Ordinal Functions624768
+Ref: Ordinal Functions-Footnote-1627831
+Ref: Ordinal Functions-Footnote-2628083
+Node: Join Function628293
+Ref: Join Function-Footnote-1630063
+Node: Getlocaltime Function630263
+Node: Readfile Function634007
+Node: Shell Quoting635981
+Node: Data File Management637382
+Node: Filetrans Function638014
+Node: Rewind Function642111
+Node: File Checking643497
+Ref: File Checking-Footnote-1644831
+Node: Empty Files645032
+Node: Ignoring Assigns647011
+Node: Getopt Function648561
+Ref: Getopt Function-Footnote-1660031
+Node: Passwd Functions660231
+Ref: Passwd Functions-Footnote-1669072
+Node: Group Functions669160
+Ref: Group Functions-Footnote-1677059
+Node: Walking Arrays677266
+Node: Library Functions Summary680276
+Node: Library Exercises681682
+Node: Sample Programs682961
+Node: Running Examples683731
+Node: Clones684459
+Node: Cut Program685683
+Node: Egrep Program695404
+Ref: Egrep Program-Footnote-1702916
+Node: Id Program703026
+Node: Split Program706706
+Ref: Split Program-Footnote-1710165
+Node: Tee Program710294
+Node: Uniq Program713084
+Node: Wc Program720510
+Ref: Wc Program-Footnote-1724765
+Node: Miscellaneous Programs724859
+Node: Dupword Program726072
+Node: Alarm Program728102
+Node: Translate Program732957
+Ref: Translate Program-Footnote-1737522
+Node: Labels Program737792
+Ref: Labels Program-Footnote-1741143
+Node: Word Sorting741227
+Node: History Sorting745299
+Node: Extract Program747134
+Node: Simple Sed754665
+Node: Igawk Program757739
+Ref: Igawk Program-Footnote-1772070
+Ref: Igawk Program-Footnote-2772272
+Ref: Igawk Program-Footnote-3772394
+Node: Anagram Program772509
+Node: Signature Program775571
+Node: Programs Summary776818
+Node: Programs Exercises778033
+Ref: Programs Exercises-Footnote-1782162
+Node: Advanced Features782253
+Node: Nondecimal Data784243
+Node: Array Sorting785834
+Node: Controlling Array Traversal786534
+Ref: Controlling Array Traversal-Footnote-1794903
+Node: Array Sorting Functions795021
+Ref: Array Sorting Functions-Footnote-1798908
+Node: Two-way I/O799104
+Ref: Two-way I/O-Footnote-1804055
+Ref: Two-way I/O-Footnote-2804242
+Node: TCP/IP Networking804324
+Node: Profiling807231
+Node: Advanced Features Summary815502
+Node: Internationalization817438
+Node: I18N and L10N818918
+Node: Explaining gettext819605
+Ref: Explaining gettext-Footnote-1824628
+Ref: Explaining gettext-Footnote-2824813
+Node: Programmer i18n824978
+Ref: Programmer i18n-Footnote-1829834
+Node: Translator i18n829883
+Node: String Extraction830677
+Ref: String Extraction-Footnote-1831810
+Node: Printf Ordering831896
+Ref: Printf Ordering-Footnote-1834682
+Node: I18N Portability834746
+Ref: I18N Portability-Footnote-1837202
+Node: I18N Example837265
+Ref: I18N Example-Footnote-1840071
+Node: Gawk I18N840144
+Node: I18N Summary840789
+Node: Debugger842130
+Node: Debugging843152
+Node: Debugging Concepts843593
+Node: Debugging Terms845402
+Node: Awk Debugging847977
+Node: Sample Debugging Session848883
+Node: Debugger Invocation849417
+Node: Finding The Bug850803
+Node: List of Debugger Commands857281
+Node: Breakpoint Control858614
+Node: Debugger Execution Control862308
+Node: Viewing And Changing Data865670
+Node: Execution Stack869044
+Node: Debugger Info870681
+Node: Miscellaneous Debugger Commands874752
+Node: Readline Support879761
+Node: Limitations880657
+Node: Debugging Summary882766
+Node: Arbitrary Precision Arithmetic883939
+Node: Computer Arithmetic885355
+Ref: table-numeric-ranges888946
+Ref: Computer Arithmetic-Footnote-1889668
+Node: Math Definitions889725
+Ref: table-ieee-formats893039
+Ref: Math Definitions-Footnote-1893642
+Node: MPFR features893747
+Node: FP Math Caution895420
+Ref: FP Math Caution-Footnote-1896492
+Node: Inexactness of computations896861
+Node: Inexact representation897821
+Node: Comparing FP Values899181
+Node: Errors accumulate900263
+Node: Getting Accuracy901696
+Node: Try To Round904406
+Node: Setting precision905305
+Ref: table-predefined-precision-strings906002
+Node: Setting the rounding mode907832
+Ref: table-gawk-rounding-modes908206
+Ref: Setting the rounding mode-Footnote-1911614
+Node: Arbitrary Precision Integers911793
+Ref: Arbitrary Precision Integers-Footnote-1916710
+Node: POSIX Floating Point Problems916859
+Ref: POSIX Floating Point Problems-Footnote-1920741
+Node: Floating point summary920779
+Node: Dynamic Extensions922969
+Node: Extension Intro924522
+Node: Plugin License925788
+Node: Extension Mechanism Outline926585
+Ref: figure-load-extension927024
+Ref: figure-register-new-function928589
+Ref: figure-call-new-function929681
+Node: Extension API Description931744
+Node: Extension API Functions Introduction933278
+Node: General Data Types938137
+Ref: General Data Types-Footnote-1944092
+Node: Memory Allocation Functions944391
+Ref: Memory Allocation Functions-Footnote-1947236
+Node: Constructor Functions947335
+Node: Registration Functions949080
+Node: Extension Functions949765
+Node: Exit Callback Functions952064
+Node: Extension Version String953314
+Node: Input Parsers953977
+Node: Output Wrappers963862
+Node: Two-way processors968374
+Node: Printing Messages970638
+Ref: Printing Messages-Footnote-1971714
+Node: Updating 'ERRNO'971867
+Node: Requesting Values972608
+Ref: table-value-types-returned973347
+Node: Accessing Parameters974230
+Node: Symbol Table Access975466
+Node: Symbol table by name975978
+Node: Symbol table by cookie977999
+Ref: Symbol table by cookie-Footnote-1982148
+Node: Cached values982212
+Ref: Cached values-Footnote-1985713
+Node: Array Manipulation985804
+Ref: Array Manipulation-Footnote-1986895
+Node: Array Data Types986932
+Ref: Array Data Types-Footnote-1989590
+Node: Array Functions989682
+Node: Flattening Arrays993541
+Node: Creating Arrays1000449
+Node: Redirection API1005221
+Node: Extension API Variables1008052
+Node: Extension Versioning1008685
+Node: Extension API Informational Variables1010576
+Node: Extension API Boilerplate1011640
+Node: Finding Extensions1015454
+Node: Extension Example1016014
+Node: Internal File Description1016812
+Node: Internal File Ops1020892
+Ref: Internal File Ops-Footnote-11032654
+Node: Using Internal File Ops1032794
+Ref: Using Internal File Ops-Footnote-11035177
+Node: Extension Samples1035452
+Node: Extension Sample File Functions1036981
+Node: Extension Sample Fnmatch1044630
+Node: Extension Sample Fork1046117
+Node: Extension Sample Inplace1047335
+Node: Extension Sample Ord1049421
+Node: Extension Sample Readdir1050257
+Ref: table-readdir-file-types1051146
+Node: Extension Sample Revout1051951
+Node: Extension Sample Rev2way1052540
+Node: Extension Sample Read write array1053280
+Node: Extension Sample Readfile1055222
+Node: Extension Sample Time1056317
+Node: Extension Sample API Tests1057665
+Node: gawkextlib1058157
+Node: Extension summary1060604
+Node: Extension Exercises1064296
+Node: Language History1065793
+Node: V7/SVR3.11067449
+Node: SVR41069602
+Node: POSIX1071036
+Node: BTL1072416
+Node: POSIX/GNU1073146
+Node: Feature History1078985
+Node: Common Extensions1092976
+Node: Ranges and Locales1094259
+Ref: Ranges and Locales-Footnote-11098875
+Ref: Ranges and Locales-Footnote-21098902
+Ref: Ranges and Locales-Footnote-31099137
+Node: Contributors1099358
+Node: History summary1104927
+Node: Installation1106307
+Node: Gawk Distribution1107252
+Node: Getting1107736
+Node: Extracting1108559
+Node: Distribution contents1110197
+Node: Unix Installation1116293
+Node: Quick Installation1116975
+Node: Shell Startup Files1119389
+Node: Additional Configuration Options1120467
+Node: Configuration Philosophy1122272
+Node: Non-Unix Installation1124642
+Node: PC Installation1125100
+Node: PC Binary Installation1126420
+Node: PC Compiling1128272
+Ref: PC Compiling-Footnote-11131296
+Node: PC Testing1131405
+Node: PC Using1132585
+Node: Cygwin1136699
+Node: MSYS1137469
+Node: VMS Installation1137970
+Node: VMS Compilation1138761
+Ref: VMS Compilation-Footnote-11139991
+Node: VMS Dynamic Extensions1140049
+Node: VMS Installation Details1141734
+Node: VMS Running1143987
+Node: VMS GNV1146828
+Node: VMS Old Gawk1147563
+Node: Bugs1148034
+Node: Other Versions1152148
+Node: Installation summary1158622
+Node: Notes1159680
+Node: Compatibility Mode1160545
+Node: Additions1161327
+Node: Accessing The Source1162252
+Node: Adding Code1163688
+Node: New Ports1169843
+Node: Derived Files1174331
+Ref: Derived Files-Footnote-11179816
+Ref: Derived Files-Footnote-21179851
+Ref: Derived Files-Footnote-31180449
+Node: Future Extensions1180563
+Node: Implementation Limitations1181221
+Node: Extension Design1182404
+Node: Old Extension Problems1183558
+Ref: Old Extension Problems-Footnote-11185076
+Node: Extension New Mechanism Goals1185133
+Ref: Extension New Mechanism Goals-Footnote-11188497
+Node: Extension Other Design Decisions1188686
+Node: Extension Future Growth1190799
+Node: Old Extension Mechanism1191635
+Node: Notes summary1193398
+Node: Basic Concepts1194580
+Node: Basic High Level1195261
+Ref: figure-general-flow1195543
+Ref: figure-process-flow1196228
+Ref: Basic High Level-Footnote-11199529
+Node: Basic Data Typing1199714
+Node: Glossary1203042
+Node: Copying1234988
+Node: GNU Free Documentation License1272527
+Node: Index1297645

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 9d1d88f6..df53c97d 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -19363,7 +19363,7 @@ $ @kbd{gawk -f testbits.awk}
@print{} 123 = 01111011
@print{} 0123 = 01010011
@print{} 0x99 = 10011001
-@print{} compl(0x99) = 0xffffff66 = 11111111111111111111111101100110
+@print{} compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110
@print{} lshift(0x99, 2) = 0x264 = 0000001001100100
@print{} rshift(0x99, 2) = 0x26 = 00100110
@end example
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index c55557a2..0cf09842 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -18484,7 +18484,7 @@ $ @kbd{gawk -f testbits.awk}
@print{} 123 = 01111011
@print{} 0123 = 01010011
@print{} 0x99 = 10011001
-@print{} compl(0x99) = 0xffffff66 = 11111111111111111111111101100110
+@print{} compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110
@print{} lshift(0x99, 2) = 0x264 = 0000001001100100
@print{} rshift(0x99, 2) = 0x26 = 00100110
@end example
diff --git a/floatcomp.c b/floatcomp.c
index 16a6d88e..d8d35694 100644
--- a/floatcomp.c
+++ b/floatcomp.c
@@ -71,6 +71,20 @@ Please port the following code to your weird host;
#define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4))
#define DBL_FRACTION_BITS (DBL_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4))
+/* Return the number of trailing zeros in N. N must be nonzero. */
+static int
+count_trailing_zeros(uintmax_t n)
+{
+#if 3 < (__GNUC__ + (4 <= __GNUC_MINOR__)) && UINTMAX_MAX <= ULLONG_MAX
+ return __builtin_ctzll(n);
+#else
+ int i = 0;
+ for (; (n & 3) == 0; n >>= 2)
+ i += 2;
+ return i + (1 & ~n);
+#endif
+}
+
/* adjust_uint --- fiddle with values, ask Paul Eggert to explain */
uintmax_t
@@ -84,8 +98,15 @@ adjust_uint(uintmax_t n)
* This is more desirable in practice, since it means the user sees
* integers that are the same width as the AWKNUM fractions.
*/
- if (AWKNUM_FRACTION_BITS < CHAR_BIT * sizeof n)
- n &= ((uintmax_t) 1 << AWKNUM_FRACTION_BITS) - 1;
+ int wordbits = CHAR_BIT * sizeof n;
+ if (AWKNUM_FRACTION_BITS < wordbits) {
+ uintmax_t one = 1;
+ uintmax_t sentinel = one << (wordbits - AWKNUM_FRACTION_BITS);
+ int shift = count_trailing_zeros(n | sentinel);
+ uintmax_t mask = (one << AWKNUM_FRACTION_BITS) - 1;
+
+ n &= mask << shift;
+ }
return n;
}
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index 357bb09c..fb0cc109 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,7 @@
+2015-05-27 Arnold D. Robbins <arnold@skeeve.com>
+
+ * mb_cur_max.c, timeformat.c: New files.
+
2015-05-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.3: Release tar ball made.
diff --git a/helpers/mb_cur_max.c b/helpers/mb_cur_max.c
new file mode 100644
index 00000000..c36d7ef7
--- /dev/null
+++ b/helpers/mb_cur_max.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <locale.h>
+#include <stdlib.h>
+
+int main()
+{
+ setlocale(LC_ALL, "");
+ printf("MB_CUR_MAX = %lu\n", MB_CUR_MAX);
+ return 0;
+}
diff --git a/helpers/timeformat.c b/helpers/timeformat.c
new file mode 100644
index 00000000..c3d1b933
--- /dev/null
+++ b/helpers/timeformat.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <locale.h>
+#include <langinfo.h>
+
+int main(int argc, char **argv)
+{
+ setlocale(LC_ALL, "");
+ printf("D_T_FMT: %s\n", nl_langinfo(D_T_FMT));
+#ifdef _DATE_FMT
+ printf("_DATE_FMT: %s\n", nl_langinfo(_DATE_FMT));
+#endif /* _DATE_FMT */
+ return 0;
+}
diff --git a/pc/ChangeLog b/pc/ChangeLog
index a9c7ec8e..fb44a486 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,11 @@
+2015-05-29 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst (negtime): Sync with mainline.
+
+2015-05-29 Scott Deifik <scottd.mail@sbcglobal.net>
+
+ * Makefile.tst (dbugeval): Sync with mainline.
+
2015-05-19 Arnold D. Robbins <arnold@skeeve.com>
* 4.1.3: Release tar ball made.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index 8b7baa2b..a787563c 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -1201,8 +1201,10 @@ backsmalls2:
dbugeval::
@echo $@
- @$(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ @if [ -t 0 ]; then \
+ $(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \
+ $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; \
+ fi
printhuge::
@echo $@
@@ -1232,9 +1234,8 @@ paramasfunc2::
negtime::
@echo $@
- @echo Expect negtime to fail with MinGW and DJGPP
@TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/ChangeLog b/test/ChangeLog
index 47a6ed01..b80398e8 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-29 Arnold D. Robbins <arnold@skeeve.com>
+
+ * checknegtime.awk: New file.
+ * Makefile.am (negtime): Use checknegtime.awk to test results.
+ Should solve some problems with BSD and also MinGW.
+
2015-05-21 Arnold D. Robbins <arnold@skeeve.com>
* fts.awk: Really remove atime from the output.
diff --git a/test/Makefile.am b/test/Makefile.am
index fe30cb41..f13fa2fb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -137,6 +137,7 @@ EXTRA_DIST = \
charasbytes.awk \
charasbytes.in \
charasbytes.ok \
+ checknegtime.awk \
childin.awk \
childin.in \
childin.ok \
@@ -2116,8 +2117,7 @@ paramasfunc2::
negtime::
@echo $@
@TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
+ @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index cddc7a5e..08c04a02 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -394,6 +394,7 @@ EXTRA_DIST = \
charasbytes.awk \
charasbytes.in \
charasbytes.ok \
+ checknegtime.awk \
childin.awk \
childin.in \
childin.ok \
@@ -2552,7 +2553,7 @@ paramasfunc2::
negtime::
@echo $@
@TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+ @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
diff --git a/test/checknegtime.awk b/test/checknegtime.awk
new file mode 100644
index 00000000..06dfcae9
--- /dev/null
+++ b/test/checknegtime.awk
@@ -0,0 +1,22 @@
+NR == 1 {
+ # Tue Dec 15 07:00:00 GMT 1959
+ Weekday = $1
+ Month = $2
+ Day = $3
+ Time = $4
+ Timezone = $5
+ Year = $6
+}
+
+NR == 2 {
+ if (NF == 0) # MinGW gives an empty line
+ exit 0
+
+ # Some BSDs give us UTC in the timezone
+ if ($1 == Weekday && $2 == Month && $3 == Day &&
+ $4 == Time && $6 == Year)
+ exit 0
+
+ # Some other mismatch
+ exit 1
+}