File: make_path.c

package info (click to toggle)
mgetty 1.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,872 kB
  • sloc: ansic: 42,728; sh: 6,487; perl: 6,262; makefile: 1,457; tcl: 756; lisp: 283
file content (26 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * make_path.c
 *
 * Builds a complete file path from a directory name and a filename.
 *
 * $Id: make_path.c,v 1.4 1998/09/09 21:07:10 gert Exp $
 *
 */

#include "../include/voice.h"

void make_path(char *result, char *path, char *name)
     {

     if (name[0] == '/')
          {
          strcpy(result, name);
          }
     else
          {
          strcpy(result, path);
          strcat(result, "/");
          strcat(result, name);
          };

     }