@ -17,6 +17,8 @@
using namespace std ;
using namespace std ;
using namespace fmt ;
using namespace fmt ;
# define BUF_MAX 1024
/*
/*
* No idea what the semantics of this are . Will need
* No idea what the semantics of this are . Will need
* to research git ' s dumb terminology to figure out why
* to research git ' s dumb terminology to figure out why
@ -124,7 +126,7 @@ void list_git_changes(git_repository* repo) {
void run_build ( const char * command ) {
void run_build ( const char * command ) {
regex err_re ( " (.*?) : ( [ 0 - 9 ] + ) : ( [ 0 - 9 ] + ) : \ \ s * ( . * ? ) : \ \ s * ( . * ) " ) ;
regex err_re ( " (.*?) : ( [ 0 - 9 ] + ) : ( [ 0 - 9 ] + ) : \ \ s * ( . * ? ) : \ \ s * ( . * ) " ) ;
char buffer [ LINE_MAX ] ; // LINE _MAX is a define already?
char buffer [ BUF_MAX ] ; // BUF _MAX is a define already?
smatch err ;
smatch err ;
ofstream stats_out ;
ofstream stats_out ;
stats_out . open ( " stats.csv " , ios : : out | ios : : app ) ;
stats_out . open ( " stats.csv " , ios : : out | ios : : app ) ;
@ -137,7 +139,7 @@ void run_build(const char* command) {
FILE * build_out = popen ( command , " r " ) ;
FILE * build_out = popen ( command , " r " ) ;
dbc : : check ( build_out ! = nullptr , " Failed to run command. " ) ;
dbc : : check ( build_out ! = nullptr , " Failed to run command. " ) ;
while ( fgets ( buffer , LINE _MAX, build_out ) ! = nullptr ) {
while ( fgets ( buffer , BUF _MAX, build_out ) ! = nullptr ) {
string line ( buffer ) ; // yeah, that's probably a problem
string line ( buffer ) ; // yeah, that's probably a problem
print ( " {} \n " , line ) ;
print ( " {} \n " , line ) ;