diff options
author | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-20 01:07:34 +0100 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-desktop> | 2010-03-20 01:07:34 +0100 |
commit | c5d8a5c1da9618d65ff08cb0ab6b084e07493b49 (patch) | |
tree | 558f4e7acd87dff73965f06827bcee284b639844 | |
parent | 33fbf7fd03145d1de6023edee9c002aec982ffc7 (diff) | |
download | Nim-c5d8a5c1da9618d65ff08cb0ab6b084e07493b49.tar.gz |
Bugfix: empty echo statement
-rwxr-xr-x | lib/impure/dialogs.nim | 3 | ||||
-rwxr-xr-x | lib/pure/complex.nim | 2 | ||||
-rwxr-xr-x | lib/wrappers/gtk/gtk2.nim | 33 | ||||
-rwxr-xr-x | rod/semfold.nim | 2 | ||||
-rwxr-xr-x | tests/accept/compile/tlibs.nim | 2 |
5 files changed, 19 insertions, 23 deletions
diff --git a/lib/impure/dialogs.nim b/lib/impure/dialogs.nim index 630a0f075..ef52d573a 100755 --- a/lib/impure/dialogs.nim +++ b/lib/impure/dialogs.nim @@ -79,9 +79,8 @@ proc ChooseFileToOpen*(window: PWindow, root: string = ""): string = else: result = "" else: - assert file_chooser_dialog_new != nil var chooser = file_chooser_dialog_new("Open File", window, - FILE_CHOOSER_ACTION_OPEN, + FILE_CHOOSER_ACTION_OPEN, STOCK_CANCEL, RESPONSE_CANCEL, STOCK_OPEN, RESPONSE_OK, nil) if root.len > 0: diff --git a/lib/pure/complex.nim b/lib/pure/complex.nim index f50ff4bd0..f597a09e1 100755 --- a/lib/pure/complex.nim +++ b/lib/pure/complex.nim @@ -97,7 +97,7 @@ proc sqrt*(z: TComplex): TComplex = w = sqrt(y) * sqrt(0.5 * (r + sqrt(1.0 + r * r))) if z.re >= 0.0: result.re = w - result.im = z.im / (w * 2) + result.im = z.im / (w * 2.0) else: if z.im >= 0.0: result.im = w else: result.im = -w diff --git a/lib/wrappers/gtk/gtk2.nim b/lib/wrappers/gtk/gtk2.nim index a3a2b7157..987c40f69 100755 --- a/lib/wrappers/gtk/gtk2.nim +++ b/lib/wrappers/gtk/gtk2.nim @@ -4665,7 +4665,6 @@ proc set_in_button*(a: PButton, `in_button`: guint) proc button_down*(a: PButton): guint proc set_button_down*(a: PButton, `button_down`: guint) proc relief*(a: PButton): guint -proc set_relief*(a: PButton, `relief`: guint) proc use_underline*(a: PButton): guint proc set_use_underline*(a: PButton, `use_underline`: guint) proc use_stock*(a: PButton): guint @@ -5366,20 +5365,20 @@ proc set_auto_sort*(clist: PCList, auto_sort: gboolean){.cdecl, proc create_cell_layout*(clist: PCList, clist_row: PCListRow, column: gint): pango.PLayout{. cdecl, dynlib: lib, importc: "_gtk_clist_create_cell_layout".} const - DIALOG_MODAL* = 1 shl 0 - DIALOG_DESTROY_WITH_PARENT* = 1 shl 1 - DIALOG_NO_SEPARATOR* = 1 shl 2 - RESPONSE_NONE* = - (1) - RESPONSE_REJECT* = - (2) - RESPONSE_ACCEPT* = - (3) - RESPONSE_DELETE_EVENT* = - (4) - RESPONSE_OK* = - (5) - RESPONSE_CANCEL* = - (6) - RESPONSE_CLOSE* = - (7) - RESPONSE_YES* = - (8) - RESPONSE_NO* = - (9) - RESPONSE_APPLY* = - (10) - RESPONSE_HELP* = - (11) + DIALOG_MODAL* = cint(1 shl 0) + DIALOG_DESTROY_WITH_PARENT* = cint(1 shl 1) + DIALOG_NO_SEPARATOR* = cint(1 shl 2) + RESPONSE_NONE* = - cint(1) + RESPONSE_REJECT* = - cint(2) + RESPONSE_ACCEPT* = - cint(3) + RESPONSE_DELETE_EVENT* = - cint(4) + RESPONSE_OK* = - cint(5) + RESPONSE_CANCEL* = - cint(6) + RESPONSE_CLOSE* = - cint(7) + RESPONSE_YES* = - cint(8) + RESPONSE_NO* = - cint(9) + RESPONSE_APPLY* = - cint(10) + RESPONSE_HELP* = - cint(11) proc TYPE_DIALOG*(): GType proc DIALOG*(obj: pointer): PDialog @@ -11828,10 +11827,6 @@ proc set_button_down*(a: PButton, `button_down`: guint) = proc relief*(a: PButton): guint = result = (a.Buttonflag0 and bm_TGtkButton_relief) shr bp_TGtkButton_relief -proc set_relief*(a: PButton, `relief`: guint) = - a.Buttonflag0 = a.Buttonflag0 or - (int16(`relief` shl bp_TGtkButton_relief) and bm_TGtkButton_relief) - proc use_underline*(a: PButton): guint = result = (a.Buttonflag0 and bm_TGtkButton_use_underline) shr bp_TGtkButton_use_underline diff --git a/rod/semfold.nim b/rod/semfold.nim index 18975a604..1a55141c7 100755 --- a/rod/semfold.nim +++ b/rod/semfold.nim @@ -259,6 +259,8 @@ proc leValueConv(a, b: PNode): bool = proc magicCall(m: PSym, n: PNode): PNode = var s = n.sons[0].sym + if sonsLen(n) <= 1: return + var a = getConstExpr(m, n.sons[1]) var b, c: PNode if a == nil: return diff --git a/tests/accept/compile/tlibs.nim b/tests/accept/compile/tlibs.nim index 990d6e58d..1f81a5ede 100755 --- a/tests/accept/compile/tlibs.nim +++ b/tests/accept/compile/tlibs.nim @@ -3,7 +3,7 @@ import unicode, cgi, terminal, libcurl, web, parsexml, parseopt, parsecfg, - osproc, + osproc, complex, sdl, smpeg, sdl_gfx, sdl_net, sdl_mixer, sdl_ttf, sdl_image, sdl_mixer_nosmpeg, cursorfont, xatom, xf86vmode, xkb, xrandr, xshm, xvlib, keysym, xcms, xi, |