Commit 2e7d8320 authored by Diederik van Arkel's avatar Diederik van Arkel

Modified for new 2.0 import syntax

parent 6a5b4200
......@@ -8,7 +8,7 @@ definition module GameFunctions
// ********************************************************************************
import gameintrface_12, osgame
from StdIOBasic import Point2
from StdIOBasic import :: Point2
// game result codes (GRESULT)
GR_OK :== 0
......
......@@ -8,4 +8,4 @@ definition module StdGSt
// Modified: 7 Sept 2001 for Clean 2.0 (Peter Achten)
// ********************************************************************************
from gst import GSt, appGSt, accGSt, IdFun, St
from gst import :: St, :: IdFun, accGSt, appGSt, :: GSt;
......@@ -10,12 +10,10 @@ definition module StdGame
import StdInt, StdString
from StdIOCommon import ErrorReport,
NoError, ErrorViolateDI, ErrorIdsInUse,
ErrorUnknownObject, OtherError
from StdPSt import PSt, IOSt
from StdIOCommon import :: ErrorReport
from StdPSt import :: PSt
import StdGameDef
from osgame import GRESULT
from osgame import :: GRESULT
/* predefined bounds */
......
......@@ -11,7 +11,6 @@ from windowcreate import bufferDelayedEvents
from windowvalidate import validateWindowId
from ostypes import OSNoWindowPtr
/* predefined bounds */
BND_MAP_CODES :== 1 << 30
BND_STATIC_BOUNDS :== 1 << 31
......
......@@ -9,13 +9,11 @@ definition module StdGameDef
// ********************************************************************************
import StdString
from StdFunc import St
from StdOverloaded import zero
from StdIOBasic import Point2, Size, IdFun
from StdMaybe import Maybe, Just, Nothing
from StdPictureDef import Colour, RGB, RGBColour, Black, White,
DarkGrey, Grey, LightGrey, Red, Green,
Blue, Cyan, Magenta, Yellow
from StdFunc import :: St
from StdOverloaded import class zero
from StdIOBasic import :: IdFun, :: Size(..), :: Point2(..)
from StdMaybe import :: Maybe(..)
from StdPictureDef import :: Colour(..), ::RGBColour(..)
import StdGSt
......
implementation module StdGameDef
import StdString
from StdFunc import St
from StdOverloaded import zero
from StdIOBasic import Point2, Size, IdFun
from StdMaybe import Maybe, Just, Nothing
from StdPictureDef import Colour, RGB, RGBColour, Black, White,
DarkGrey, Grey, LightGrey, Red, Green,
Blue, Cyan, Magenta, Yellow
from StdFunc import :: St
from StdOverloaded import class zero
from StdIOBasic import :: Point2, :: Size, :: IdFun
from StdMaybe import :: Maybe
from StdPictureDef import :: Colour
import StdGSt
:: GameAttribute gs
......
......@@ -8,8 +8,8 @@ definition module gameCrossCall_12
// ********************************************************************************
import clCrossCall_12, gameintrface_12
from ostypes import OSWindowPtr
from oswindow import DelayActivationInfo
from ostypes import :: OSWindowPtr
from oswindow import :: DelayActivationInfo
// Initialisation of game. This function must be called before any game cross call can be done!
WinInitialiseGame :: !*OSToolbox -> *OSToolbox
......
......@@ -7,8 +7,8 @@ definition module gameintrface_12
// Modified: 7 Sept 2001 for Clean 2.0 (Peter Achten)
// ********************************************************************************
from ostoolbox import OSToolbox
from pictCCall_12 import RGBcolor
from ostoolbox import :: OSToolbox
from pictCCall_12 import :: RGBcolor
:: BID :== Int // Bitmap ID
......
implementation module gameintrface_12
from ostoolbox import OSToolbox
from pictCCall_12 import RGBcolor
from ostoolbox import :: OSToolbox
from pictCCall_12 import :: RGBcolor
:: BID :== Int // Bitmap ID
......
......@@ -7,9 +7,9 @@ definition module gst
// Modified: 7 Sept 2001 for Clean 2.0 (Peter Achten)
// ********************************************************************************
import ostoolbox
from StdFunc import St
from StdIOBasic import IdFun
import ostoolbox
from StdFunc import :: St
from StdIOBasic import :: IdFun
:: *GSt gs
......
implementation module gst
import ostoolbox
from StdFunc import St
from StdIOBasic import IdFun
from StdFunc import :: St
from StdIOBasic import :: IdFun
:: *GSt gs
= { gs :: gs
......
......@@ -7,7 +7,7 @@ definition module notes
// Modified: 7 Sept 2001 for Clean 2.0 (Peter Achten)
// ********************************************************************************
from StdGame import Frequency
from StdGame import :: Frequency
MIDDLE_C :== 38
......
......@@ -7,7 +7,7 @@ definition module osgame
// Modified: 7 Sept 2001 for Clean 2.0 (Peter Achten)
// ********************************************************************************
from StdIOBasic import Point2
from StdIOBasic import :: Point2
import gamehandle, gameintrface_12, ostypes
:: OSGameData gs
......
......@@ -9,7 +9,7 @@ definition module Help
// **************************************************************************************************
import StdString
from StdPSt import PSt, IOSt
from StdPSt import :: PSt
showAbout :: String String (PSt *l) -> PSt *l
/* showAbout opens a window:
......
......@@ -9,9 +9,8 @@ definition module Highscore
// **************************************************************************************************
import StdString
from StdFile import FileSystem, Files
from StdPSt import PSt, IOSt
from StdId import Id
from StdFile import class FileSystem
from StdPSt import :: PSt
:: HiScores
:== [HiScore]
......
definition module state
from StdPSt import PSt,IOSt
from StdPSt import :: PSt
import board
......
......@@ -690,7 +690,9 @@ warn info canceltext oktext fun pState
= openNotice (Notice info (NoticeButton oktext (noLS (fun o cancel))) [NoticeButton canceltext id]) pState
cancel pState
# (Just id,pState) = accPIO getActiveWindow pState
# (maybeId,pState) = accPIO getActiveWindow pState
| isNothing maybeId = pState
# id = fromJust maybeId
= closeWindow id pState
insertindex :: !(a -> a -> Bool) !a !u:[a] -> (!Int,!v:[a]), [u <= v]
......
definition module showtm
from StdPicture import Picture, Point2
from StdPicture import :: Point2, :: Picture
import tm
MaxX :== 29900
......
implementation module showtm
import StdArray, StdBool, StdClass, StdInt
from StdString import length, %
from StdChar import toString
from StdString import instance % {#}
import StdPicture
import tm
......
definition module tmdialog
from StdId import Ids, Id, R2Id, RId
from StdPSt import PSt, IOSt
from StdIOCommon import IdFun
from StdId import :: Id, class Ids
from StdPSt import :: PSt
from StdIOCommon import :: IdFun
import tm
HelpFile
......
definition module tmfile
import StdString
from StdFile import FileSystem, Files
from tm import Turing, Transition, Tape, State, Head
from StdFile import class FileSystem
from tm import :: Turing
WriteTuringToFile :: Turing !String !*env -> (!Bool,!*env) | FileSystem env
ReadTuring :: !String !*env -> (!(!Int,!Turing),!*env) | FileSystem env
......
......@@ -3,7 +3,7 @@ implementation module tmfile
import StdArray, StdBool, StdChar, StdClass, StdFile, StdInt, StdList, StdString
from StdSystem import dirseparator
from tm import Turing, State, Tape, Transition, Head
from tm import :: Turing{..}, :: State, :: Tape{..}, :: Transition{..}, :: Head
DummyTuring :== {transitions=[],tape=DummyTape,state=""}
......
......@@ -2,8 +2,8 @@ definition module clCCall_12
// Clean Object I/O library, version 1.2
from StdIOCommon import Modifiers
from ostoolbox import OSToolbox
from StdIOCommon import :: Modifiers
from ostoolbox import :: OSToolbox
:: CSTR :== Int
......
implementation module clCCall_12
import StdClass, StdInt
from StdIOCommon import Modifiers
from ostoolbox import OSToolbox
from StdIOCommon import :: Modifiers{..}
from ostoolbox import :: OSToolbox
import code from "cCCallSystem_121.obj",
"cCCallWindows_121.obj",
"cCrossCallWindows_121.obj",
......
......@@ -3,7 +3,7 @@ implementation module clipboardCrossCall_12
import StdBool, StdClass, StdInt, StdMisc
import clCrossCall_12
from clCCall_12 import winMakeCString, winGetCStringAndFree, winReleaseCString, CSTR
from clCCall_12 import winMakeCString, winGetCStringAndFree, winReleaseCString, :: CSTR
import code from "cCrossCallClipboard_121.obj"
......
......@@ -2,9 +2,9 @@ definition module menuCrossCall_12
import StdString
from StdIOCommon import Modifiers
from ostoolbox import OSToolbox
from ostypes import HWND
from StdIOCommon import :: Modifiers
from ostoolbox import :: OSToolbox
from ostypes import :: HWND
:: HITEM :== Int
......
......@@ -2,10 +2,10 @@ implementation module menuCrossCall_12
import StdInt, StdMisc, StdTuple
from StdIOCommon import Modifiers
from StdIOCommon import :: Modifiers
import clCrossCall_12
from clCCall_12 import winMakeCString, winReleaseCString, CSTR, toModifiers
from ostypes import HWND
from clCCall_12 import winMakeCString, winReleaseCString, :: CSTR, toModifiers
from ostypes import :: HWND
:: HITEM :== Int
......
......@@ -9,8 +9,8 @@ definition module menuevent
import deviceevents, devicesystemstate, menuhandle
from iostate import PSt, IOSt
from osmenu import OSTrackPopUpMenu, OSTrackPopUpMenuResult, PopUpTrackedByIndex, PopUpTrackedByItemId
from iostate import :: PSt
from osmenu import :: OSTrackPopUpMenu
menuEvent :: !SchedulerEvent !(PSt .l) -> (!Bool,!Maybe DeviceEvent,!SchedulerEvent,!PSt .l)
......
......@@ -3,8 +3,8 @@ implementation module menuevent
import StdBool, StdList, StdMisc
import clCrossCall_12
from clCCall_12 import winMakeCString, CSTR, toModifiers
from osmenu import osMenuItemCheck, OSTrackPopUpMenu, OSTrackPopUpMenuResult, PopUpTrackedByIndex, PopUpTrackedByItemId
from clCCall_12 import winMakeCString, :: CSTR, toModifiers
from osmenu import osMenuItemCheck, :: OSTrackPopUpMenu{..}, :: OSTrackPopUpMenuResult(..)
import commondef, deviceevents, iostate
from menuaccess import menuStateHandleGetHandle, menuStateHandleGetMenuId
from processstack import topShowProcessShowState
......
......@@ -6,7 +6,7 @@ definition module menuwindowmenu
// The definition and implementation of the WindowMenu.
from iostate import PSt, IOSt
from iostate import :: PSt, :: IOSt
import windowhandle
......
......@@ -3,7 +3,7 @@ implementation module menuwindowmenu
// The definition and implementation of the WindowMenu.
// PA: implementation not required on Windows platform.
from iostate import PSt, IOSt
from iostate import :: IOSt, :: PSt
import windowhandle
......
......@@ -2,6 +2,6 @@ definition module osbeep
// Clean Object I/O library, version 1.2
from ostoolbox import OSToolbox
from ostoolbox import :: OSToolbox
osBeep :: !*OSToolbox -> *OSToolbox
implementation module osbeep
from clCCall_12 import winBeep
from ostoolbox import OSToolbox
from ostoolbox import :: OSToolbox
osBeep :: !*OSToolbox -> *OSToolbox
osBeep toolbox
......
......@@ -5,7 +5,7 @@ definition module osclipboard
// Clipboard operations.
import ostoolbox
from clipboardCrossCall_12 import CF_TEXT
from clipboardCrossCall_12 import CF_TEXT
:: OSClipboardItemType
......
......@@ -3,8 +3,8 @@ definition module osdocumentinterface
// Clean object I/O library, version 1.2
import StdIOCommon
from menuCrossCall_12 import HMENU
import ostoolbar, ostoolbox, ostypes
from menuCrossCall_12 import :: HMENU
import ostoolbar, ostoolbox, ostypes
:: OSDInfo
= OSMDInfo !OSMDInfo
......
......@@ -4,7 +4,7 @@ implementation module osdocumentinterface
import StdMaybe, StdOverloaded, StdString, StdTuple
import clCrossCall_12, ostoolbar, ossystem, ostypes, windowCrossCall_12
from commondef import fatalError
from StdIOCommon import DocumentInterface, MDI, SDI, NDI
from StdIOCommon import :: DocumentInterface(..)
import code from "cCrossCallxDI_121.obj"
......
......@@ -2,12 +2,12 @@ definition module osevent
// Clean Object I/O library, version 1.2
from StdInt import ^,-
from clCrossCall_12 import CrossCallInfo
from ostoolbox import OSToolbox
from ostime import OSTime
from ostypes import OSWindowPtr
from StdMaybe import Maybe, Just, Nothing
from StdInt import class ^(..), instance ^ Int, class -(..), instance - Int
from clCrossCall_12 import :: CrossCallInfo
from ostoolbox import :: OSToolbox
from ostime import :: OSTime
from ostypes import :: OSWindowPtr
from StdMaybe import :: Maybe
:: *OSEvents
......
......@@ -3,8 +3,7 @@ implementation module osevent
import StdBool, StdList, StdMisc, StdTuple
import clCrossCall_12, ostime, ostoolbox, ostypes
from commondef import hdtl, fatalError
from StdMaybe import Maybe, Just, Nothing
//import StdDebug, tracetypes
from StdMaybe import :: Maybe(..)
oseventFatalError :: String String -> .x
......
......@@ -3,7 +3,7 @@ definition module osfileselect
// Clean Object I/O library, version 1.2
import StdString
from ostoolbox import OSToolbox
from ostoolbox import :: OSToolbox
import osevent
osInitialiseFileSelectors :: !*OSToolbox -> *OSToolbox
......
......@@ -3,7 +3,7 @@ implementation module osfileselect
import StdBool, StdInt
import clCrossCall_12, osevent
from clCCall_12 import winMakeCString, winGetCStringAndFree, winReleaseCString, CSTR
from clCCall_12 import winMakeCString, winGetCStringAndFree, winReleaseCString, :: CSTR
from commondef import fatalError
import code from "cCrossCallFileSelectors_121.obj"
......
......@@ -4,9 +4,9 @@ definition module osfont
// Clean Object I/O library, version 1.2
from StdOverloaded import ==
from ostoolbox import OSToolbox
from ostypes import OSPictContext
from StdOverloaded import class ==
from ostoolbox import :: OSToolbox
from ostypes import :: OSPictContext
:: Font
......
......@@ -3,10 +3,10 @@ implementation module osfont
import StdBool, StdClass, StdEnum, StdReal
import clCrossCall_12, pictCCall_12
from clCCall_12 import winMakeCString, winGetCString, CSTR, winGetVertResolution
from StdPictureDef import FontName, FontSize, FontStyle, BoldStyle, ItalicsStyle, UnderlinedStyle
from clCCall_12 import winMakeCString, winGetCString, :: CSTR, winGetVertResolution
from StdPictureDef import :: FontName, :: FontSize, :: FontStyle, BoldStyle, ItalicsStyle, UnderlinedStyle
from commondef import fatalError, isBetween, minmax, stateMap
from ostypes import OSPictContext, HDC
from ostypes import :: OSPictContext, :: HDC
:: Font
......
......@@ -4,9 +4,9 @@ definition module osmenu
// Clean Object I/O library, version 1.2
from StdMaybe import Maybe, Just, Nothing
from StdIOCommon import Modifiers
from menuCrossCall_12 import HMENU, HITEM
from StdMaybe import :: Maybe
from StdIOCommon import :: Modifiers
from menuCrossCall_12 import :: HMENU, :: HITEM
import osdocumentinterface, ostoolbox, ostypes
......
......@@ -3,10 +3,10 @@ implementation module osmenu
import StdBool, StdChar, StdClass, StdInt, StdString
import StdMaybe
from StdIOCommon import Modifiers
from StdIOCommon import :: Modifiers
import menuCCall_12, menuCrossCall_12
from osdocumentinterface import OSMenuBar
from ostypes import OSWindowPtr, OSNoWindowPtr
from osdocumentinterface import :: OSMenuBar{..}
from ostypes import :: OSWindowPtr, OSNoWindowPtr
// Types for menus and menu elements:
......
......@@ -2,7 +2,7 @@ definition module osmouse
// Clean Object I/O library, version 1.2
from ostoolbox import OSToolbox
from ostoolbox import :: OSToolbox
// RWS ??? returned resolution
osGetDoubleClickTime :: !*OSToolbox -> (!Int, !*OSToolbox)
implementation module osmouse
from ostoolbox import OSToolbox
from ostoolbox import :: OSToolbox
// RWS ??? returned resolution
osGetDoubleClickTime :: !*OSToolbox -> (!Int, !*OSToolbox)
......
......@@ -7,9 +7,9 @@ definition module ospicture
*/
import osrgn, ostypes
from