This commit is contained in:
MCorange 2023-03-19 12:06:43 +02:00
parent e63e9ef891
commit d68b12fdf8
2 changed files with 6 additions and 6 deletions

View File

@ -3,14 +3,14 @@ mem 98 + 1 @8
0 while dup 98 < do 0 while dup 98 < do
0 while dup 100 < do 0 while dup 100 < do
dup mem + !8 if dup mem + !8 if
dup mem + 100 + 42 @8 dup mem + 100 + "*" @8
else else
dup mem + 100 + 32 @8 dup mem + 100 + " " @8
end end
1 + 1 +
end end
mem + 100 + 10 @8 mem + 100 + "\n" @8
101 mem 100 + 1 1 syscall3 drop 101 mem 100 + 1 1 syscall3 drop

View File

@ -60,14 +60,14 @@ pub fn linux_x86_64_compile_and_link(of_a: &PathBuf, of_o: &PathBuf, of_c: &Path
Ok(()) Ok(())
} }
pub fn linux_x86_64_run(_bin: &PathBuf, args: Vec<String>, quiet: bool) -> Result<()> { pub fn linux_x86_64_run(_bin: &PathBuf, args: Vec<String>, quiet: bool) -> Result<i32> {
let bin = PathBuf::from( let bin = PathBuf::from(
format!("./{}", _bin.to_string_lossy()) format!("./{}", _bin.to_string_lossy())
); );
let mut proc = if cfg!(target_os = "windows") { let mut proc = if cfg!(target_os = "windows") {
return Ok(()); return Ok(0);
} else { } else {
Command::new(bin) Command::new(bin)
.args(&args) .args(&args)
@ -84,5 +84,5 @@ pub fn linux_x86_64_run(_bin: &PathBuf, args: Vec<String>, quiet: bool) -> Resul
logger::info(format!("{} process exited with code {}", _bin.to_string_lossy(), exit).as_str()); logger::info(format!("{} process exited with code {}", _bin.to_string_lossy(), exit).as_str());
} }
Ok(()) Ok(exit.code().unwrap_or(0))
} }