Build [NT]: Fix some issues with the NOINLINE_UNALIGNED macro. * DECLSPEC() (in constrast to ATTRIBUTE()) does NOT like an extra parenthesis pair. * Having a * before DECLSPEC() is a syntax error.
Compiler [Typechecker]: Improved typechecking of sscanf(). The format %c typechecker now requires a minimum size int depending on the width of the input string. The format %s (et al) typechecker now may result is strings shorter than the input string. Fixes testsuite failure for array_sscanf("\x304b\x3066\x3044\x308a\x3087\x3046\x308a", "%[^\x3042\x3044\x3046\x3048\x304a]")[0] ;
EFUNs: Added Pike 8.0 compat variant of sscanf and array_sscanf().
Compiler [Typechecker]: Improved type checking for sscanf("%s").
sscanf: Add support for %u, and make %b, %o, and %x unsigned. Also fixes some related minor bugs.
Compiler [Typechecker]: Changed API for apply_type_attribute() et al. They now get a mapping that they may use to keep state between arguments.
EFUNs: Added some FIXME:s to __handle_sscanf_format().
Fix some gratuitous rounding to double with long-double-precision
Compiler: Added push_unlimited_array_type(). This is in preparation for adding support for length-limited array types.
Compiler: Fixed a few places that were missed in previous commit.
Merge remote-tracking branch 'origin/master' into new_utf8
Merge commit '722771973bd' into patches/lyslyskom22891031 * commit '722771973bd': (6177 commits) Verify that callablep responses are aligned with reality. ...
Merge commit '2470270f500c728d10b8895314d8d8b07016e37b' into grubba/typechecker-automap * commit '2470270f500c728d10b8895314d8d8b07016e37b': (18681 commits) Removed the old typechecker. ...
Build [NT]: Fixed multiple compatibility issues with cl. * Make sure UNREACHABLE() always has an argment. cl's preprocessor is broken, and doesn't support single argument macros being called with an empty argument. * Variables may only be declared at the beginning of a block.
Merge remote-tracking branch 'origin/8.1' into gobject-introspection
Build [sparc]: Workaround for compiler bug in ~ gcc 4.7.4. Gcc 4.7.4 and others "optimize" away calls to memcpy(), and replace them with direct (unaligned) memory accesses. This generated broken code for eg %F on sparc and other architectures that don't allow unaligned memory accesses. cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50569 Note that the patch mentioned in the above bug report is in gcc 4.7.4, but isn't sufficient. We work around the issue by forcing the float extractor functions to not be inlined on such architectures.
Merge commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e' into patches/pike63 * commit '75c9d1806f1a69ca21c27a2c2fe1b4a6ea38e77e': (19587 commits) ...
Fix spelling of FALLTHRU directive The non-standard spelling "FALL_THROUGH" is not recognized by gcc 7.3. Also, the comment must not contain any other text, or be placed inside braces.
Merge branch '8.1' into peter/travis
Move pike_search.h include from pike_memory.h and made includes implicit where needed.
Fix portability issues in sscanf with binary float * extract_{float,double}_{be,le} should return FLOAT_TYPE, which is the type of the field the value will get assigned to, rather than float/double. In particular, casting the value to a float on a system where FLOAT_TYPE is double is a bad idea if float is not IEEE compatible, and thus has unknown precision. * INT64 is an optional type, so the endianness reversal code can not depend on its existence.
Use DOUBLE_IS define for code handling doubles.
Fix compilation issues.
Whitespace changes
Use Pike_sp instead of sp
Compiler: Moved yyreport() et al to pike_compiler.cmod. More code cleanup.
Removed some includes.
Fixed bug when sscanfing multisets.
Inlined some wide_isspace code.
Corrected WIDE_ISSPACE to actually work on all Unicode white spaces.
Documentation [sscanf]: Fixed some typos and markup.
unsigned INT64 -> UINT64
Removed PTRDIFF_T_TO_LONG
Removed ECL workarounds.
SIMPLE_BAD_ARG_ERROR is only kept for compatibility, but we still had 500+ uses of it.
Simplified MAKE_INF and MAKE_NAN. Hopefully not too much.
inline is part of c99 We do have.. excessive amounts of inline, incidentally. :)
Obsess less about if size_shift is 3.
Removed Intel IA64 compiler specific DO_NOT_WARN.
Start using __builtin_unreachable
sscanf: guard C stack as well in pcharp_to_svalue_rec()
Merge remote-tracking branch 'origin/per/substrings' into 8.1
Extended sscanf %O format. It should now be able to parse anything that is output by sprintf %O. Also, it can handle most literal constants pike accepts (specifically, integers with base (0x, 0b etc), and floating point numbers in NUMeE format.) NB: The amount of code dupplication from the lexer sort of hurts.
[substrings] Fixed sscanf speed
Support the optimized substring generation in sscanf.
Removed trailing spaces.
Normalized file ends.
sscanf: implement %-F support The documentation of sscanf mentions the - flag for little byte order scanning. This was not implemented, yet. %-F always used big endian byte order.
DO_IF_DEBUG is defined in global.h
Free takes void* and doesn't need any cast anymore.
Removed some unused preprocessor macros.
Removed auto bignum checks.
sscanf: remove compile warning
Removed sscanf flags tendrils.
Removed compat flags from sprintf and sscanf.
Removed f_sscanf_76 and f_sprintf_76.
Removed SSCANF_FLAG_76_COMPAT.
Merge remote-tracking branch 'origin/8.0' into string_alloc Conflicts: src/stralloc.c
ldexp is C89 and 4.3BSD
memset is C89 and 4.3BSD
Added a new sscanf low-level API: It is now possible to sscanf using pcharp formats/strings. This makes it possible to call sscanf on partial strings and similar tricks.
sscanf: Improved error messages. Got rid of all "Error in sscanf format string." error messages, and replaced them with more specific error messages.
sscanf: generate less very_low_sscanf_ functions Instead of generating a sscanf function for each combination of string width for both the format _and_ the input, use PCHARP for the format. This saves about 60% of code size.
sscanf: implement %-F support The documentation of sscanf says that the - flag activates little byte order scanning. This was not implemented, yet. %-F always useed big endian byte order.
Merge branch '8.0' into gobject-introspection
Merge remote-tracking branch 'origin/7.9' into pdf
Merge branch '7.9' into gobject-introspection
Merge remote branch 'origin/7.9' into rblock_alloc Conflicts: src/post_modules/CritBit/floattree.cmod src/post_modules/CritBit/inttree.cmod src/post_modules/CritBit/stringtree.cmod
Fixed integer overflow error in sscanf("%H",..). Broken data could cause crashes and writing out of bounds.
Removed $Id$.
Atomic: Added INVALIDATE_SVAL().
Atomic megapatch: Use svalue accessor macros everywhere.
Added the !-modifier for sscanf. Fixes [LysLysKOM 18812886].
Added missing documentation for "%n".
Clear the svalue subtype in some more cases when __CHECKER__ is active.
removed unused variable Rev: src/modules/Image/colors.c:1.77 Rev: src/modules/sprintf/sprintf.c:1.154 Rev: src/sscanf.c:1.190
More signed p_wchar2 fixes. Rev: src/sscanf.c:1.189
Sometimes it's more convenient to compare chars as unsigned. In this case it avoids warnings too. Also fixed some overly confusing macro names. Rev: src/sscanf.c:1.188
Some wchar signedness fixes. Rev: src/sscanf.c:1.187
Removed some unused variables. Rev: src/backend.cmod:1.227 Rev: src/las.c:1.420 Rev: src/pike_types.c:1.343 Rev: src/preprocessor.h:1.94 Rev: src/sscanf.c:1.186 Rev: src/threads.c:1.257
Fixed bug in generation of array types. Thanks to Stephen R. van den Berg <srb@cuci.nl> for the bugreport. Rev: src/sscanf.c:1.185
Compiler messaging mega patch. va_yyreport() is now the main C-level dispatcher for compiler messages. It also handles the automatic conversion of type errors to warnings in compat mode. Consolidated the location for the implementation of most of the yy*-messaging functions to program.c. Added yytype_report(). Changed APIs for yyexplain_*(). Moved the definitions of REPORT_* from pike_compiler.h to program.h. va_yyerror() and low_yyerror() are no more. Most type-system messages should now be marked with the appropriate subsystem. Reenabled the typechecking for sscanf and sprintf() now that errors are converted into warnings in compat mode. Rev: src/language.yacc:1.425 Rev: src/las.c:1.413 Rev: src/las.h:1.79 Rev: src/modules/sprintf/sprintf.c:1.153 Rev: src/pike_compiler.h:1.14 Rev: src/pike_types.c:1.337 Rev: src/pike_types.h:1.118 Rev: src/program.c:1.702 Rev: src/program.h:1.248 Rev: src/sscanf.c:1.184
Disable errors from the stricter sprintf() and sscanf checks in compat mode. Rev: src/modules/sprintf/sprintf.c:1.152 Rev: src/sscanf.c:1.183
Bugfix in __handle_sscanf_format() for array_sscanf(). Rev: src/sscanf.c:1.182
Fixed offset bug in %{ ... %} handling in push_sscanf_argument_types(). Rev: src/sscanf.c:1.181
Some bugfixes... Rev: src/sscanf.c:1.180
First go at format string checking for sscanf et al. Added __handle_sscanf_format(). F_SSCANF-nodes are now type checked with new_check_call() (just like ordinary function calls). new_check_call() now accepts and detects F_LVALUE_LIST nodes as arguments. Added flag CALL_ARG_LVALUE to indicate that checked arguments are lvalues. Rev: src/builtin_functions.c:1.664 Rev: src/las.c:1.410 Rev: src/pike_types.c:1.335 Rev: src/pike_types.h:1.117 Rev: src/sscanf.c:1.179 Rev: src/sscanf.h:1.5
Added backwards compatibility for sscanf and array_sscanf. Rev: lib/7.6/modules/__default.pmod:1.4 Rev: lib/7.6/modules/testsuite.in:1.6 Rev: src/builtin_functions.c:1.663 Rev: src/language.yacc:1.423 Rev: src/sscanf.c:1.178 Rev: src/sscanf.h:1.4 Rev: src/testsuite.in:1.814
Added flags parameter to o_sscanf(). langauge.yacc now knows how to pass flags along to o_sscanf(). Updated F_SSCANF opcode to allow for passing of flags to o_sscanf(). Rev: src/docode.c:1.200 Rev: src/interpret_functions.h:1.203 Rev: src/language.yacc:1.422 Rev: src/las.c:1.408 Rev: src/sscanf.c:1.177 Rev: src/sscanf.h:1.3 Rev: src/treeopt.in:1.96
Moved the new bounds check to a more appropriate position. Rev: src/sscanf.c:1.176
Fixed indexing out of bounds error for bad input in read_set(). Rev: src/sscanf.c:1.175
* Allow singlar ranges ("X-X") in sscanf sets * Allow ranges beginning with "^" to be placed first in a sscanf set without being interpreted as negation. (To include "-" in a negated set, it now has to be placed last.) * Improved autodocs for sscanf sets Rev: src/sscanf.c:1.174
Fixed a warning in non-rtldebug mode. Rev: src/iterators.cmod:1.67 Rev: src/sscanf.c:1.173
Put all illegal size shift fatals behind ifdef PIKE_DEBUG. Rev: src/builtin.cmod:1.199 Rev: src/builtin_functions.c:1.660 Rev: src/cpp.c:1.169 Rev: src/encode.c:1.265 Rev: src/iterators.cmod:1.66 Rev: src/operators.c:1.231 Rev: src/preprocessor.h:1.93 Rev: src/program.c:1.683 Rev: src/sscanf.c:1.172 Rev: src/stralloc.c:1.217
Fixed a warning when the sscanf input string is narrow. Rev: src/sscanf.c:1.171
Eradicated all instances of setting type to T_INT without also setting the subtype in an svalue. From now on one should either set the subtype or use the new svalue type PIKE_T_FREE (see svalue.h). Rev: src/OCPikeInterpreter.m:1.3 Rev: src/apply_low.h:1.32 Rev: src/array.c:1.198 Rev: src/array.h:1.71 Rev: src/bignum.c:1.42 Rev: src/builtin.cmod:1.193 Rev: src/builtin_functions.c:1.650 Rev: src/configure.in:1.1038 Rev: src/cpp.c:1.164 Rev: src/encode.c:1.250 Rev: src/error.c:1.151 Rev: src/interpret.c:1.385 Rev: src/interpret_functions.h:1.197 Rev: src/iterators.cmod:1.64 Rev: src/las.c:1.403 Rev: src/main.c:1.228 Rev: src/mapping.c:1.195 Rev: src/module.c:1.47 Rev: src/modules/Gmp/mpz_glue.c:1.170 Rev: src/modules/HTTPLoop/accept_and_parse.c:1.39 Rev: src/modules/HTTPLoop/requestobject.c:1.31 Rev: src/modules/Image/colortable.c:1.130 Rev: src/modules/Java/jvm.c:1.84 Rev: src/modules/Parser/html.c:1.178 Rev: src/modules/Parser/xml.cmod:1.97 Rev: src/modules/Postgres/postgres.c:1.55 Rev: src/modules/_math/math.c:1.87 Rev: src/modules/files/sendfile.c:1.78 Rev: src/modules/spider/spider.c:1.134 Rev: src/multiset.c:1.106 Rev: src/object.c:1.281 Rev: src/operators.c:1.226 Rev: src/pike_error.h:1.42 Rev: src/post_modules/Shuffler/Shuffler.cmod:1.45 Rev: src/post_modules/_ADT/circular_list.cmod:1.18 Rev: src/post_modules/_ADT/sequence.cmod:1.19 Rev: src/program.c:1.642 Rev: src/signal_handler.c:1.331 Rev: src/sscanf.c:1.170 Rev: src/svalue.c:1.234 Rev: src/svalue.h:1.149
%0H doesn't make sense. Rev: src/sscanf.c:1.169 Rev: src/testsuite.in:1.781
Fixed spello. Rev: src/sscanf.c:1.168
Hopefully correct documentation of %H Rev: src/sscanf.c:1.167
%H added. Rev: src/sscanf.c:1.166
Clarification of the %[set] syntax. Rev: src/sscanf.c:1.165
Backported optimization from 7.7: greatly speed up %*s and %*[...] for large matches by not allocating and copying strings which later are ignored. Combined with %*4711s one can now use sscanf() at a given offet in the input string with minimal overhead compared to sscanf(data[4711..], ...). Rev: src/sscanf.c:1.161
Optimization: greatly speed up %*s and %*[...] for large matches by not allocating and copying strings which later are ignored. Combined with %*4711s one can now use sscanf() at a given offet in the input string with minimal overhead compared to sscanf(data[4711..], ...). Rev: src/sscanf.c:1.164
RCSID is not really useful anymore. Rev: src/array.c:1.169 Rev: src/backend.cmod:1.145 Rev: src/builtin_functions.c:1.567 Rev: src/callback.c:1.35 Rev: src/constants.c:1.54 Rev: src/cyclic.c:1.13 Rev: src/dlopen.c:1.74 Rev: src/docode.c:1.179 Rev: src/dynamic_buffer.c:1.25 Rev: src/dynamic_load.c:1.84 Rev: src/encode.c:1.219 Rev: src/error.c:1.133 Rev: src/fd_control.c:1.51 Rev: src/fdlib.c:1.66 Rev: src/fsort.c:1.23 Rev: src/gc.c:1.256 Rev: src/hashtable.c:1.15 Rev: src/interpret.c:1.353 Rev: src/iterators.cmod:1.55 Rev: src/language.yacc:1.342 Rev: src/las.c:1.349 Rev: src/lex.c:1.119 Rev: src/main.c:1.207 Rev: src/mapping.c:1.183 Rev: src/module.c:1.28 Rev: src/module_support.c:1.63 Rev: src/modules/_math/math.c:1.79 Rev: src/modules/files/datagram.c:1.9 Rev: src/modules/files/efuns.c:1.147 Rev: src/modules/files/file.c:1.329 Rev: src/modules/files/socket.c:1.91 Rev: src/modules/files/stat.c:1.30 Rev: src/modules/files/termios.c:1.24 Rev: src/modules/files/udp.c:1.70 Rev: src/modules/sprintf/sprintf.c:1.120 Rev: src/modules/system/memory.c:1.29 Rev: src/modules/system/passwords.c:1.44 Rev: src/modules/system/syslog.c:1.26 Rev: src/modules/system/system.c:1.171 Rev: src/multiset.c:1.88 Rev: src/object.c:1.257 Rev: src/opcodes.c:1.164 Rev: src/operators.c:1.195 Rev: src/peep.c:1.104 Rev: src/pike_memory.c:1.155 Rev: src/pike_types.c:1.237 Rev: src/port.c:1.78 Rev: src/program.c:1.568 Rev: src/rbtree.c:1.24 Rev: src/rusage.c:1.41 Rev: src/signal_handler.c:1.304 Rev: src/sscanf.c:1.163 Rev: src/stralloc.c:1.166 Rev: src/svalue.c:1.197 Rev: src/threads.c:1.240 Rev: src/version.c:1.142
inline -> INLINE Rev: src/block_alloc.h:1.73 Rev: src/builtin.cmod:1.160 Rev: src/docode.c:1.177 Rev: src/gc.h:1.115 Rev: src/global.h:1.100 Rev: src/interpret.c:1.351 Rev: src/interpret.h:1.153 Rev: src/object.c:1.256 Rev: src/pike_cpulib.h:1.12 Rev: src/pike_float.h:1.7 Rev: src/pike_memory.c:1.152 Rev: src/program.h:1.206 Rev: src/sscanf.c:1.162 Rev: src/svalue.h:1.130
Moved macros to header files. Rev: src/modules/sprintf/sprintf.c:1.119 Rev: src/sscanf.c:1.161
Better docs. Rev: src/sscanf.c:1.160
That's the secret handshake. Rev: src/sscanf.c:1.159
Don't use the generic_mem_searcher-compatibility wrapper. We could probably call func012 directly instead of funcN, somehow. Rev: src/sscanf.c:1.158
Depend explicitly on bignum.h Rev: src/module_support.c:1.62 Rev: src/modules/Mysql/mysql.c:1.80 Rev: src/modules/Mysql/result.c:1.31 Rev: src/sscanf.c:1.157
low_sscanf() is too usefull to be kept static. Rev: src/sscanf.c:1.156 Rev: src/sscanf.h:1.2
Moved the sscanf implementation to a file of its own. Rev: src/opcodes.c:1.155 Rev: src/opcodes.h:1.34 Rev: src/sscanf.c:1.155 Rev: src/sscanf.h:1.1