]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame_incremental - include/input.h
libfrog: move workqueue.h to libfrog/
[thirdparty/xfsprogs-dev.git] / include / input.h
... / ...
CommitLineData
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2000-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#ifndef __INPUT_H__
7#define __INPUT_H__
8
9#include <pwd.h>
10#include <grp.h>
11#include <sys/types.h>
12#include "libfrog/projects.h"
13#include "libfrog/convert.h"
14#include <stdbool.h>
15
16extern char **breakline(char *input, int *count);
17extern void doneline(char *input, char **vec);
18extern char *fetchline(void);
19
20extern size_t numlen(uint64_t val, size_t base);
21
22extern struct timeval tsub(struct timeval t1, struct timeval t2);
23extern double tdiv(double value, struct timeval tv);
24
25enum {
26 DEFAULT_TIME = 0x0,
27 TERSE_FIXED_TIME = 0x1,
28 VERBOSE_FIXED_TIME = 0x2
29};
30
31extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
32
33extern bool isdigits_only(const char *str);
34extern int timespec_from_string(const char *sec, const char *nsec, struct timespec *ts);
35
36#define HAVE_FTW_H 1 /* TODO: configure me */
37
38#ifdef HAVE_FTW_H
39#include <ftw.h>
40#else
41struct FTW;
42struct stat;
43extern int nftw(
44 char *dir,
45 int (*fn)(const char *, const struct stat *, int, struct FTW *),
46 int depth,
47 int flags);
48#endif
49
50#endif /* __INPUT_H__ */