]> Repositorios git - scryer-prolog.git/commitdiff
replace \n\r and \r\n by \n (#221)
authorMark Thom <[email protected]>
Mon, 28 Oct 2019 02:50:21 +0000 (20:50 -0600)
committerMark Thom <[email protected]>
Mon, 28 Oct 2019 02:50:21 +0000 (20:50 -0600)
src/prolog/machine/machine_state.rs
src/prolog/machine/mod.rs

index 813face991e3c6f17bada7cb13141f53f5abd159..318d8c135d376ddb9f4a9ab0435097bf331b8fcd 100644 (file)
@@ -706,7 +706,7 @@ pub(crate) trait CallPolicy: Any {
             &BuiltInClauseType::Nl => {
                 let mut stdout = stdout();
 
-                write!(stdout, "\n\r").unwrap();
+                write!(stdout, "\n").unwrap();
                 stdout.flush().unwrap();
                 return_from_clause!(machine_st.last_call, machine_st)
             }
index 50aba7f6f522319168aee3d9f9b148519a8603d9..dfd43ae257eba8ddc4013c9623f0a921e9c44cad 100644 (file)
@@ -722,11 +722,11 @@ impl Machine {
 
                     let result = match keypress {
                         ContinueResult::ContinueQuery => {
-                           print!(" ;\r\n");
+                           print!(" ;\n");
                             self.continue_query(&alloc_locs)
                         }
                         ContinueResult::Conclude => {
-                           print!(" ...\r\n");
+                           print!(" ...\n");
                             self.absorb_snapshot(snapshot);
                             return;
                         }
@@ -738,7 +738,7 @@ impl Machine {
                                 self.propagate_exception_to_toplevel(snapshot);
                                 return;
                             } else {
-                               print!("false.\r\n");
+                               print!("false.\n");
                                 self.absorb_snapshot(snapshot);
                                 return;
                             }
@@ -752,7 +752,7 @@ impl Machine {
                     }
                 } else {
                     if bindings.is_empty() && attr_goals.is_empty() {
-                        print!("true.\r\n");
+                        print!("true.\n");
                     } else {
                         let space = if !attr_goals.is_empty() {
                             if requires_space(&attr_goals, ".") {
@@ -768,7 +768,7 @@ impl Machine {
                             }
                         };
 
-                       print!("{}.\r\n", space);
+                       print!("{}.\n", space);
                     }
 
                     break;