From 20eefefc0d8ae574d0114e168d9b7116160d2bc6 Mon Sep 17 00:00:00 2001
From: Wei Li
Date: Thu, 9 Jul 2026 14:17:27 -0400
Subject: [PATCH 1/3] Route compiled-code output to the R console
(Bioconductor)
Bioconductor / R CMD check flags compiled code that writes to stdout/stderr.
Replace std::cout/std::cerr/printf with Rcpp::Rcout/Rcpp::Rcerr/Rprintf in
src/RRA.cpp, src/fileio.cpp and src/rngs.cpp (fprintf() calls that write to
the RRA output *file* are unchanged).
Verified: scMAGeCK.so no longer references std::cout/cerr/printf/puts/putchar,
and scmageck_rra output on the bundled demo is byte-identical to before
(full result table all.equal == TRUE; lo_value sums unchanged).
---
src/RRA.cpp | 97 +++++++++++++++++++++++++-------------------------
src/fileio.cpp | 23 ++++++------
src/rngs.cpp | 9 ++---
3 files changed, 66 insertions(+), 63 deletions(-)
diff --git a/src/RRA.cpp b/src/RRA.cpp
index 64376cc..01c165f 100644
--- a/src/RRA.cpp
+++ b/src/RRA.cpp
@@ -20,6 +20,7 @@
#include