Mon Jun 09 1997 12:23, Bob Stout wrote to Sadovnikov Sergey:
BS> It *only* works for Borland! These functions aren't ANSI/ISO or
BS> even Posix standard. There are portable equivalents in SNIPPETS,
BS> though - see FNSPLIT.C.
Try following case:
void ChangeExt(char * NewName,char * OldName,char * NewExt)
{
char * Temp;
strcpy(NewName,OldName); // Make copy of OldName
Temp = strchr(NewName,'.'); // Finding dot in OldName
if(Temp)
strcpy(Temp,NewExt); // If dot present, cnange extention
else
strcat(NewName,Ext); // else adding extention to NewName
}
Commander Wolf
--- 2.50+
---------------
* Origin: *) Commander Wolf (* Moscow, Russia (2:5020/760.14)
|