MemFile System
#13
Something I just noticed with this is that if you are assuming that the line endings are CHR$(13) + CHR$(10) ("\r\n") then that might not work with a file that has UNIX line endings, which I think is just CHR$(10) ("\n"). You might want to split on just CHR$(10) and then check for CHR$(13) existing after the split. If it does, you can just delete those. A foolproof way that I split a file up is by using my tokenize function, which uses strtok. It takes a list of characters to split on and it works just fine regardless of the file having UNIX or Windows line endings.
Ask me about Windows API and maybe some Linux stuff
Reply


Messages In This Thread
MemFile System - by SMcNeill - 08-22-2022, 03:08 PM
RE: MemFile System - by SpriggsySpriggs - 08-22-2022, 03:16 PM
RE: MemFile System - by SMcNeill - 08-22-2022, 03:20 PM
RE: MemFile System - by SpriggsySpriggs - 08-22-2022, 03:29 PM
RE: MemFile System - by SMcNeill - 08-22-2022, 03:34 PM
RE: MemFile System - by SMcNeill - 08-22-2022, 04:07 PM
RE: MemFile System - by SMcNeill - 08-23-2022, 01:16 PM
RE: MemFile System INPUT output - by JRace - 08-23-2022, 10:56 PM
RE: MemFile System - by PhilOfPerth - 08-27-2022, 05:25 AM
RE: MemFile System - by PhilOfPerth - 08-27-2022, 06:22 AM
RE: MemFile System - by SMcNeill - 08-27-2022, 06:37 AM
RE: MemFile System - by PhilOfPerth - 08-27-2022, 08:02 AM
RE: MemFile System - by SpriggsySpriggs - 08-31-2022, 02:14 PM
RE: MemFile System - by SMcNeill - 08-31-2022, 03:01 PM
RE: MemFile System - by RhoSigma - 08-31-2022, 05:20 PM



Users browsing this thread: 7 Guest(s)