home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / lib / util / getfpath.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-06-04  |  521 b   |  27 lines

  1. #include "util.h"
  2.  
  3. getfpath (fnam, dflpth, dest)   /* build full pathname              */
  4.     char fnam[],
  5.      dflpth[];
  6.     char *dest;
  7. {
  8.     if (fnam[0] == '/')       /* fully specified                      */
  9.     (void) strcpy (dest, fnam);
  10.     else
  11.     sprintf (dest, "%s/%s", dflpth, fnam);
  12. }
  13.  
  14.  
  15. char *
  16.     dupfpath (fnam, dflpth) /* build full pathname & alloc str  */
  17.     char fnam[],
  18.      dflpth[];
  19. {
  20.     extern char *strdup ();
  21.     char temppath[128];
  22.  
  23.     getfpath (fnam, dflpth, temppath);
  24.  
  25.     return (strdup (temppath));
  26. }
  27.