Archived
1
0
Fork 0

Initial commit

This commit is contained in:
Henrik Hautakoski 2010-04-20 20:38:50 +02:00 committed by Henrik Hautakoski
commit fdfefe7d55
31 changed files with 3242 additions and 0 deletions

40
src/common/path.h Normal file
View file

@ -0,0 +1,40 @@
/*
* -- path.h
*
* common path handling routines
*
* Copyright (C) 2010 Archived
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _COMMON_PATH_H
#define _COMMON_PATH_H
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
size_t pathlen(const char *path);
char* fmt_path(const char *base, const char *name, unsigned char dir);
const char* basename(const char *path);
#endif /* _COMMON_PATH_H */