5 ReadCharAsync( _REG( a0
) AsyncFile
*file
)
9 if( file
->af_BytesLeft
)
11 /* if there is at least a byte left in the current buffer, get it
12 * directly. Also update all counters
15 ch
= *file
->af_Offset
;
19 return( ( LONG
) ch
);
22 /* there were no characters in the current buffer, so call the main read
23 * routine. This has the effect of sending a request to the file system to
24 * have the current buffer refilled. After that request is done, the
25 * character is extracted for the alternate buffer, which at that point
26 * becomes the "current" buffer
29 if( ReadAsync( file
, &ch
, 1 ) > 0 )
31 return( ( LONG
) ch
);
34 /* We couldn't read above, so fail */