summary refs log tree commit diff stats
path: root/lib
Commit message (Expand)AuthorAgeFilesLines
...
* | | | | Merge branch 'async-readwrite-no-conflict' of https://github.com/endragor/Nim...Andreas Rumpf2016-09-041-2/+8
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Async read/write procedures no longer replace each other in upcoming asyncdis...Ruslan Mustakov2016-09-021-2/+8
* | | | | Merge pull request #4705 from yglukhov/js-loggingDominik Picheta2016-09-041-115/+129
|\ \ \ \ \
| * | | | | Enabled logging tests for jsYuriy Glukhov2016-09-031-4/+5
| * | | | | Logging compatible with jsYuriy Glukhov2016-09-031-111/+124
* | | | | | async: transfer all await/async macro related code to asyncmacro.nim module. ...Eugene Kabanov2016-09-033-720/+377
|/ / / / /
* | | | | Make upcoming version to be up to date with current version.cheatfate2016-09-031-38/+43
* | | | | Merge pull request #4680 from cheatfate/asyncwinsendDominik Picheta2016-09-022-2/+12
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Protect data argument for GC.cheatfate2016-08-302-2/+12
* | | | | Merge branch 'devel' of https://github.com/c-blake/Nim into c-blake-develAraq2016-09-022-1/+53
|\ \ \ \ \
| * | | | | Use new name for call to low-level terminalWidth.Charles Blake2016-09-011-3/+3
| * | | | | Evidently Travis build termios.h does not pull in sys/ioctl.hCharles Blake2016-09-011-1/+1
| * | | | | Make Windows part match Unix part more closely per Araq request.Charles Blake2016-09-011-8/+7
| * | |pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escappan>1-32/+38
|\ \ \ \
| * | | | Reset framePtr on unhabdled exception. Dont reset on getStackTrace.Yuriy Glukhov2016-08-271-3/+1
| * | | | Uncaught exceptions in JS now always propagate with better stack trace.Yuriy Glukhov2016-08-271-29/+37
* | | | | Merge branch 'devel' of github.com:nim-lang/Nim into develAraq2016-08-271-3/+3
|\ \ \ \ \
| * | | | | Fixed frame corruptionYuriy Glukhov2016-08-271-3/+3
| |/ / / /
* | | | | MergedAraq2016-08-2716-65/+139
|\| | | |
| * | | | json module: use ordered tables instead of ordinary tablesAndreas Rumpf2016-08-251-17/+23
| * | | | update stdlib to not use deprecated symbolsAndreas Rumpf2016-08-252-9/+9
| * | | | Merge pull request #4367 from kierdavis/4365-tables-clearAndreas Rumpf2016-08-252-4/+5
| |\ \ \ \
| | * | | | Add a fix for clear() on non-ref types by adding a missing 'var' annotation t...Kier Davis2016-07-091-3/+3
| | * | | | Fix clear() on CountTableKier Davis2016-07-091-1/+2
| * | | | | Merge pull request #4603 from nigredo-tori/threadpool-deadlocksAndreas Rumpf2016-08-251-4/+47
| |\ \ \ \ \
| | * | | | | Add a lock to prevent race conditionDmitry Polienko2016-08-241-22/+33
| | * | | | | Add a workaround for threadpool deadlocks on recursionDmitry Polienko2016-08-111-3/+35
| * | | | | | Merge pull request #4629 from flyx/times-parse-yeardayAndreas Rumpf2016-08-251-2/+5
| |\ \ \ \ \ \
| | * | | | | | Calculate correct yearday in times.parseFelix Krause2016-08-191-2/+5
| * | | | | | | unittest: Output suite name, nice formattingFelix Krause2016-08-231-8/+22
| | |_|_|_|/ / | |/| | | | |
| * | | | | | Merge pull request #4645 from endragor/asyncevent-recursionAndreas Rumpf2016-08-231-2/+2
| |\ \ \ \ \ \
| | * | | | | | Fixed infinite recursion in setEvent and close procs in upcoming asyncdispatchRuslan Mustakov2016-08-231-2/+2
| * | | | | | | Merge pull request #4648 from endragor/remove-gensym-pragmaAndreas Rumpf2016-08-232-9/+9
| |\ \ \ \ \ \ \
| | * | | | | | | Removed the use of .gensym pragma inside stdlib templatesRuslan Mustakov2016-08-232-9/+9
| | |/ / / / / /
| * | | | | | | Get rid of initialization warningDennis Felsing2016-08-231-2/+2
| * | | | | | | Merge pull request #4646 from endragor/genoid-raceAndreas Rumpf2016-08-231-2/+1
| |\ \ \ \ \ \ \
| | * | | | | | | Fixed race condition in genOid()Ruslan Mustakov2016-08-231-2/+1
| | |/ / / / / /
| * / / / / / / make tests green againAndreas Rumpf2016-08-231-2/+2
| |/ / / / / /
| * | | | | | Merge pull request #4618 from endragor/compatible-async-eventDominik Picheta2016-08-201-3/+3
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | |
| | * | | | | AsyncEvent is now exported on all platforms and created with newAsyncEvent pr...Ruslan Mustakov2016-08-151-3/+3
| * | | | | | Enable SO_NOSIGPIPE for sockets on OS X.Dominik Picheta2016-08-161-0/+4
| |/ / / / /
| * | | | | Fixes #4406.Dominik Picheta2016-08-131-2/+2
| * | | | | Merge pull request #4609 from cheatfate/issue4606Andreas Rumpf2016-08-121-0/+4
| |\ \ \ \ \
s="p">.Wrap(err, "smtp.Dial") } defer conn.Close() if sup, _ := conn.Extension("STARTTLS"); sup { if !starttls { err := errors.New("STARTTLS is supported by this server, " + "but not set in accounts.conf. " + "Add smtp-starttls=yes") return 0, err } if err = conn.StartTLS(&tls.Config{ ServerName: serverName, }); err != nil { return 0, errors.Wrap(err, "StartTLS") } } else { if starttls { err := errors.New("STARTTLS requested, but not supported " + "by this SMTP server. Is someone tampering with your " + "connection?") return 0, err } } case "smtps": host := uri.Host serverName := uri.Host if !strings.ContainsRune(host, ':') { host = host + ":465" // Default to smtps port } else { serverName = host[:strings.IndexRune(host, ':')] } conn, err = smtp.DialTLS(host, &tls.Config{ ServerName: serverName, }) if err != nil { return 0, errors.Wrap(err, "smtp.DialTLS") } defer conn.Close() } if saslClient != nil { if err = conn.Auth(saslClient); err != nil { return 0, errors.Wrap(err, "conn.Auth") } } // TODO: the user could conceivably want to use a different From and sender if err = conn.Mail(from.Address, nil); err != nil { return 0, errors.Wrap(err, "conn.Mail") } aerc.Logger().Printf("rcpt to: %v", rcpts) for _, rcpt := range rcpts { if err = conn.Rcpt(rcpt); err != nil { return 0, errors.Wrap(err, "conn.Rcpt") } } wc, err := conn.Data() if err != nil { return 0, errors.Wrap(err, "conn.Data") } defer wc.Close() ctr := datacounter.NewWriterCounter(wc) composer.WriteMessage(header, ctr) return int(ctr.Count()), nil } sendmailAsync := func() (int, error) { args, err := shlex.Split(uri.Path) if err != nil { return 0, err } if len(args) == 0 { return 0, fmt.Errorf("no command specified") } bin := args[0] args = append(args[1:], rcpts...) cmd := exec.Command(bin, args...) wc, err := cmd.StdinPipe() if err != nil { return 0, errors.Wrap(err, "cmd.StdinPipe") } defer wc.Close() go cmd.Run() ctr := datacounter.NewWriterCounter(wc) composer.WriteMessage(header, ctr) return int(ctr.Count()), nil } sendAsync := func() (int, error) { fmt.Println(scheme) switch scheme { case "smtp": fallthrough case "smtps": return smtpAsync() case "": return sendmailAsync() } return 0, errors.New("Unknown scheme") } go func() { aerc.PushStatus("Sending...", 10*time.Second) nbytes, err := sendAsync() if err != nil { aerc.SetStatus(" "+err.Error()). Color(tcell.ColorDefault, tcell.ColorRed) return } if config.CopyTo != "" { aerc.PushStatus("Copying to "+config.CopyTo, 10*time.Second) worker := composer.Worker() r, w := io.Pipe() worker.PostAction(&types.AppendMessage{ Destination: config.CopyTo, Flags: []models.Flag{models.SeenFlag}, Date: time.Now(), Reader: r, Length: nbytes, }, func(msg types.WorkerMessage) { switch msg := msg.(type) { case *types.Done: aerc.PushStatus("Message sent.", 10*time.Second) r.Close() composer.SetSent() composer.Close() case *types.Error: aerc.PushError(" " + msg.Error.Error()) r.Close() composer.Close() } }) header, _, _ := composer.PrepareHeader() composer.WriteMessage(header, w) w.Close() } else { aerc.PushStatus("Message sent.", 10*time.Second) composer.SetSent() composer.Close() } }() return nil }