summary refs log tree commit diff stats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fixes net/asyncdispatch on Windows. Ref #2976. Fixes #2996.Dominik Picheta2015-06-253-47/+59
|
* Merge pull request #2976 from ayourtch/ipv6-develDominik Picheta2015-06-254-22/+54
|\ | | | | Ipv6 devel - add IPv6 support for asyncsockets, make AF_INET6 a default
| * Match the AF of the socket in connect().Andrew Yourtchenko2015-06-241-2/+3
| |
| * Allow to connect to IPv4-mapped addresses for IPv6 sockets - thus full IPv4 ↵Andrew Yourtchenko2015-06-241-0/+1
| | | | | | | | compatibility.
| * Return address in pure IPv4 notation by getAddrString if IPv6 address is ↵Andrew Yourtchenko2015-06-241-0/+2
| | | | | | | | IPv4-mapped.
| * Make asyncdispatch.connectAddr IPv6-aware.Andrew Yourtchenko2015-06-241-2/+2
| |
| * Export Sockaddr_in6, Sockaddr_storage.Andrew Yourtchenko2015-06-241-0/+1
| |
| * Add getAddrString which returns string representing the address within SockAddr.Andrew Yourtchenko2015-06-241-0/+12
| |
| * Expose INET6_ADDRSTRLEN.Andrew Yourtchenko2015-06-241-0/+2
| |
| * Update posix.Sockaddr_in6 and posix.Sockaddr_storage, deprecate old T* types.Andrew Yourtchenko2015-06-241-2/+3
| |
| * Make newAsyncSocket AF_INET6 the default domain.Andrew Yourtchenko2015-06-231-1/+1
| |
| * Make asyncnet.bindAddr IPv4+IPv6 compatible.Andrew Yourtchenko2015-06-231-15/+12
| |
| * Add getSockDomain to return AF_INET or AF_INET6 of a SocketHandle.Andrew Yourtchenko2015-06-231-0/+15
| |
* | Merge pull request #2977 from apense/patch-5Andreas Rumpf2015-06-251-0/+13
|\ \ | | | | | | Conversion between radians and degrees.Fixes #2881
| * | Specific float32/float64 procsapense2015-06-241-8/+4
| | | | | | | | | I still used generics, but made them choose from `float32` or `float64`. I can rewrite in separate, explicit procs if is wanted
| * | Conversion between radians and degrees.Fixes #2881apense2015-06-241-0/+17
| |/ | | | | provides a new constant for conversion (not public, but that can be changed if it's wanted). the functions are pretty simple, honestly. top-level comment so documentation for each function could remain. Fixes #2881
* | fixes #2992Araq2015-06-251-4/+4
| |
* | Added documentation for modapense2015-06-241-0/+6
|/ | | Along with a brief example for sign demonstration
* Adjustments to #2610.Dominik Picheta2015-06-222-5/+15
|
* Merge branch 'starttls' of https://github.com/wiml/Nim into wiml-starttlsDominik Picheta2015-06-222-53/+89
|\ | | | | | | | | Conflicts: lib/pure/net.nim
| * Make the post-connection wrapSocket() call available in both the synchronous ↵Wim Lewis2015-04-262-10/+32
| | | | | | | | and asynchrinous net modules.
| * Add a handshake parameter to wrapSocket() to allow it to work on an ↵Wim Lewis2015-04-231-1/+15
| | | | | | | | already-connected socket.
* | Merge pull request #2968 from def-/neutral-languagereactormonk2015-06-212-6/+6
|\ \ | | | | | | Neutral language
| * | Fix typos in commentsdef2015-06-212-6/+6
| | |
* | | linenoise support now worksAraq2015-06-211-1/+1
| | |
* | | Unix line endings for linenoise.nimAraq2015-06-211-38/+34
| | |
* | | use linenoise instead of GNU readlineAraq2015-06-216-15/+1299
| | |
* | | preparations for more Nimble packages; clear licensing; fixes #2949Araq2015-06-2062-54001/+1049
| | |
* | | Merge pull request #2961 from Perelandric/rename_writeLnDominik Picheta2015-06-2013-30/+44
|\ \ \ | | | | | | | | Renamed writeln to writeLine. Issue #2958
| * | | reworked deprecation to retain old procspatrick dw2015-06-193-3/+14
| | | |
| * | | renamed writeln to writeLine in libpatrick dw2015-06-1910-25/+25
| | | |
| * | | Renamed writeln procs to writeLinepatrick dw2015-06-183-5/+8
| |/ /
* | | Merge branch 'patch-2' of https://github.com/rgv151/Nim into rgv151-patch-2Dominik Picheta2015-06-201-49/+50
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: lib/pure/htmlparser.nim
| * | | Allow TR, TH, TD tags inside THEAD and TFOOTBruce Doan2015-05-271-49/+49
| | | |
* | | | Merge pull request #2951 from apense/patch-5Andreas Rumpf2015-06-201-0/+21
|\ \ \ \ | | | | | | | | | | Added `isSorted` proc
| * | | | Added documentationapense2015-06-181-0/+3
| | | | | | | | | | | | | | | Now `isSorted` is documented.
| * | | | Removed redundant checkapense2015-06-181-2/+0
| | | | | | | | | | | | | | | Loop takes care of it already
| * | | | Fixed silly continueapense2015-06-171-5/+2
| | | | | | | | | | | | | | | The old if/else was weird and unnecessary
| * | | | Added `isSorted` procapense2015-06-171-0/+23
| | | | | | | | | | | | | | | Linear-time verification that an openarray is sorted. Operates on the same parameters as `sort`. Seems much cheaper for large sorts.
* | | | | Merge pull request #2957 from apense/patch-7Andreas Rumpf2015-06-191-0/+18
|\ \ \ \ \ | |_|_|/ / |/| | | | Added some C99 funcs
| * | | | Added some C99 funcsapense2015-06-181-0/+18
| | | | | | | | | | | | | | | Error function (and complementary) and gamma function (and truncated)
* | | | | Fix flaviut/nre#20Flaviu Tamas2015-06-181-2/+6
|/ / / /
* / / / Fixed fix of #2917yglukhov2015-06-171-2/+5
|/ / /
* | | Merge pull request #2945 from yglukhov/fix-2917Andreas Rumpf2015-06-171-3/+16
|\ \ \ | | | | | | | | Fixes #2917
| * | | Fixes #2917yglukhov2015-06-171-3/+16
| | | |
* | | | Merge pull request #2768 from gokr/fix-reprAndreas Rumpf2015-06-161-5/+11
|\ \ \ \ | | | | | | | | | | Fixes #2749, traverse full inheritance for reprRecord
| * | | | Tweaked to do commas properlyGöran Krampe2015-05-201-3/+3
| | | | |
| * | | | Fixes #2749, traverse full inheritance for reprRecordGöran Krampe2015-05-201-5/+11
| | | | |
* | | | | Merge pull request #2851 from stefantalpalaru/gogcAndreas Rumpf2015-06-166-13/+219
|\ \ \ \ \ | |_|/ / / |/| | | | the Go GC (using the gccgo implementation)
| * | | | conditional TGenericSeq extensionStefan Talpalaru2015-06-163-8/+18
| | | | |
_new(Operand_bound, "rm32", 1<<3); put_new(Operand_bound, "base", 1<<3); put_new(Operand_bound, "index", 1<<3); put_new(Operand_bound, "scale", 1<<2); put_new(Operand_bound, "r32", 1<<3); put_new(Operand_bound, "disp8", 1<<8); put_new(Operand_bound, "disp16", 1<<16); // no bound needed for disp32 put_new(Operand_bound, "imm8", 1<<8); // no bound needed for imm32 :(before "Pack Operands(segment code)") check_operand_bounds(code); if (trace_contains_errors()) return; :(code) void check_operand_bounds(const segment& code) { trace(3, "transform") << "-- check operand bounds" << end(); for (int i = 0; i < SIZE(code.lines); ++i) { const line& inst = code.lines.at(i); for (int j = first_operand(inst); j < SIZE(inst.words); ++j) check_operand_bounds(inst.words.at(j)); if (trace_contains_errors()) return; // stop at the first mal-formed instruction } } void check_operand_bounds(const word& w) { for (map<string, uint32_t>::iterator p = Operand_bound.begin(); p != Operand_bound.end(); ++p) { if (!has_operand_metadata(w, p->first)) continue; if (!looks_like_hex_int(w.data)) continue; // later transforms are on their own to do their own bounds checking int32_t x = parse_int(w.data); if (x >= 0) { if (p->first == "disp8" || p->first == "disp16") { if (static_cast<uint32_t>(x) >= p->second/2) raise << "'" << w.original << "' too large to fit in signed bitfield " << p->first << '\n' << end(); } else { if (static_cast<uint32_t>(x) >= p->second) raise << "'" << w.original << "' too large to fit in bitfield " << p->first << '\n' << end(); } } else { // hacky? assuming bound is a power of 2 if (x < -1*static_cast<int32_t>(p->second/2)) raise << "'" << w.original << "' too large to fit in bitfield " << p->first << '\n' << end(); } } } void test_check_bitfield_sizes_for_imm8() { run( "== code 0x1\n" "c1/shift 4/subop/left 3/mod/direct 1/rm32/ECX 0xff/imm8" // shift EBX left ); CHECK(!trace_contains_errors()); } void test_check_bitfield_sizes_for_imm8_error() { Hide_errors = true; run( "== code 0x1\n" "c1/shift 4/subop/left 3/mod/direct 1/rm32/ECX 0x100/imm8" // shift EBX left ); CHECK_TRACE_CONTENTS( "error: '0x100/imm8' too large to fit in bitfield imm8\n" ); } void test_check_bitfield_sizes_for_negative_imm8() { run( "== code 0x1\n" "c1/shift 4/subop/left 3/mod/direct 1/rm32/ECX -0x80/imm8" // shift EBX left ); CHECK(!trace_contains_errors()); } void test_check_bitfield_sizes_for_negative_imm8_error() { Hide_errors = true; run( "== code 0x1\n" "c1/shift 4/subop/left 3/mod/direct 1/rm32/ECX -0x81/imm8" // shift EBX left ); CHECK_TRACE_CONTENTS( "error: '-0x81/imm8' too large to fit in bitfield imm8\n" ); } void test_check_bitfield_sizes_for_disp8() { // not bothering to run transform( "== code 0x1\n" "01/add 1/mod/*+disp8 3/rm32 1/r32 0x7f/disp8\n" // add ECX to *(EBX+0x7f) ); CHECK(!trace_contains_errors()); } void test_check_bitfield_sizes_for_disp8_error() { Hide_errors = true; run( "== code 0x1\n" "01/add 1/mod/*+disp8 3/rm32 1/r32 0x80/disp8\n" // add ECX to *(EBX+0x80) ); CHECK_TRACE_CONTENTS( "error: '0x80/disp8' too large to fit in signed bitfield disp8\n" ); } void test_check_bitfield_sizes_for_negative_disp8() { // not bothering to run transform( "== code 0x1\n" "01/add 1/mod/*+disp8 3/rm32 1/r32 -0x80/disp8\n" // add ECX to *(EBX-0x80) ); CHECK(!trace_contains_errors()); } void test_check_bitfield_sizes_for_negative_disp8_error() { Hide_errors = true; run( "== code 0x1\n" "01/add 1/mod/*+disp8 3/rm32 1/r32 -0x81/disp8\n" // add ECX to *(EBX-0x81) ); CHECK_TRACE_CONTENTS( "error: '-0x81/disp8' too large to fit in bitfield disp8\n" ); }