Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>fnmerge() make new file name</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 fnmerge()               Make New File Name

 #include   <dir.h>

 void       fnmerge(path,drive,dir,name,ext);
 char       *path;                       Full name
 const char *drive;                      Drive
 const char *dir;                        Directory/subdirectory
 const char *name;                       File name
 const char *ext;                        File extension

    fnmerge() constructs a file name from the components 'drive', 'dir',
    'name' and 'ext', and stores the result in 'path'.  The new file's
    full path name is:

                     X:\DIR\SUBDIR\NAME.EXT

     where:
                X                  =  'drive'
                \DIR\SUBDIR\  =  'dir'
                NAME               =  'name'
                EXT                =  'ext'

    The maximum lengths of these components are determined by the
    following constants:

                MAXDRIVE       3   drive, including colon
                MAXDIR             66   dir, including leading and
                                        trailing backslashes
                MAXFILE             9   name
                MAXEXT              5   ext, including leading dot

    Each length also accomodates the NULL character for each component.

    fnmerge() assumes there is enough space for the constructed path
    name.  The maximum constructed length is 80, given by the constant
    MAXPATH.

       Returns:     There is no return value.

         Notes:     fnsplit() is the inverse of fnmerge(), so a 'path'
                    split with fnsplit(), then merged with fnmerge(),
                    results in 'path'.


See Also: fnsplit()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson