History

stripped extraneous whitespace from src/

used the following commands: find . -type f -name "*.h" | xargs sed -i 's/\s*$//g' find . -type f -name "*.cpp" | xargs sed -i 's/\s*$//g'

nshaheed committed 4 years ago

Commit e27927b1 parent f4eeefe90 files · +7646 −7646Browse files

Showing the changes to src/core/chuck_errmsg.cpp (1 of 90 files). Show all

Unified · Split

src/core/chuck_errmsg.cpp+28−28
@@ -79,10 +79,10 @@ void ck_fprintf_stdout( const char * format, ... ) · 78 unmodified lines
7979 va_start( args, format );
8080 vsnprintf( g_buffer2, g_buffer2_size, format, args );
8181 va_end( args );
82−
82+
8383 // send the formatted string to the buffer
8484 g_stdout_stream << g_buffer2;
85−
85+
8686 // try flushing
8787 ck_fflush_stdout();
8888 }
@@ -95,10 +95,10 @@ void ck_fprintf_stderr( const char * format, ... ) · 6 unmodified lines
9595 va_start( args, format );
9696 vsnprintf( g_buffer2, g_buffer2_size, format, args );
9797 va_end( args );
98−
98+
9999 // send the formatted string to the buffer
100100 g_stderr_stream << g_buffer2;
101−
101+
102102 // try flushing
103103 ck_fflush_stderr();
104104 }
@@ -112,7 +112,7 @@ void ck_fflush_stdout() · 7 unmodified lines
112112 // send to stdout
113113 fprintf( stdout, "%s", g_stdout_stream.str().c_str() );
114114 fflush( stdout );
115−
115+
116116 // and clear buffer
117117 g_stdout_stream.str( std::string() );
118118 }
@@ -124,7 +124,7 @@ void ck_fflush_stdout() · 5 unmodified lines
124124 {
125125 // if so, emit to callback
126126 g_stdout_callback( g_stdout_stream.str().c_str() );
127−
127+
128128 // and clear buffer
129129 g_stdout_stream.str( std::string() );
130130 }
@@ -140,7 +140,7 @@ void ck_fflush_stderr() · 9 unmodified lines
140140 // send to stderr
141141 fprintf( stderr, "%s", g_stderr_stream.str().c_str() );
142142 fflush( stderr );
143−
143+
144144 // and clear buffer
145145 g_stderr_stream.str( std::string() );
146146 }
@@ -152,7 +152,7 @@ void ck_fflush_stderr() · 5 unmodified lines
152152 {
153153 // if so, emit to callback
154154 g_stderr_callback( g_stderr_stream.str().c_str() );
155−
155+
156156 // and clear buffer
157157 g_stderr_stream.str( std::string() );
158158 }
@@ -164,10 +164,10 @@ void ck_vfprintf_stdout( const char * format, va_list args ) · 5 unmodified lines
164164 {
165165 // evaluate the format string
166166 vsnprintf( g_buffer2, g_buffer2_size, format, args );
167−
167+
168168 // send the formatted string to the buffer
169169 g_stdout_stream << g_buffer2;
170−
170+
171171 // try flushing
172172 ck_fflush_stdout();
173173 }
@@ -177,10 +177,10 @@ void ck_vfprintf_stderr( const char * format, va_list args ) · 3 unmodified lines
177177 {
178178 // evaluate the format string
179179 vsnprintf( g_buffer2, g_buffer2_size, format, args );
180−
180+
181181 // send the formatted string to the buffer
182182 g_stderr_stream << g_buffer2;
183−
183+
184184 // try flushing
185185 ck_fflush_stderr();
186186 }
@@ -374,14 +374,14 @@ static IntList linePos=NULL; · 187 unmodified lines
374374 static int lastErrorCat(const char * str)
375375 {
376376 assert(g_lasterrorIndex <= LASTERROR_SIZE-1);
377−
377+
378378 size_t len = strlen(str);
379−
379+
380380 strncat(g_lasterror, str, LASTERROR_SIZE-g_lasterrorIndex-1);
381−
381+
382382 size_t appendCount = ck_min(LASTERROR_SIZE-g_lasterrorIndex-1, len);
383383 g_lasterrorIndex += appendCount;
384−
384+
385385 return appendCount > 0;
386386 }
387387
@@ -430,7 +430,7 @@ void EM_reset_msg() · 42 unmodified lines
430430 g_lasterrorIndex = 0;
431431 }
432432
433−// [%s]:line(%d).char(%d):
433+// [%s]:line(%d).char(%d):
434434 void EM_error( int pos, const char * message, ... )
435435 {
436436 va_list ap;
@@ -438,15 +438,15 @@ void EM_error( int pos, const char * message, ... ) · 1 unmodified line
438438 int num = lineNum;
439439
440440 anyErrors = TRUE;
441− while( lines && lines->i >= pos )
441+ while( lines && lines->i >= pos )
442442 {
443443 lines = lines->rest;
444444 num--;
445445 }
446−
446+
447447 // separate errmsgs with newlines
448448 if( g_lasterror[0] != '\0' ) lastErrorCat( "\n" );
449−
449+
450450 CK_FPRINTF_STDERR( "[%s]:", *fileName ? mini(fileName) : "chuck" );
451451 sprintf( g_buffer, "[%s]:", *fileName ? mini(fileName) : "chuck" );
452452 lastErrorCat( g_buffer );
@@ -458,7 +458,7 @@ void EM_error( int pos, const char * message, ... ) · 5 unmodified lines
458458 }
459459 CK_FPRINTF_STDERR( " " );
460460 lastErrorCat( " " );
461−
461+
462462 va_start(ap, message);
463463 CK_VFPRINTF_STDERR( message, ap);
464464 va_end(ap);
@@ -466,7 +466,7 @@ void EM_error( int pos, const char * message, ... ) · 1 unmodified line
466466 va_start(ap, message);
467467 vsprintf( g_buffer, message, ap );
468468 va_end(ap);
469−
469+
470470 CK_FPRINTF_STDERR( "\n");
471471 CK_FFLUSH_STDERR();
472472 lastErrorCat( g_buffer );
@@ -482,7 +482,7 @@ void EM_error2( int line, const char * message, ... ) · 9 unmodified lines
482482
483483 // separate errmsgs with newlines
484484 if( g_lasterror[0] != '\0' ) lastErrorCat( "\n" );
485−
485+
486486 CK_FPRINTF_STDERR( "[%s]:", *fileName ? mini(fileName) : "chuck" );
487487 sprintf( g_buffer, "[%s]:", *fileName ? mini(fileName) : "chuck" );
488488 lastErrorCat( g_buffer );
@@ -513,12 +513,12 @@ void EM_error2( int line, const char * message, ... ) · 24 unmodified lines
513513 void EM_error2b( int line, const char * message, ... )
514514 {
515515 va_list ap;
516−
516+
517517 EM_extLineNum = line;
518518
519519 // separate errmsgs with newlines
520520 if( g_lasterror[0] != '\0' ) lastErrorCat( "\n" );
521−
521+
522522 CK_FPRINTF_STDERR( "[%s]:", *fileName ? mini(fileName) : "chuck" );
523523 sprintf( g_buffer, "[%s]:", *fileName ? mini(fileName) : "chuck" );
524524 lastErrorCat( g_buffer );
@@ -545,14 +545,14 @@ void EM_error2b( int line, const char * message, ... ) · 20 unmodified lines
545545 }
546546
547547
548−//
548+//
549549 void EM_error3( const char * message, ... )
550550 {
551551 va_list ap;
552−
552+
553553 // separate errmsgs with newlines
554554 if( g_lasterror[0] != '\0' ) lastErrorCat( "\n" );
555−
555+
556556 // g_lasterror[0] = '\0';
557557 g_buffer[0] = '\0';
558558

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t