httpdirfs/src/util.h

34 lines
701 B
C
Raw Normal View History

2019-04-21 00:46:08 +02:00
#ifndef UTIL_H
#define UTIL_H
#include <stdint.h>
2019-04-21 00:46:08 +02:00
/**
* \file util.h
* \brief utility functions
*/
/**
* \brief the maximum length of a path and a URL.
* \details This corresponds the maximum path length under Ext4.
2019-04-21 00:46:08 +02:00
*/
#define MAX_PATH_LEN 4096
/** \brief the maximum length of a filename. */
#define MAX_FILENAME_LEN 255
/**
* \brief append a path
* \details This function appends a path with the next level, while taking the
* trailing slash of the upper level into account.
*/
char *path_append(const char *path, const char *filename);
2019-04-21 00:46:08 +02:00
/**
* \brief division, but rounded to the nearest integer rather than truncating
*/
int64_t round_div(int64_t a, int64_t b);
2019-04-21 00:46:08 +02:00
#endif