~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to otherlibs/labltk/builtin/builtini_ScrollValue.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
(* str l -> scrllv -> str l *)
13
13
let cTKtoCAMLscrollValue = function
14
 
   "scroll"::n::"pages"::l -> 
 
14
   "scroll"::n::("pages"|"page")::l ->
15
15
     ScrollPage (int_of_string n), l
16
16
 | "scroll"::n::"units"::l ->
17
17
     ScrollUnit (int_of_string n), l
18
18
 | "moveto"::f::l ->
19
19
     MoveTo (float_of_string f), l
20
 
 | _ -> raise (Invalid_argument "TKtoCAMLscrollValue")
 
20
 | l -> raise (Invalid_argument (String.concat " " ("TKtoCAMLscrollValue"::l)))
21
21
;;
22
22
 
23
23
##else
33
33
 
34
34
(* str l -> scrllv -> str l *)
35
35
let cTKtoCAMLscrollValue = function
36
 
 | "scroll" :: n :: "pages" :: l -> 
 
36
 | "scroll" :: n :: ("pages"|"page") :: l ->
37
37
     `Page (int_of_string n), l
38
38
 | "scroll" :: n :: "units" :: l ->
39
39
     `Unit (int_of_string n), l
40
40
 | "moveto" :: f :: l ->
41
41
     `Moveto (float_of_string f), l
42
 
 | _ -> raise (Invalid_argument "TKtoCAMLscrollValue")
 
42
 | l -> raise (Invalid_argument (String.concat " " ("TKtoCAMLscrollValue"::l)))
43
43
;;
44
44
 
45
45
##endif