http://www.ousob.com --- Legacy Redefined #include <stdlib.h> #include <extend50.h> CLIPPER b_spltpath() { char drive[ _MAX_DRIVE + 1]; char dir[ _MAX_DIR + 1 ]; char fname[ _MAX_FNAME + 1 ]; char ext[ _MAX_EXT + 1 ]; char retBuffr[70]; char *thePath = _parc(1); int returnRequest = _parni(2); if( !ISCHAR(1) || !ISNUM(2) ){ retBuffr[0] = NULL; _retc(retBuffr); return; } _splitpath( thePath, drive, dir, fname, ext ); switch(returnRequest){ case 0x01: strcpy(retBuffr,drive); break; case 0x02: strcpy(retBuffr,dir); break; case 0x03: strcpy(retBuffr,fname); break; case 0x04: strcpy(retBuffr,ext); break; default: strcpy(retBuffr,"\0"); break; } _retc(retBuffr); }