/* * makepath() adds a filename to a directory name, adding forward or backward * slashes as appropriate to the operating system. */ #include extern char *EOS(); char * makepath(bfr, path, file) char *bfr, *path, *file; { va_list ptr; /* gemdos requires backslashes, all other operating systems that we * support require forward slashes */ #if GEMDOS|MSDOS|OS2 /* note that msdos & os/2 use default shells that are *intensely* * stupid about / vs \\. We need to separate things with backslash * to make sure that when we pass filenames to these shells that the * stupid things will not puke their tiny little pea-like brains * out */ sprintf(bfr, "%s\\", path); #else sprintf(bfr, "%s/", path); #endif va_start(ptr, file); vsprintf(EOS(bfr), file, ptr); va_end(ptr); return bfr; } /* makepath */