You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5475 Reporter: nodakai Assigned to:@lefessan Status: closed (set by @xavierleroy on 2013-08-31T10:44:21Z) Resolution: fixed Priority: low Severity: minor Version: 3.13.0+dev Fixed in version: 3.13.0+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
I found a problematic code in the wrapper shell script for interpreted LablTk.
$ cat which labltk
#!/bin/sh
exec /home/nodakai/ocaml/lib/ocaml/labltk/labltktop -I /home/nodakai/ocaml/lib/ocaml/labltk $*
Original bug ID: 5475
Reporter: nodakai
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2013-08-31T10:44:21Z)
Resolution: fixed
Priority: low
Severity: minor
Version: 3.13.0+dev
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
I found a problematic code in the wrapper shell script for interpreted LablTk.
$ cat
which labltk
#!/bin/sh
exec /home/nodakai/ocaml/lib/ocaml/labltk/labltktop -I /home/nodakai/ocaml/lib/ocaml/labltk $*
Here, the last$* should be "$ @" according to sh specification.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
Currently it cannot accept an argument containing spaces.
Steps to reproduce
$ cat labltk_space.ml
let main argv =
let top = Tk.openTk () in
Wm.title_set top argv.(1);
Tk.mainLoop ()
;; main Sys.argv
$ labltk labltk_space.ml "10 20"
+---------+
[ 10 ]
+---------+
| |
| |
+---------+
Additional information
A natively compiled version doesn't suffer from the above problem
$ ocamlopt.opt -I +labltk labltk.cmxa labltk_space.ml -o labltk_space.exe
$ ./labltk_space.exe "10 20"
+---------+
[ 10 20 ]
+---------+
| |
| |
+---------+
This problem is also in trunk
http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/trunk/otherlibs/labltk/lib/Makefile?revision=HEAD&view=markup
I attached a patch for trunk.
File attachments
The text was updated successfully, but these errors were encountered: