summaryrefslogtreecommitdiff
path: root/misc.h
blob: 338c5463a68fd2ee11b376e05dadcd5e88677a91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MISC_H
#define MISC_H

#include <stdarg.h>

extern char *read_file(const char *filename, long *size);
extern char *find_delm(char *str, const char *delm, int skip_delm);
extern char *remove_trailing_whitespace(char *str);
extern char *get_str_delm_range(char *str, const char *start_delm, const char *end_delm, char **rhs);
extern char *get_line(char **str);
extern char *make_str(const char *str);
extern char *dir_path_num(const char *root, int num);
extern char *dir_path_name(const char *root, char *name);
extern char *sanitized_dir_path_name(const char *root, char *name);
extern int delm_span(char *str, const char delm);
extern int sanitize_strlen(char *str);
extern char *sanitize_str(char *str);
extern char *find_alpha(const char *str);
extern char *create_num_str(const char *str, int num);
extern int is_empty(const char *str);
extern char *skip_whitespace(const char *str);
extern int vformat_len_copy(const char *fmt, va_list args);
extern int vformat_len(const char *fmt, va_list args);
extern int format_len(const char *fmt, ...);
extern int is_dir(const char *path);
extern void mkdirp(const char *path, int mode);
#endif