This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/_splitp2.c

23 lines
568 B
C

#include <stdio.h>
#include <stdlib.h>
void main()
{
char full_path[ _MAX_PATH ];
char tmp_path[ _MAX_PATH2 ];
char *drive;
char *dir;
char *fname;
char *ext;
_makepath(full_path,"c","watcomc\\h","stdio","h");
printf( "Full path is: %s\n\n", full_path );
_splitpath2( full_path, tmp_path,
&drive, &dir, &fname, &ext );
printf( "Components after _splitpath2\n" );
printf( "drive: %s\n", drive );
printf( "dir: %s\n", dir );
printf( "fname: %s\n", fname );
printf( "ext: %s\n", ext );
}