make parsemode() generic

use for uudecode and chmod

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
Hiltjo Posthuma
2014-04-09 15:17:20 +02:00
committed by sin
parent ff474a8cbc
commit 560340341f
5 changed files with 84 additions and 104 deletions

3
util.h
View File

@@ -1,5 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include <stddef.h>
#include <sys/stat.h>
#include "arg.h"
#define UTF8_POINT(c) (((c) & 0xc0) != 0x80)
@@ -25,3 +26,5 @@ size_t strlcat(char *, const char *, size_t);
#undef strlcpy
size_t strlcpy(char *, const char *, size_t);
void weprintf(const char *, ...);
void parsemode(const char *, mode_t *, int *);