diff --git a/Output/scc-test.example2-c++98-c-n.1 b/Output/scc-test.example2-c++98-c-n.1 index 58460c7..5f02805 100644 --- a/Output/scc-test.example2-c++98-c-n.1 +++ b/Output/scc-test.example2-c++98-c-n.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ diff --git a/Output/scc-test.example2-c++98-c.1 b/Output/scc-test.example2-c++98-c.1 index be97223..3d1851a 100644 --- a/Output/scc-test.example2-c++98-c.1 +++ b/Output/scc-test.example2-c++98-c.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ /* Retained comments */ diff --git a/Output/scc-test.example2-c90-c-n.1 b/Output/scc-test.example2-c90-c-n.1 index 00fda20..dbe56c2 100644 --- a/Output/scc-test.example2-c90-c-n.1 +++ b/Output/scc-test.example2-c90-c-n.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ diff --git a/Output/scc-test.example2-c90-c.1 b/Output/scc-test.example2-c90-c.1 index 818d96b..ae79384 100644 --- a/Output/scc-test.example2-c90-c.1 +++ b/Output/scc-test.example2-c90-c.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ /* Retained comments */ diff --git a/Output/scc-test.example2-c99-c-n.1 b/Output/scc-test.example2-c99-c-n.1 index 4f79bf1..9f1378e 100644 --- a/Output/scc-test.example2-c99-c-n.1 +++ b/Output/scc-test.example2-c99-c-n.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ diff --git a/Output/scc-test.example2-c99-c.1 b/Output/scc-test.example2-c99-c.1 index b7ac638..1e728e7 100644 --- a/Output/scc-test.example2-c99-c.1 +++ b/Output/scc-test.example2-c99-c.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ /* Retained comments */ diff --git a/Output/scc-test.rawstring-c++11.1 b/Output/scc-test.rawstring-c++11.1 index e156841..43b0ef6 100644 --- a/Output/scc-test.rawstring-c++11.1 +++ b/Output/scc-test.rawstring-c++11.1 @@ -13,7 +13,7 @@ #ifndef lint extern const char jlss_id_scc_rawstring_cpp[]; -const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++11.1,v 8.1 2022/05/21 19:18:57 jonathanleffler Exp $"; +const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++11.1,v 8.2 2022/05/30 00:58:35 jonathanleffler Exp $"; #endif @@ -190,3 +190,20 @@ static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; static regex incl1{R"/(\s*#\s*include\s*"([^"]*)\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)\s*)/"}; #endif + +#if defined(STRING_TYPE_DEFINED) + + + + +string str1 = "RC-21\'\\\\M2"; +string str2 = "\"\\r\\n\'\t\\\"\\\\\""; +string str3 = 'R\\\\M2'; +string str4 = '\'\\r\"\\"\\n\t\\\'\\\\\''; + + +string str1 = "RC-21\'\\\\2"; +string str2 = "\"\\\\\'\t\\\"\\\\\""; +string str3 = 'R\\\\2'; +string str4 = '\'\\\"\\\\\t\\\'\\\\\''; +#endif diff --git a/Output/scc-test.rawstring-c++14.1 b/Output/scc-test.rawstring-c++14.1 index 8b062ab..d586c9d 100644 --- a/Output/scc-test.rawstring-c++14.1 +++ b/Output/scc-test.rawstring-c++14.1 @@ -13,7 +13,7 @@ #ifndef lint extern const char jlss_id_scc_rawstring_cpp[]; -const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++14.1,v 8.1 2022/05/21 19:18:57 jonathanleffler Exp $"; +const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++14.1,v 8.2 2022/05/30 00:58:35 jonathanleffler Exp $"; #endif @@ -190,3 +190,20 @@ static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; static regex incl1{R"/(\s*#\s*include\s*"([^"]*)\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)\s*)/"}; #endif + +#if defined(STRING_TYPE_DEFINED) + + + + +string str1 = "RC-21\'\\\\M2"; +string str2 = "\"\\r\\n\'\t\\\"\\\\\""; +string str3 = 'R\\\\M2'; +string str4 = '\'\\r\"\\"\\n\t\\\'\\\\\''; + + +string str1 = "RC-21\'\\\\2"; +string str2 = "\"\\\\\'\t\\\"\\\\\""; +string str3 = 'R\\\\2'; +string str4 = '\'\\\"\\\\\t\\\'\\\\\''; +#endif diff --git a/Output/scc-test.rawstring-c++17.1 b/Output/scc-test.rawstring-c++17.1 index 1522643..a4e9d7d 100644 --- a/Output/scc-test.rawstring-c++17.1 +++ b/Output/scc-test.rawstring-c++17.1 @@ -13,7 +13,7 @@ #ifndef lint extern const char jlss_id_scc_rawstring_cpp[]; -const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++17.1,v 8.1 2022/05/21 19:18:57 jonathanleffler Exp $"; +const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c++17.1,v 8.2 2022/05/30 00:58:35 jonathanleffler Exp $"; #endif @@ -190,3 +190,20 @@ static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; static regex incl1{R"/(\s*#\s*include\s*"([^"]*)\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)\s*)/"}; #endif + +#if defined(STRING_TYPE_DEFINED) + + + + +string str1 = "RC-21\'\\\\M2"; +string str2 = "\"\\r\\n\'\t\\\"\\\\\""; +string str3 = 'R\\\\M2'; +string str4 = '\'\\r\"\\"\\n\t\\\'\\\\\''; + + +string str1 = "RC-21\'\\\\2"; +string str2 = "\"\\\\\'\t\\\"\\\\\""; +string str3 = 'R\\\\2'; +string str4 = '\'\\\"\\\\\t\\\'\\\\\''; +#endif diff --git a/Output/scc-test.rawstring-c11.1 b/Output/scc-test.rawstring-c11.1 index 370265a..d95ced1 100644 --- a/Output/scc-test.rawstring-c11.1 +++ b/Output/scc-test.rawstring-c11.1 @@ -13,7 +13,7 @@ #ifndef lint extern const char jlss_id_scc_rawstring_cpp[]; -const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c11.1,v 8.1 2022/05/21 19:18:57 jonathanleffler Exp $"; +const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring-c11.1,v 8.2 2022/05/30 00:58:35 jonathanleffler Exp $"; #endif @@ -190,3 +190,20 @@ static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; static regex incl1{R"/(\s*#\s*include\s*"([^"]*)\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)\s*)/"}; #endif + +#if defined(STRING_TYPE_DEFINED) + + + + +string str1 = "RC-21\'\\\\M2"; +string str2 = "\"\\r\\n\'\t\\\"\\\\\""; +string str3 = 'R\\\\M2'; +string str4 = '\'\\r\"\\"\\n\t\\\'\\\\\''; + + +string str1 = "RC-21\'\\\\2"; +string str2 = "\"\\\\\'\t\\\"\\\\\""; +string str3 = 'R\\\\2'; +string str4 = '\'\\\"\\\\\t\\\'\\\\\''; +#endif diff --git a/Output/scc.test-08.example2-ec.1 b/Output/scc.test-08.example2-ec.1 index 01a97bb..9344835 100644 --- a/Output/scc.test-08.example2-ec.1 +++ b/Output/scc.test-08.example2-ec.1 @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ /* Retained comments */ diff --git a/README.md b/README.md index 55b48ba..bc295de 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ described in [Remove Comments from C/C++ Code](http://stackoverflow.com/questions/2394017/) on Stack Overflow. There are currently 8 releases: +* 8.0.2 (2022-05-30) - stable release * 8.0.1 (2022-05-21) - stable release * 6.80 (2017-10-26) - stable release * 6.70 (2017-10-17) - stable release @@ -18,17 +19,25 @@ There are currently 8 releases: These are tagged release/x.yz. The code is all on branch master. +### Version 8.0.2 - 2022-05-30 + +A bug fix release, dealing with GitHub issue 2, a bug in the handling of +regular strings (and also character constants) reported by Oleg +Skinderev. + ### Version 8.0.1 - 2022-05-21 -Primarily a bug fix release, dealing with a problem in C++ 'raw string' -handling reported by Oleg Skinderev via GitHub. +Primarily a bug fix release, dealing with GitHub issue 1, a bug in C++ +'raw string' handling reported by Oleg Skinderev. -However, prior to that, 'internal' releases 7.00 (2018-11-1), 7.10 +However, prior to that, 'internal' releases 7.00 (2018-11-11), 7.10 (2018-11-12), 7.20 (2018-11-21), 7.30 (2019-01-27), 7.40 (2019-05-01) 7.50 (2020-03-03), 7.80.0 (2022-01-06) and 8.0.0 (2022-04-07) had been created. These versions are not directly reflected in this Git repository, but the changes are present in 8.0.1. +If you have an urgent need for intermediate versions (why?), contact +Jonathan Leffler by email. By default, SCC now strips trailing blanks; use the `-t` option to keep them. @@ -37,8 +46,8 @@ preprocessing number, even though it is isn't a valid octal constant. The `-f` (features) option lists the features and exits (rather than trying to process a file too). The version numbering was changed to 'semantic versioning' -(https://emver.org/) and is now managed independently of the RCS file -version numbers (which is still used to manage the 'internal releases'). +(https://semver.org/) and is now managed independently of the RCS file +version numbers (RCS is still used to manage the 'internal releases'). ### Version 6.80 - 2017-10-26 diff --git a/errhelp.c b/errhelp.c index 60d54a4..a8d047d 100644 --- a/errhelp.c +++ b/errhelp.c @@ -5,7 +5,7 @@ @(#)Purpose: Print usage and help message in standard format. @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2007-2022 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/filter.c b/filter.c index f0decfd..82e7d86 100644 --- a/filter.c +++ b/filter.c @@ -5,7 +5,7 @@ @(#)Purpose: Classic File Filter @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1987-89,1991,1993,1996-99,2002-05,2008,2012,2014-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/filter.h b/filter.h index 5c252f8..614e5db 100644 --- a/filter.h +++ b/filter.h @@ -5,7 +5,7 @@ @(#)Purpose: Header for filter functions @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1993,1995-98,2003-04,2006,2008,2014-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/filterio.c b/filterio.c index 746c838..b910bda 100644 --- a/filterio.c +++ b/filterio.c @@ -5,7 +5,7 @@ @(#)Purpose: Perform standardized I/O error check for filter programs @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2003-2019 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/posixver.h b/posixver.h index 245d92b..9b71ff3 100644 --- a/posixver.h +++ b/posixver.h @@ -5,7 +5,7 @@ @(#)Purpose: Request appropriate POSIX and X/Open Support @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2010-2017 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/scc-8.0.1.sum b/scc-8.0.1.sum deleted file mode 100644 index 9a54965..0000000 --- a/scc-8.0.1.sum +++ /dev/null @@ -1 +0,0 @@ -SHA-256 de47b0ecc2bcd5fb76c3ca019d3522d026098ddbe9295e7bc2a1bf7286b0e71e 17818 scc-8.0.1.sha diff --git a/scc-8.0.1.sha b/scc-8.0.2.sha similarity index 82% rename from scc-8.0.1.sha rename to scc-8.0.2.sha index 35cb022..659d4a9 100644 --- a/scc-8.0.1.sha +++ b/scc-8.0.2.sha @@ -29,25 +29,25 @@ SHA-256 117315ef7c433360e4a6c05cc856c5b6dfe16989030a8014c9ef6ec8eaf47798 11 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.binary-c++17.2 SHA-256 117315ef7c433360e4a6c05cc856c5b6dfe16989030a8014c9ef6ec8eaf47798 113 Output/scc-test.binary-c.1 SHA-256 041491dcf54c82efd7a234d171e72930be91f41dedb9172a9c4c49ab3f2de2da 995 Output/scc-test.binary-c.2 -SHA-256 9084429138b364d6d046f493aa52b0f7ac24da3e0a0ec95081ec18aa50c1b523 578 Output/scc-test.example2-c++98-c-n.1 +SHA-256 3bcf66cbf18873a34577ed2396368dc1755f58266fde643f583de6d500b730f6 578 Output/scc-test.example2-c++98-c-n.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c++98-c-n.2 -SHA-256 1cfa192bc0f8013dfc5f287d1e1afce524a586cc0b4e353d68346d254b1872d6 572 Output/scc-test.example2-c++98-c.1 +SHA-256 6f3b48e9949fcb27e782d4365c16720e755d05172955aa642fb2dd3c10436fa0 572 Output/scc-test.example2-c++98-c.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c++98-c.2 SHA-256 08d24129762ad9863ba06bfcd06d74d260fe35bb493996e1fa8d5c100ea5d7d1 335 Output/scc-test.example2-c++98-n.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c++98-n.2 SHA-256 560827e6079cddf4c8974fdb03d4555ab7d989bd5ffc73d558a5d668791c21dd 327 Output/scc-test.example2-c++98.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c++98.2 -SHA-256 f199f55af39589f9beb5cbf35489aa43ff90ecda6c63c56fa3328136dc0c3392 436 Output/scc-test.example2-c90-c-n.1 +SHA-256 a1f6e3b13c6693f2f39ee20b504eca3c29c6d7278cddd932f3cfe98f8df5fb0a 436 Output/scc-test.example2-c90-c-n.1 SHA-256 32ff2a26ea368003ec9739e06de43eb142ae17b7c2ca11ba93da5aee2d0309b2 352 Output/scc-test.example2-c90-c-n.2 -SHA-256 19c66d9bf268b610ee0d449f160e612466773a6c71588a5d40770397a07003f7 426 Output/scc-test.example2-c90-c.1 +SHA-256 4aa88124b800534f6229a3af53ca656e414aa9e287b1f8a3d4ada2cd92b417fa 426 Output/scc-test.example2-c90-c.1 SHA-256 32ff2a26ea368003ec9739e06de43eb142ae17b7c2ca11ba93da5aee2d0309b2 352 Output/scc-test.example2-c90-c.2 SHA-256 3b11426a843c80c7a717d92c4d452022647bdfb80384a8ce87588b3e5dfe47cd 480 Output/scc-test.example2-c90-n.1 SHA-256 32ff2a26ea368003ec9739e06de43eb142ae17b7c2ca11ba93da5aee2d0309b2 352 Output/scc-test.example2-c90-n.2 SHA-256 8523d4352f0ed14d61fb67cc43fd78e3533fc92ca81346ba8bdbdd1fca13b333 472 Output/scc-test.example2-c90.1 SHA-256 32ff2a26ea368003ec9739e06de43eb142ae17b7c2ca11ba93da5aee2d0309b2 352 Output/scc-test.example2-c90.2 -SHA-256 f694d973e04b105abd7f450c55e1f795dd38c6249b5f7bbb8dcd4edbae89cead 576 Output/scc-test.example2-c99-c-n.1 +SHA-256 871756b2cb32e249005b43913ddcfc14c7dc817687d4f9a6f6c939708f1dcac9 576 Output/scc-test.example2-c99-c-n.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c99-c-n.2 -SHA-256 376c97ad9c57fa831170cd8e80e18ac5b97f0ca202e3b3fa1480bcb029720487 570 Output/scc-test.example2-c99-c.1 +SHA-256 37b2fdfa2d27ab5127936ccbb53880e2ea390a36820b9a7aecbfae7a87a8c4eb 570 Output/scc-test.example2-c99-c.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c99-c.2 SHA-256 08d24129762ad9863ba06bfcd06d74d260fe35bb493996e1fa8d5c100ea5d7d1 335 Output/scc-test.example2-c99-n.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.example2-c99-n.2 @@ -75,13 +75,13 @@ SHA-256 28a0108671e06876e0b2c7a4d668e54bf7d509ceb5e50f9bb3abcca5a6c2f821 32 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.numpunct-c++17.2 SHA-256 28a0108671e06876e0b2c7a4d668e54bf7d509ceb5e50f9bb3abcca5a6c2f821 325 Output/scc-test.numpunct-c.1 SHA-256 4b198b6e75b47d41749d210f0a977bad16a640ddd8767bf4dd70945bc12934b8 2856 Output/scc-test.numpunct-c.2 -SHA-256 6c920662ceaee699abe40a37ed363a8d90cd31fcfe0fc0fd8cb6f9f27205f20a 6733 Output/scc-test.rawstring-c++11.1 +SHA-256 6af54ae6ad2f79613ac6ef995d4d07c2f1df8415e699ecbfc308e029fae71b7f 7051 Output/scc-test.rawstring-c++11.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.rawstring-c++11.2 -SHA-256 15e3a86f9b66868ef5da545b6aff58183a3cc6a3a367d9b1813aa997da2e7d41 6733 Output/scc-test.rawstring-c++14.1 +SHA-256 5ebc982c667fcb53dcc21924e9b30ed265fe4ff0062f992db5f64e8e7c6550af 7051 Output/scc-test.rawstring-c++14.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.rawstring-c++14.2 -SHA-256 a2a7c39bf2f9e5f3b23e606a47255432f642be6eca3df48a8bd2a97ca762541d 6733 Output/scc-test.rawstring-c++17.1 +SHA-256 c8e6faf3e3663f9f0acd2f1a4c47014aab16ca71301a0132ae04f5e76aaf9fd2 7051 Output/scc-test.rawstring-c++17.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.rawstring-c++17.2 -SHA-256 17bc13c2cc6888720c435764a8c29473159a1e88b0b01ca14b9ba06f5d347033 6731 Output/scc-test.rawstring-c11.1 +SHA-256 7f5321c5467f11162a7390c7db9fae6843a0067b294a46ca127e4f87fb22523f 7049 Output/scc-test.rawstring-c11.1 SHA-256 eb54d3b6e44d274abbef7e0ea19b2f5bfdc268aa4c609b27c4a6a93a425bc1fb 1550 Output/scc-test.rawstring-c11.2 SHA-256 81fc6a90e827a86116bd8c6650bcb22fe45a4b4915e03dfabb4251c1b2a962d0 1193 Output/scc-test.ucns-c++11.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.ucns-c++11.2 @@ -99,7 +99,7 @@ SHA-256 81fc6a90e827a86116bd8c6650bcb22fe45a4b4915e03dfabb4251c1b2a962d0 119 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc-test.ucns-c99.2 SHA-256 2e921861ddf29d9c9ffab0632e5549647623547967ad17923ae98dbf24e30fc7 368 Output/scc.test-08.example2-e.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc.test-08.example2-e.2 -SHA-256 3b396a09802bcda896abe364c4b31f5293a70568f7469a5ff0569f5495659338 570 Output/scc.test-08.example2-ec.1 +SHA-256 ce9b5cf5846e805232f92b3c256c5d562b91bf0d775ed32a365c1d466be58ad7 570 Output/scc.test-08.example2-ec.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc.test-08.example2-ec.2 SHA-256 fd816fa1f688cffa233f3d300757e831183c290f6fc016fb57e4ea14259f33f0 376 Output/scc.test-08.example2-en.1 SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 0 Output/scc.test-08.example2-en.2 @@ -126,29 +126,29 @@ SHA-256 cda83f595b4e97c2e3764ff7a479afb975cfcef5510b4a56356c5cc1034d771f 33 SHA-256 29c03f9449dd42561e8266fb7b26eec8b95dc6301283a5b44b97c3335da718b7 103 Output/scc.test-10.endcomment-t.1 SHA-256 cda83f595b4e97c2e3764ff7a479afb975cfcef5510b4a56356c5cc1034d771f 332 Output/scc.test-10.endcomment-t.2 SHA-256 f7edc205da3d68b0fb3333831a8fdcca1c3a07f8e1fa1e478d0ffa9047c2769d 12761 chksumtool.pl -SHA-256 f1fa8a6f160f1653afc13c23e31fbcdf5e82b0facf54eab716fc0c2bb6087509 3682 errhelp.c -SHA-256 375aec8cff67dc9a4a17e3ef6774f89b5df8adf8d5d18de340576ec58e353db5 4166 filter.c -SHA-256 b1e35f4115ed786d7cf724452ed74e07716ffeb2859ad117083b5700b0cbdf45 3263 filter.h -SHA-256 c7b0ac439772792a045046452b5a22e6fb88ff273eff6409d12a018a03ffcd5f 2023 filterio.c +SHA-256 6dd2f1552db438ecb3c55c1e081cfefe9b3bc21bffc9c2631d9e1e29f4cc0c87 3682 errhelp.c +SHA-256 f6c5e7e206a20bc908e2b873ad34d5c6cf511c6fdaae64c9680c412741c429bf 4166 filter.c +SHA-256 fa2f9cf65764d06ce82fb9a8c2d9ea5035e6264ee13c92f7067bed991d02b112 3263 filter.h +SHA-256 cc491bbb3f0f543dede08c57281414401256561229a050eb9ca2f2b4b851fed1 2023 filterio.c SHA-256 1b314a6723336c43b7a4552d1d9b6be824ba79b05f4baf6930fd5433ad97cbf0 1729 makefile -SHA-256 f255cc1fa6bf44cb30b2e5cbe8c75bd9a10274e37a1337cd7a7aaaddc148a082 1355 posixver.h +SHA-256 ce25ee35abaacfd561d19783eba3f0c9733b4550aaa1be82de968454de8759de 1355 posixver.h SHA-256 edaecdc4e9cbafe5d29be65073d3f28fbcd915f3ebf03294303b424b3a3b94f0 913 rcskwcmp.sh SHA-256 373ab8b5e76c7fe3c7bcd5e0919f40f574b56ea6f1ab80c4177d1ae9fbc682bf 269 rcskwreduce.sh -SHA-256 ea7e1c220c4cf10457302a0e5c1f7daaf5eb3f2a1e9e2176c53912943826a891 654 scc-bogus.binary.cpp +SHA-256 7c8ef974dc985abb9de0395ded012d62c0330201fe13a36522c492e94fca35fe 654 scc-bogus.binary.cpp SHA-256 684cf276df22937a36734356eed4041cab21649d238146fcac448672f4468ef8 614 scc-bogus.endcomment.c -SHA-256 b9c43590982f0dabb213287f9ad45dfd200f97f9a5b35024fbd1babdd61e9ea2 4085 scc-bogus.ucns.c -SHA-256 efaa1eafa4f91a0d699fd126b2783e909c0e0c0c6b15f907531c879fa4a5ae8b 446 scc-test.binary.cpp -SHA-256 986205bbacd03d1d7b9b2784d884a39d243d0004a1b0353a24bd030a2fe4f229 4343 scc-test.example1.c -SHA-256 d2313a19b21dceacd862e2a511d41e4f948fd75c1353e59e0e552c8e4f91bce2 884 scc-test.example2.c -SHA-256 dadbdb86e93949a5757d8416f4709e4a60cff99b036d66c977a2ea7c2e5f7864 670 scc-test.example3.c -SHA-256 14431d2920583bb133983c485c8f6f505c8f4280408a848075574a87caa62c35 1358 scc-test.hexfloat.cpp -SHA-256 6c0671148e617261c1e9b02017238fc3d2209f9f18be507103c705870dc2743e 676 scc-test.numpunct.cpp -SHA-256 5a52d1f8f4c5aff86bb9369c6770f14e542d62389de95176e171f20c00169288 8439 scc-test.rawstring.cpp +SHA-256 2c81cfa407e1947225cb9c4af24329cd76db98b95e91a37e9d0ce19c69fe459d 4085 scc-bogus.ucns.c +SHA-256 480777194a0e2eba778f5201feb8a173d6e4fa606ffd02ccf36ba3f750b2621f 446 scc-test.binary.cpp +SHA-256 8a05dd1cbb8b762a16125090c531feaf87076cd510194fece0f61f05e6a1dab1 4343 scc-test.example1.c +SHA-256 900ded475efa3c8d28246cab95668fe17255ccde68a3136c818986ec112b5b0b 884 scc-test.example2.c +SHA-256 de8543a25e8956d173711e0837eefd3cebe2de6dbe09903667db5165ce579674 670 scc-test.example3.c +SHA-256 115fbe21cb00a7edccaef63aa9cace19a893b3f44cf6bcf1cd2fe88f99339af2 1358 scc-test.hexfloat.cpp +SHA-256 f935b54fcb33951284f739afc880fceb1fb9014ad1081cde340af5e5b5110328 676 scc-test.numpunct.cpp +SHA-256 50484d3e158a8bc1e2a78911fc7827ee48c1fbd278ecefe8c96323c2adc5955a 9151 scc-test.rawstring.cpp SHA-256 31999721a0c718fc00b7679fb2eed32862ad560a976b0524596c874cc31c3ffe 415 scc-test.trailing-whisp.c -SHA-256 07da863c6e66b7ded7708757bf70c4090d9301ed5970151f67b65b3204552efe 3219 scc-test.ucns.c +SHA-256 ce9fe947aab83ccc1f0e18fd840e9af9d938f5c3589d48ab4bb173b8412c19b4 3219 scc-test.ucns.c SHA-256 b8cca036c70053166c82b87233ef2fa5d28dc8d0df5e04bee6164ce1f6e8ed6a 914 scc-version.h -SHA-256 443298a4aed3c77377172840ef745dfb58e3c36459fd9da9a42f8c516e16b9e5 3777 scc.1 -SHA-256 dcbe6893d12e128b452173ce4aa68276650ed30192c85300be48309d3015467e 38579 scc.c +SHA-256 a8a3dc59b1b056c01edf9d9f1895939ce8c62ed30465b2a538afab28410c16b7 3777 scc.1 +SHA-256 5de17864374d6693ef6b321073d6a118a1a18325648b74921bb9702ddf0e4655 38531 scc.c SHA-256 44a65c94aded607e285eaa3562ef5fef9efc0a692ab80f1d8120237ea96ea86d 2630 scc.test-03.sh SHA-256 e6d3c385465000cb6a7ee06193b3eec7af6dec74654238d216d87f2c62e126f1 2241 scc.test-04.sh SHA-256 557b8bf5a6ea8b46b9f0e137b500f1d6d8b0d6fc3dc5e07eb8b3a59dbea01240 2228 scc.test-05.sh @@ -157,5 +157,5 @@ SHA-256 707526356a710b6583a755b198ff4d0b31b612c6b1c6ad2557d4802cf03f5e01 211 SHA-256 f667e87994120afc7d70c08f5b3bb19f681561de93bd249bdc38786850fdca68 2065 scc.test-08.sh SHA-256 fcd74de5e4920c5a124aeea1b09be95cdfca6fdb5c33e4607878d8af3fe667ce 2102 scc.test-09.sh SHA-256 4a7acbbb3453fe1ea1088fb8983c636ab2e627e17014000b3f7cffd26f98187d 2085 scc.test-10.sh -SHA-256 0a4e2046c304f24bd380777a511075af20944de8d520c0d7aeb878dd4827e7e6 22569 stderr.c -SHA-256 50e59f55daa7273d73cec48fc96b7f90aa07148443baff41c0fb4d7264d3491d 7225 stderr.h +SHA-256 4145232477d9f04dc510af5321bc1eabcd5b42a73139a6c8f07a83f361523047 22569 stderr.c +SHA-256 4b80bbacc6a453ebcc672a8ba40d178f2a4dd146bff9c055a2f42b9b7aeb3781 7225 stderr.h diff --git a/scc-8.0.2.sum b/scc-8.0.2.sum new file mode 100644 index 0000000..a098cd2 --- /dev/null +++ b/scc-8.0.2.sum @@ -0,0 +1 @@ +SHA-256 eed1cc8350836b465e7d68643f32b86db99a3792777144b19c9fe86b58c903cb 17818 scc-8.0.2.sha diff --git a/scc-bogus.binary.cpp b/scc-bogus.binary.cpp index e106ed7..9766928 100644 --- a/scc-bogus.binary.cpp +++ b/scc-bogus.binary.cpp @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on bogus C++14 binary numbers @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2014 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ int i = 0b'0100; // Quote without digit before diff --git a/scc-bogus.ucns.c b/scc-bogus.ucns.c index 3e9d0ea..ecf567e 100644 --- a/scc-bogus.ucns.c +++ b/scc-bogus.ucns.c @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on broken Unicode characters @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2016 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Compile with -fextended-identifiers */ diff --git a/scc-test.binary.cpp b/scc-test.binary.cpp index 9e80f81..a575770 100644 --- a/scc-test.binary.cpp +++ b/scc-test.binary.cpp @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on C++14 binary numbers @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2014 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ int i = 0b0100; diff --git a/scc-test.example1.c b/scc-test.example1.c index 20600e6..d62ce4a 100644 --- a/scc-test.example1.c +++ b/scc-test.example1.c @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/scc-test.example2.c b/scc-test.example2.c index 38a3ac4..85e9cd8 100644 --- a/scc-test.example2.c +++ b/scc-test.example2.c @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on core functionality @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1997,2003,2007,2013-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* Mainly for testing */ diff --git a/scc-test.example3.c b/scc-test.example3.c index 682509f..3728b63 100644 --- a/scc-test.example3.c +++ b/scc-test.example3.c @@ -5,7 +5,7 @@ @(#)Purpose: Test handling of C11 (and C++11) Unicode characters and strings. @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2016 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ #include /* wchar_t */ diff --git a/scc-test.hexfloat.cpp b/scc-test.hexfloat.cpp index d9ec956..85930c3 100644 --- a/scc-test.hexfloat.cpp +++ b/scc-test.hexfloat.cpp @@ -5,7 +5,7 @@ @(#)Purpose: Hexadecimal floating point constants (C99 and later) @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2016 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ // There is evidence from G++ 6.1.0 that C++17 (C++1z) will support diff --git a/scc-test.numpunct.cpp b/scc-test.numpunct.cpp index 6b46156..4529d2c 100644 --- a/scc-test.numpunct.cpp +++ b/scc-test.numpunct.cpp @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on numbers with C++14 punctuation @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2014-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ float f1 = 0x12'34'45p-12; diff --git a/scc-test.rawstring.cpp b/scc-test.rawstring.cpp index 2ed698b..d9da55d 100644 --- a/scc-test.rawstring.cpp +++ b/scc-test.rawstring.cpp @@ -1,11 +1,11 @@ /* @(#)File: $RCSfile: scc-test.rawstring.cpp,v $ -@(#)Version: $Revision: 8.1 $ -@(#)Last changed: $Date: 2022/05/21 19:16:48 $ +@(#)Version: $Revision: 8.2 $ +@(#)Last changed: $Date: 2022/05/30 01:02:47 $ @(#)Purpose: Test SCC on C++11 raw strings @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2014-15 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ @@ -13,7 +13,7 @@ #ifndef lint /* Prevent over-aggressive optimizers from eliminating ID string */ extern const char jlss_id_scc_rawstring_cpp[]; -const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring.cpp,v 8.1 2022/05/21 19:16:48 jonathanleffler Exp $"; +const char jlss_id_scc_rawstring_cpp[] = "@(#)$Id: scc-test.rawstring.cpp,v 8.2 2022/05/30 01:02:47 jonathanleffler Exp $"; #endif /* lint */ /* NB: This requires C++11 or C++14 support to compile; C++98 is not adequate */ @@ -181,7 +181,7 @@ to jump through )abcdefghijklmnop)abc))abcdefghijklmnopq )abcdefghijklmnop"; /* And a final comment */ #if defined(REGEX_TYPE_DEFINED) -/* Bug report from Oleg Skinderev 2022-05-22 via GitHub */ +/* Bug report (issue #1) from Oleg Skinderev 2022-05-22 via GitHub */ /* Input string - should be unchanged */ static regex incl1{R"/(\s*#\s*include\s*"([^"]*)"\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; @@ -190,3 +190,20 @@ static regex incl2{R"/(\s*#\s*include\s*<([^>]*)>\s*)/"}; static regex incl1{R"/(\s*#\s*include\s*"([^"]*)\s*)/"}; static regex incl2{R"/(\s*#\s*include\s*<([^>]*)\s*)/"}; #endif /* REGEX_TYPE_DEFINED */ + +#if defined(STRING_TYPE_DEFINED) +/* Bug report (issue #2) from Oleg Skinderev 2022-05-29 via GitHub */ +/* Input quoted data - double and single quoted */ +/* Double-quoted data provided by OS (except for backslash/single-quotes) */ +/* Single-quoted data adapted by JL */ +string str1 = "RC-21\'\\\\M2"; +string str2 = "\"\\r\\n\'\t\\\"\\\\\""; +string str3 = 'R\\\\M2'; +string str4 = '\'\\r\"\\"\\n\t\\\'\\\\\''; +/* Buggy output - should be the same as the input but wasn't */ +/* NB: defining STRING_TYPE_DEFINED won't let this compile */ +string str1 = "RC-21\'\\\\2"; +string str2 = "\"\\\\\'\t\\\"\\\\\""; +string str3 = 'R\\\\2'; +string str4 = '\'\\\"\\\\\t\\\'\\\\\''; +#endif /* STRING_TYPE_DEFINED */ diff --git a/scc-test.ucns.c b/scc-test.ucns.c index 29ecc81..d075482 100644 --- a/scc-test.ucns.c +++ b/scc-test.ucns.c @@ -5,7 +5,7 @@ @(#)Purpose: Test SCC on Unicode extended identifiers @(#)Author: J Leffler @(#)Copyright: (C) JLSS 2014,2016 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /* diff --git a/scc.1 b/scc.1 index 3856722..b9f2884 100644 --- a/scc.1 +++ b/scc.1 @@ -84,7 +84,7 @@ Once again, these are more theoretical than practical, and SCC currently does not detect or handle them. .SH VERSION Documentation for -SCC Version 8.0.1 (2022-05-21) Version 8.0.1 (2022-05-21) +SCC Version 8.0.2 (2022-05-29) Version 8.0.2 (2022-05-29) .SH AUTHOR Jonathan Leffler .br diff --git a/scc.c b/scc.c index 8386e17..8f5ea5d 100644 --- a/scc.c +++ b/scc.c @@ -1,7 +1,7 @@ /* @(#)File: $RCSfile: scc.c,v $ -@(#)Version: $Revision: 8.2 $ -@(#)Last changed: $Date: 2022/05/21 19:22:21 $ +@(#)Version: $Revision: 8.3 $ +@(#)Last changed: $Date: 2022/05/30 01:02:22 $ @(#)Purpose: Strip C comments @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1991-2022 @@ -176,7 +176,7 @@ static size_t whisp_off = 0; #ifndef lint /* Prevent over-aggressive optimizers from eliminating ID string */ extern const char jlss_id_scc_c[]; -const char jlss_id_scc_c[] = "@(#)$Id: scc.c,v 8.2 2022/05/21 19:22:21 jonathanleffler Exp $"; +const char jlss_id_scc_c[] = "@(#)$Id: scc.c,v 8.3 2022/05/30 01:02:22 jonathanleffler Exp $"; #endif /* lint */ /* Always maintain enough space in whisp for a null to be added */ @@ -353,11 +353,9 @@ static void endquote(char q, FILE *fp, const char *fn, const char *msg) if (bs_count % 2 == 0) { + s_putch(c2); if (c2 == q) - { - s_putch(c2); return; - } } else { diff --git a/stderr.c b/stderr.c index 07f2111..7e41497 100644 --- a/stderr.c +++ b/stderr.c @@ -5,7 +5,7 @@ @(#)Purpose: Error reporting routines @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1988-2022 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ /*TABSTOP=4*/ diff --git a/stderr.h b/stderr.h index 4e87285..d61f51f 100644 --- a/stderr.h +++ b/stderr.h @@ -5,7 +5,7 @@ @(#)Purpose: Header file for standard error functions @(#)Author: J Leffler @(#)Copyright: (C) JLSS 1989-2022 -@(#)Product: SCC Version 8.0.1 (2022-05-21) +@(#)Product: SCC Version 8.0.2 (2022-05-29) */ #if !defined(STDERR_H)