File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ void fillFileBuffer(void)
200200 if (cpm_read_sequential (& startupFile )) {
201201 cpm_close_file (& startupFile );
202202 fileDoneFlag = true;
203+ cpm_printstring ("END OF FILE\r\n OK\r\n" );
203204 }
204205 filebuffer_pos = (char * )fileBuffer ;
205206}
@@ -221,7 +222,7 @@ int llkey()
221222 return * (filebuffer_pos ++ );
222223 if (!(* filebuffer_pos ) && fileFlag && !fileDoneFlag ) {
223224 fillFileBuffer ();
224- return * (filebuffer_pos ++ );
225+ if (! fileDoneFlag ) return * (filebuffer_pos ++ );
225226 }
226227
227228 return cpm_conin ();
@@ -251,6 +252,11 @@ int getkey()
251252 lineBuffer [charsInLineBuffer ]= 0 ;
252253 if (charsInLineBuffer > 0 ) charsInLineBuffer -- ;
253254 }
255+ if (c == 0x1a || c == 0x00 ) {
256+ c = ' ' ;
257+ lineBuffer [charsInLineBuffer ++ ] = c ;
258+ }
259+
254260 else lineBuffer [charsInLineBuffer ++ ] = c ;
255261 if (c == '\n' || c == '\r' ) break ;
256262 }
You can’t perform that action at this time.
0 commit comments