From 45d6e8ef760c1f684c9e8463c35ed25d2feed736 Mon Sep 17 00:00:00 2001
From: Per Lindgren <per.lindgren@ltu.se>
Date: Sat, 17 Nov 2018 06:19:33 +0100
Subject: [PATCH] tidy

---
 src/main.rs | 141 +---------------------------------------------------
 1 file changed, 1 insertion(+), 140 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index cca278b..e60a45e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -255,7 +255,7 @@ fn main() {
         .output()
         .expect("failed to execute process");
     let dump = c.output().expect("failed to execute process");
-    //println!("{:?}", dump);
+
     println!("\nstatus: {:?}", dump.status);
     println!("\nstdout: {:?}", str::from_utf8(&dump.stdout).unwrap());
     println!("\nstderr: {:?}", str::from_utf8(&dump.stderr).unwrap());
@@ -292,143 +292,4 @@ fn main() {
     }
 
     println!("{:?}", Dot::with_config(&g, &[Config::EdgeNoLabel]));
-
-    // let hello = c.stdout();
-
-    // let mut p = c.spawn().unwrap();
-    // let mut pstderr = p.stderr.take().unwrap();
-    // let mut buf = [0; 1024];
-    // let mut output = vec![];
-
-    // let stderr = io::stderr();
-    // let mut stderr = stderr.lock();
-    // loop {
-    //     if let Ok(n) = pstderr.read(&mut buf) {
-    //         stderr.write(&buf[..n]).unwrap();
-    //         output.extend_from_slice(&buf[..n]//
-    //     }
-
-    //     if let Some(status) = p.try_wait().unwrap() {
-    //         assert!(status.success());
-    //         break;
-    //     }
-    // }
-
-    // -analyze -print-callgraph /home/pln/rust/stack-test/target/thumbv7m-none-eabi/release/deps/stack_test-87f399c0e9e1fb93.ll
-
-    // } else {
-    //     panic!("could not determine hash, please recompile in `--release` mode");
-    // }
-
-    // find out the argument passed to `--example`, if used at all
-    // let mut example = None;
-    // let mut iargs = args.iter();
-    // while let Some(arg) = iargs.next() {
-    //     if arg == "--example" {
-    //         example = iargs.next();
-    //         break;
-    //     }
-    // }
-
-    // let output = str::from_utf8(&output).unwrap();
-
-    // if let (Some(hash), Some(crate_name), example) = parse_output(&output) {
-    //     println!("{:?}, {:?}, {:?}", example, hash, crate_name);
-    // } else {
-    //     panic!("could not determine hash, please recompile in `--release` mode");
-    // }
-
-    // // get the suffix of the example
-    // let (example, suffix) = if let Some(example) = example {
-    //     let mut suffix = None;
-    //     let output = str::from_utf8(&output).unwrap();
-    //     println!("here ...");
-    //     for line in output.lines() {
-    //         if line.contains(&format!("examples/{}.rs", example)) {
-    //             for part in line.split(' ') {
-    //                 if part.starts_with("extra-filename=") {
-    //                     suffix = part.split('=').nth(1);
-    //                 }
-    //             }
-    //         }
-    //     }
-    //     match suffix {
-    //         None => panic!(format!(
-    //             "Cannot determine hash, please run `touch example/{}.rs` to force recompiltaion.",
-    //             example
-    //         )),
-    //         Some(s) => (example, s),
-    //     }
-    // } else {
-    //     // nothing to do if the user didn't use `--example`
-    //     println!("try to determinte hash");
-    //     let output = str::from_utf8(&output).unwrap();
-    //     println!("here ...");
-    //     let mut suffix = None;
-    //     for line in output.lines() {
-    //         for part in line.split(' ') {
-    //             if part.starts_with("extra-filename=") {
-    //                 suffix = part.split('=').nth(1);
-    //             }
-    //         }
-    //     }
-    //     match suffix {
-    //         None => panic!(format!(
-    //             "Cannot determine hash, please force recompiltaion."
-    //         )),
-    //         Some(s) => panic!("main hash {}", s),
-    //     }
-    //     // return;
-    // };
-
-    // println!("{:?}", (example, suffix));
-
-    /*
-        let profile = if args.iter().any(|a| a == "--release") {
-            "release"
-        } else {
-            "debug"
-        };
-    
-        let mut docker = Command::new("docker");
-        docker
-            .arg("run")
-            .arg("--rm")
-            .args(&["--user", &format!("{}:{}", uid(), gid())])
-            .args(&[
-                "-v",
-                &format!("{}:/mnt", env::current_dir().unwrap().display()),
-            ])
-            .args(&["-w", "/mnt"])
-            .arg("-it")
-            .arg("afoht/llvm-klee-4")
-            .args(&[
-                "/usr/bin/klee",
-                &format!("target/{}/examples/{}{}.bc", profile, example, suffix),
-            ]);
-    
-        // print full command for debugging purposes
-        eprintln!("{:?}", docker);
-    
-        assert!(docker.status().unwrap().success());
-    }
-    
-    // NOTE from cross
-    fn gid() -> u32 {
-        unsafe { libc::getgid() }
-    }
-    
-    // NOTE from cross
-    fn uid() -> u32 {
-        unsafe { libc::getuid() }
-        */
 }
-// blx511
-// ARN
-// LINDGREN
-// PER
-// 03021968 PiteƄ
-// Swedish
-// pass#
-// Aquamarine
-// Tourist
-- 
GitLab