Commit b625f383 authored by John van Groningen's avatar John van Groningen
Browse files

system dependent parts for windows

parent 8682d7b9
definition module htoclean_file;
get_path_name :: !*World -> (!Bool,!String,!*World);
wait_for_keypress :: !*World -> *World;
DirectorySeparator :== '\\';
implementation module htoclean_file;
// for windows
import StdEnv;
import code from "program_args.o";
n_args :: Int;
n_args = code {
ccall n_args "-I"
}
program_arg :: !Int -> {#Char};
program_arg i = code {
ccall program_arg "I-S"
}
DirectorySeparator :== '\\';
wait_for_keypress :: !*World -> *World;
wait_for_keypress w
# (stdio,w) = stdio w;
stdio = stdio <<< "Press any key to exit";
(ok,c,stdio) = freadc stdio;
(ok,w) = fclose stdio 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;
w = wait_for_keypress w;
= (False,"",w);
# path_name = program_arg 1;
= (True,path_name,w);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment