]> git.sesse.net Git - stockfish/blobdiff - src/main.cpp
Restore std::cout instead of printf()
[stockfish] / src / main.cpp
index 2b039161aa18cda7f12ec3aa490499c52da7a104..1a8309700555bfd61ef916fad97619d48d50386f 100644 (file)
@@ -17,7 +17,6 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <cstdio>
 #include <iostream>
 #include <string>
 
@@ -36,14 +35,7 @@ extern void kpk_bitbase_init();
 
 int main(int argc, char* argv[]) {
 
-  // Disable IO buffering for C and C++ standard libraries
-  setvbuf(stdin, NULL, _IONBF, 0);
-  setvbuf(stdout, NULL, _IONBF, 0);
-  cout.rdbuf()->pubsetbuf(NULL, 0);
-  cin.rdbuf()->pubsetbuf(NULL, 0);
-
-  // Startup initializations
-  init_bitboards();
+  bitboards_init();
   Position::init();
   kpk_bitbase_init();
   Search::init();
@@ -58,7 +50,7 @@ int main(int argc, char* argv[]) {
 
       uci_loop(); // Enter the UCI loop and wait for user input
   }
-  else if (string(argv[1]) == "bench" && argc < 8)
+  else if (string(argv[1]) == "bench")
       benchmark(argc, argv);
 
   else