re: API to extract VFS filename from full path

2008-02-21 Thread Dr. S.L. Sanders
Hi-- Others have already given you good solutions, but I thought you might like to see another one. (Same principle as others; different packaging) I wrote LstCh() which returns a pointer to the last (rightmost) character in a given string. I then wrote macro FNAM which uses LstCh()

Re: API to extract VFS filename from full path

2008-01-30 Thread Aaron Ardiri
On Jan 29, 2008 10:46 PM, Luc Le Blanc [EMAIL PROTECTED] wrote: On Jan 29, 2008 6:00 PM, Luc Le Blanc [EMAIL PROTECTED] wrote: Is there an API to extract the VFS filename from a fully qualified name that includes the path? filename = StrRChr(path, '/'); if (filename != NULL)

Re: API to extract VFS filename from full path

2008-01-30 Thread Aaron Ardiri
FYI: here are my routines; (try to re-use what i can) :P // look for a specific character in the memory buffer, starting at end char * _MemRChr(void *p, char chr, uint32 count) { char *pos; char *x; int i; // default return value pos = NULL; // pre-condition (cannot have

API to extract VFS filename from full path

2008-01-29 Thread Luc Le Blanc
Is there an API to extract the VFS filename from a fully qualified name that includes the path? Luc Le Blanc -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/

Re: API to extract VFS filename from full path

2008-01-29 Thread Aaron Ardiri
On Jan 29, 2008 6:00 PM, Luc Le Blanc [EMAIL PROTECTED] wrote: Is there an API to extract the VFS filename from a fully qualified name that includes the path? filename = StrRChr(path, '/'); if (filename != NULL) filename++; basic string routines? not sure if thats what your looking for; but

Re: API to extract VFS filename from full path

2008-01-29 Thread Luc Le Blanc
Aaron Ardiri wrote: On Jan 29, 2008 6:00 PM, Luc Le Blanc [EMAIL PROTECTED] wrote: Is there an API to extract the VFS filename from a fully qualified name that includes the path? filename = StrRChr(path, '/'); if (filename != NULL) filename++; basic string routines? not sure if thats

Re: API to extract VFS filename from full path

2008-01-29 Thread Michal Seliga
Luc Le Blanc wrote: BTW, StrRchr doesn't exist. I have to write it too ;) should be StrChr, such exists -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/

Re: API to extract VFS filename from full path

2008-01-29 Thread Luc Le Blanc
Michal Seliga wrote: Luc Le Blanc wrote: BTW, StrRchr doesn't exist. I have to write it too ;) should be StrChr, such exists No because you have to find the last / in the pathname, so you need to start from the end, hence StrRChr. Here's my (yet) untested code: Char *StrRChr( Char

Re: API to extract VFS filename from full path

2008-01-29 Thread Dean Gahlon
[Charset UTF-8 unsupported, filtering to ASCII...] Luc Le Blanc wrote: BTW, StrRchr doesn't exist. I have to write it too ;) should be StrChr, such exists It should *not* be StrChr; Aaron's initial suggestion was to do StrRChr(path, '/') to get the last '/' character. Using StrChr would

Re: API to extract VFS filename from full path

2008-01-29 Thread Michal Seliga
Dean Gahlon wrote: [Charset UTF-8 unsupported, filtering to ASCII...] Luc Le Blanc wrote: BTW, StrRchr doesn't exist. I have to write it too ;) should be StrChr, such exists It should *not* be StrChr; Aaron's initial suggestion was to do StrRChr(path, '/') to get the last '/' character.