File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,6 @@ int *updates = NULL; /* What does this do again? */
87
87
volatile sig_atomic_t signal_status = 0 ; /* Indicates a caught signal */
88
88
#endif
89
89
90
- #ifdef _WIN32
91
- char * DELIMITER = "\r\n" ;
92
- #else
93
- char * DELIMITER = "\n" ;
94
- #endif
95
-
96
90
int va_system (char * str , ...) {
97
91
98
92
va_list ap ;
@@ -121,7 +115,6 @@ void finish(void) {
121
115
exit (0 );
122
116
}
123
117
124
-
125
118
/* What we do when we're all set to exit */
126
119
void c_die (char * msg , ...) {
127
120
@@ -901,9 +894,12 @@ if (console) {
901
894
if (msg [i ] == '\n' )
902
895
multiline ++ ;
903
896
904
- char * line = strtok (msg , DELIMITER );
905
- if (line == NULL )
906
- line = msg ;
897
+ char * line = strtok (msg , "\r\n" );
898
+ if (line == NULL ) {
899
+ line = strtok (msg , "\n" );
900
+ if (line == NULL )
901
+ line = msg ;
902
+ }
907
903
908
904
int x_offset = -1 * multiline /2 ;
909
905
int msg_x = LINES /2 + x_offset ;
@@ -931,7 +927,9 @@ if (console) {
931
927
for (i = 0 ; i < strlen (line )+ 4 ; i ++ )
932
928
addch (' ' );
933
929
934
- line = strtok (NULL , DELIMITER );
930
+ line = strtok (NULL , "\r\n" );
931
+ if (line == NULL )
932
+ line = strtok (NULL , "\n" );
935
933
x_offset ++ ;
936
934
}
937
935
}
You can’t perform that action at this time.
0 commit comments