libcfe  0.12.1
some useful C-functions
create_path.c File Reference
#include "config.h"
#include "create_path.h"
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
#include "len.h"
#include "output.h"
Include dependency graph for create_path.c:

Go to the source code of this file.

Functions

char * create_path (const char *dir, int dirlen, const char *file, int filelen)
 

Function Documentation

◆ create_path()

char* create_path ( const char *  dir,
int  dirlen,
const char *  file,
int  filelen 
)

Makes a path by putting 'dir' and 'file' together, if 'dir' has zero length and 'file' starts with '/' file is return.

Parameters
[in]dirthe first part
[in]dirlenthe amount of (useful) characters in 'dir' or 0 if unknown
[in]filethe last part
[in]filelenthe amount of (useful) characters in 'file' or 0 if unknown
Returns
a new allocated string containing the new path, terminated with '\0'

Definition at line 11 of file create_path.c.

Here is the caller graph for this function: