diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/copying.txt | 24 | ||||
-rw-r--r-- | lib/packages/docutils/rst.nim | 2 | ||||
-rw-r--r-- | lib/packages/docutils/rstast.nim | 2 | ||||
-rw-r--r-- | lib/packages/docutils/rstgen.nim | 4 | ||||
-rw-r--r-- | lib/pure/pegs.nim | 2 | ||||
-rw-r--r-- | lib/pure/times.nim | 36 | ||||
-rw-r--r-- | lib/wrappers/readline/readline.nim | 47 |
7 files changed, 48 insertions, 69 deletions
diff --git a/lib/copying.txt b/lib/copying.txt deleted file mode 100644 index 0ff6b7d87..000000000 --- a/lib/copying.txt +++ /dev/null @@ -1,24 +0,0 @@ -=============================================================================== -Nimrod -- a Compiler for Nimrod. http://nimrod-code.org/ - -Copyright (C) 2004-2013 Andreas Rumpf. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -[ MIT license: http://www.opensource.org/licenses/mit-license.php ] \ No newline at end of file diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim index 54c17367f..91664cd50 100644 --- a/lib/packages/docutils/rst.nim +++ b/lib/packages/docutils/rst.nim @@ -7,7 +7,7 @@ # distribution, for details about the copyright. # -## This module implements a `reStructuredText`:idx parser. A large +## This module implements a `reStructuredText`:idx: parser. A large ## subset is implemented. Some features of the `markdown`:idx: wiki syntax are ## also supported. diff --git a/lib/packages/docutils/rstast.nim b/lib/packages/docutils/rstast.nim index 23233fd39..3d191dacb 100644 --- a/lib/packages/docutils/rstast.nim +++ b/lib/packages/docutils/rstast.nim @@ -7,7 +7,7 @@ # distribution, for details about the copyright. # -## This module implements an AST for the `reStructuredText`:idx parser. +## This module implements an AST for the `reStructuredText`:idx: parser. import strutils diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim index 53bd8188e..a393943fb 100644 --- a/lib/packages/docutils/rstgen.nim +++ b/lib/packages/docutils/rstgen.nim @@ -7,7 +7,7 @@ # distribution, for details about the copyright. # -## This module implements a generator of HTML/Latex from `reStructuredText`:idx. +## This module implements a generator of HTML/Latex from `reStructuredText`:idx:. import strutils, os, hashes, strtabs, rstast, rst, highlite @@ -692,4 +692,4 @@ proc rstToHtml*(s: string, options: TRstParseOptions, var rst = rstParse(s, filen, 0, 1, dummyHasToc, options) result = "" renderRstToOut(d, rst, result) - \ No newline at end of file + diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index b6877696c..d8fed845a 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -82,7 +82,7 @@ type of pkChar, pkGreedyRepChar: ch: char of pkCharChoice, pkGreedyRepSet: charChoice: ref set[char] of pkNonTerminal: nt: PNonTerminal - of pkBackRef..pkBackRefIgnoreStyle: index: range[1..MaxSubpatterns] + of pkBackRef..pkBackRefIgnoreStyle: index: range[0..MaxSubpatterns] else: sons: seq[TNode] PNonTerminal* = ref TNonTerminal diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 2eb8d692b..86609c8e3 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -338,24 +338,24 @@ when not defined(JS): const weekDays: array [0..6, TWeekDay] = [ dSun, dMon, dTue, dWed, dThu, dFri, dSat] - result.second = int(tm.second) - result.minute = int(tm.minute) - result.hour = int(tm.hour) - result.monthday = int(tm.monthday) - result.month = TMonth(tm.month) - result.year = tm.year + 1900'i32 - result.weekday = weekDays[int(tm.weekDay)] - result.yearday = int(tm.yearday) - result.isDST = tm.isDST > 0 - if local: - if result.isDST: - result.tzname = getTzname().DST - else: - result.tzname = getTzname().nonDST - else: - result.tzname = "UTC" - - result.timezone = if local: getTimezone() else: 0 + TTimeInfo(second: int(tm.second), + minute: int(tm.minute), + hour: int(tm.hour), + monthday: int(tm.monthday), + month: TMonth(tm.month), + year: tm.year + 1900'i32, + weekday: weekDays[int(tm.weekDay)], + yearday: int(tm.yearday), + isDST: tm.isDST > 0, + tzname: if local: + if tm.isDST > 0: + getTzname().DST + else: + getTzname().nonDST + else: + "UTC", + timezone: if local: getTimezone() else: 0 + ) proc timeInfoToTM(t: TTimeInfo): structTM = const diff --git a/lib/wrappers/readline/readline.nim b/lib/wrappers/readline/readline.nim index d14171c46..1f0dd564f 100644 --- a/lib/wrappers/readline/readline.nim +++ b/lib/wrappers/readline/readline.nim @@ -156,33 +156,34 @@ const type Thook_func* = proc (a2: cstring): cstring{.cdecl.} -# If non-null, this contains the address of a function that the application -# wants called before trying the standard tilde expansions. The function -# is called with the text sans tilde, and returns a malloc()'ed string -# which is the expansion, or a NULL pointer if the expansion fails. +when not defined(macosx): + # If non-null, this contains the address of a function that the application + # wants called before trying the standard tilde expansions. The function + # is called with the text sans tilde, and returns a malloc()'ed string + # which is the expansion, or a NULL pointer if the expansion fails. -var expansion_preexpansion_hook*{.importc: "tilde_expansion_preexpansion_hook", - dynlib: tildeDll.}: Thook_func + var expansion_preexpansion_hook*{.importc: "tilde_expansion_preexpansion_hook", + dynlib: tildeDll.}: Thook_func -# If non-null, this contains the address of a function to call if the -# standard meaning for expanding a tilde fails. The function is called -# with the text (sans tilde, as in "foo"), and returns a malloc()'ed string -# which is the expansion, or a NULL pointer if there is no expansion. + # If non-null, this contains the address of a function to call if the + # standard meaning for expanding a tilde fails. The function is called + # with the text (sans tilde, as in "foo"), and returns a malloc()'ed string + # which is the expansion, or a NULL pointer if there is no expansion. -var expansion_failure_hook*{.importc: "tilde_expansion_failure_hook", - dynlib: tildeDll.}: Thook_func + var expansion_failure_hook*{.importc: "tilde_expansion_failure_hook", + dynlib: tildeDll.}: Thook_func -# When non-null, this is a NULL terminated array of strings which -# are duplicates for a tilde prefix. Bash uses this to expand -# `=~' and `:~'. + # When non-null, this is a NULL terminated array of strings which + # are duplicates for a tilde prefix. Bash uses this to expand + # `=~' and `:~'. -var additional_prefixes*{.importc: "tilde_additional_prefixes", dynlib: tildeDll.}: cstringArray + var additional_prefixes*{.importc: "tilde_additional_prefixes", dynlib: tildeDll.}: cstringArray -# When non-null, this is a NULL terminated array of strings which match -# the end of a username, instead of just "/". Bash sets this to -# `:' and `=~'. + # When non-null, this is a NULL terminated array of strings which match + # the end of a username, instead of just "/". Bash sets this to + # `:' and `=~'. -var additional_suffixes*{.importc: "tilde_additional_suffixes", dynlib: tildeDll.}: cstringArray + var additional_suffixes*{.importc: "tilde_additional_suffixes", dynlib: tildeDll.}: cstringArray # Return a new string which is the result of tilde expanding STRING. @@ -229,7 +230,8 @@ type # The current undo list for RL_LINE_BUFFER. -var undo_list*{.importc: "rl_undo_list", dynlib: readlineDll.}: ptr TUNDO_LIST +when not defined(macosx): + var undo_list*{.importc: "rl_undo_list", dynlib: readlineDll.}: ptr TUNDO_LIST # The data structure for mapping textual names to code addresses. @@ -239,7 +241,8 @@ type function*: TCommandFunc -var funmap*{.importc: "funmap", dynlib: readlineDll.}: ptr ptr TFUNMAP +when not defined(macosx): + var funmap*{.importc: "funmap", dynlib: readlineDll.}: ptr ptr TFUNMAP # **************************************************************** # |