delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Date: | Tue, 6 Nov 2007 19:36:10 -0500 |
Message-Id: | <200711070036.lA70aAWs017106@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | djgpp-workers AT delorie DOT com |
In-reply-to: | <200711061825.42739.juan.guerrero@gmx.de> (message from Juan |
Manuel Guerrero on Tue, 6 Nov 2007 18:25:42 +0100) | |
Subject: | Re: About the syntax of the change file for djtar |
References: | <200711061825 DOT 42739 DOT juan DOT guerrero AT gmx DOT de> |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Some things we can do: 1. Change the logic to use the last space in the line, not the first one. 2. *If* the line has a tab, use that as the separator instead of a space, but if there's no tab, use the last space as above. 3. Same, but look for a NUL byte. i.e.: ptr = strrchr (line, '\0'); if (!ptr) ptr = strrchr (line, '\t'); if (!ptr) ptr = strrchr (line, ' '); This is backwards compatible, yet allows for bizzare file names. The only time you'd need a '\0' is if the SFN filename contains both a space and a tab.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |