| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Csplit (PATCH #1) |
Hi Jasen, You wrote to me: JB>GW> 1) Saveing the path information isn't difficult, but as it is stored JB>GW> togther with the file name in a header line and there are no checks JB>GW> on header line lengths it can create header lines that are longer JB>GW> than the specified maximum line length. JB>GW> JB>GW> I suspect this is not acceptable, views please. JB>idea: continue the header with the '\' character if it overflows. JB>begin file only occurrs after begin part or end file... maybe that can be JB>exploited to simplify the processing needed to support the above. either tha JB>or process the continuation of lines before scaning for header lines. I'll think about it, but for now I'll wait for more views. JB>GW> 2) Saveing the path information as Jasen has means the files are not JB>GW> compatible with older versions of CSPLIT if the source files were JB>GW> not in the current directory. JB>that was a mistake... I didn't intend it to do that. it must have crept in JB>while I was adding support for '/' in filenames to be treated the same as '\ JB>is under dos. JB>yeah, it was a mistake, I missed one instance of strchr when converting JB>strrchrs for "posix path compatability".... JB>***** At line number 1149 JB>***** delete 2 lines: JB> if ((NULL != (sptr = strrchr (cur->srcfile, '/'))) || JB> (NULL != (sptr = strrchr (cur->srcfile, ':')))) /* Darin McBride * JB>***** and insert the following 1 line. JB> if (NULL != (sptr = strrchrs(cur->srcfile,":/\\"))) /* Darin McBride * JB>***** That doesn't actually solve the problem, as it drops the path information completely, and so paths are not stored anywhere... JB>actually, I don't understand how his bit of code ever worked, I may have JB>replaced something tricky with something brutal:) Darin's code works very neatly :-) As it's dropping _all_ except the file name, if the first search for a path separator succeeds there is no need to check for the drive letter separator, as drive letter separators are always before path separators. If either search succeeds, the file name starts immediately after, otherwise there is only the file name... JB>possibly somewhere he was changing \ into / but I seem to have JB>broken that. George * SLMR 2.1a * Wishing you a Happy Christmas and a Peaceful New Year --- Maximus/2 3.01* Origin: DoNoR/2,Woking UK (44-1483-717904) (2:440/4) SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 634/397 635/506 728 639/252 SEEN-BY: 670/218 @PATH: 440/4 255/1 251/25 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.