On , Sadovnikov Sergey (2:5020/760.14@fidonet) wrote:
> Drive[MAX_DRIVE],Dir[MAX_DIR],Name[MAX_NAME],OldExt[MAX_EXT];
> fnsplit(OldName,Drive,Dir,Name,OldExt);
> fnmerge(NewName,Drive,Dir,Name,NewExt);
> }
> .............
> In this example:
> NewName -- buffer for new file name (with new extension)
> OldName -- buffer with source file name
> NewExt -- new extension for file
> I wrote constants MAX_DRIVE, MAX_DIR, MAX_NAME, MAX_EXT by memory.
> Look into helps for this constants (if complier detect errors). Example
> testing on Borland (Turbo) C/C++.
Sadovnikov...
It *only* works for Borland! These functions aren't ANSI/ISO or even Posix
standard. There are portable equivalents in SNIPPETS, though - see FNSPLIT.C.
--- QM v1.00
---------------
* Origin: MicroFirm : Down to the C in chips (1:106/2000.6)
|