File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,6 @@ int *updates = NULL; /* What does this do again? */
8787volatile sig_atomic_t signal_status = 0 ; /* Indicates a caught signal */
8888#endif
8989
90- #ifdef _WIN32
91- char * DELIMITER = "\r\n" ;
92- #else
93- char * DELIMITER = "\n" ;
94- #endif
95-
9690int va_system (char * str , ...) {
9791
9892 va_list ap ;
@@ -901,9 +895,12 @@ if (console) {
901895 if (msg [i ] == '\n' )
902896 multiline ++ ;
903897
904- char * line = strtok (msg , DELIMITER );
905- if (line == NULL )
906- line = msg ;
898+ char * line = strtok (msg , "\r\n" );
899+ if (line == NULL ) {
900+ line = strtok (msg , "\n" );
901+ if (line == NULL )
902+ line = msg ;
903+ }
907904
908905 int x_offset = -1 * multiline /2 ;
909906 int msg_x = LINES /2 + x_offset ;
@@ -931,7 +928,9 @@ if (console) {
931928 for (i = 0 ; i < strlen (line )+ 4 ; i ++ )
932929 addch (' ' );
933930
934- line = strtok (NULL , DELIMITER );
931+ line = strtok (NULL , "\r\n" );
932+ if (line == NULL )
933+ line = strtok (NULL , "\n" );
935934 x_offset ++ ;
936935 }
937936 }
You can’t perform that action at this time.
0 commit comments