Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
7c89244a
Commit
7c89244a
authored
Feb 21, 2003
by
Diederik van Arkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
consolidate fixed font handling
parent
20f15543
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
Util/ioutil.dcl
Util/ioutil.dcl
+2
-0
Util/ioutil.icl
Util/ioutil.icl
+16
-0
No files found.
Util/ioutil.dcl
View file @
7c89244a
...
...
@@ -28,3 +28,5 @@ getPenAttributeColour :: ![.PenAttribute] -> Colour;
getPenAttributeBack
::
![.
PenAttribute
]
->
Colour
;
seqmap
::
(.
a
->
.(.
b
->
.
b
))
![.
a
]
!.
b
->
.
b
;
notEmpty
s
:==
not
(
isEmpty
s
)
lisFixedWidth
::
!.
FontName
!*
Picture
->
(!
Bool
,!*
Picture
)
lfilter
::
![.
Bool
]
![.
a
]
->
[.
a
]
Util/ioutil.icl
View file @
7c89244a
...
...
@@ -147,3 +147,19 @@ seqmap f [h:t] e
notEmpty
s
:==
not
(
isEmpty
s
)
//--
lisFixedWidth
::
!.
FontName
!*
Picture
->
(!
Bool
,!*
Picture
)
lisFixedWidth
fontname
env
#
((
ok
,
font
),
env
)
=
openFont
{
fName
=
fontname
,
fSize
=
12
,
fStyles
=[]}
env
|
not
ok
=
(
ok
,
env
)
// # (wide, env) = getFontCharWidth font 'M' env
// (narrow, env) = getFontCharWidth font 'i' env
#
([
wide
,
narrow
:_],
env
)
=
getFontCharWidths
font
[
'M
'
,
'
i'
]
env
=
(
wide
==
narrow
,
env
)
lfilter
::
![.
Bool
]
![.
a
]
->
[.
a
]
lfilter
[
True
:
r
]
[
a
:
x
]
=
[
a
:
lfilter
r
x
]
lfilter
[_:
r
]
[_:
x
]
=
lfilter
r
x
lfilter
_
_
=
[]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment