Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clm
Commits
8682d7b9
Commit
8682d7b9
authored
Oct 27, 2003
by
John van Groningen
Browse files
system dependent parts for unix
parent
93162a47
Changes
2
Hide whitespace changes
Inline
Side-by-side
htoclean/htoclean source code/unix/htoclean_file.dcl
0 → 100644
View file @
8682d7b9
definition
module
htoclean_file
;
get_path_name
::
!*
World
->
(!
Bool
,!
String
,!*
World
);
wait_for_keypress
::
!*
World
->
*
World
;
DirectorySeparator
:==
'/'
;
htoclean/htoclean source code/unix/htoclean_file.icl
0 → 100644
View file @
8682d7b9
implementation
module
htoclean_file
;
// for unix
import
StdEnv
;
import
ArgEnv
;
args
=:
getCommandLine
;
n_args
:==
size
args
;
program_arg
i
:==
args
.[
i
];
DirectorySeparator
:==
'/'
;
wait_for_keypress
::
!*
World
->
*
World
;
wait_for_keypress
w
=
w
;
get_path_name
::
!*
World
->
(!
Bool
,!
String
,!*
World
);
get_path_name
w
#
n_arguments
=
n_args
;
|
n_arguments
<>
2
#
stderr
=
fwrites
"Usage: htoclean h_file_name
\n
"
stderr
;
stderr
=
fwrites
"Generates a .icl and .dcl file for a c header file
\n
"
stderr
;
(_,
w
)
=
fclose
stderr
w
;
=
(
False
,
""
,
w
);
#
path_name
=
program_arg
1
;
=
(
True
,
path_name
,
w
);
/* old unix code ?/
n_args:==GetArgC;
program_arg i:==GetArgvN i;
GetArgC :: Int;
GetArgC = code {
ccall get_argc ":I"
}
GetArgvN :: !Int -> String;
GetArgvN n = code {
ccall get_argv_n "I:S"
}
*/
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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