Add new ls option: -lc to print out the chunk table.
[paraslash.git] / string.h
1 /*
2 * Copyright (C) 2006-2008 Andre Noll <maan@systemlinux.org>
3 *
4 * Licensed under the GPL v2. For licencing details see COPYING.
5 */
6
7 /** \file string.h exported sybmols from string.c */
8
9 /** A string buffer used for para_printf(). */
10 struct para_buffer {
11 /** The buffer. May be \p NULL. */
12 char *buf;
13 /** The size of \a buf. */
14 size_t size;
15 /** The next para_printf() will write at this offset. */
16 size_t offset;
17 };
18
19 __must_check __malloc void *para_realloc(void *p, size_t size);
20 __must_check __malloc void *para_malloc(size_t size);
21 __must_check __malloc void *para_calloc(size_t size);
22 __must_check __malloc char *para_strdup(const char *s);
23 __must_check __malloc __printf_1_2 char *make_message(const char *fmt, ...);
24 __must_check __malloc char *para_strcat(char *a, const char *b);
25 __must_check __malloc char *para_dirname(const char *name);
26 __must_check const char *para_basename(const char *name);
27 void chop(char *buf);
28 __must_check __malloc char *para_tmpname(void);
29 __must_check __malloc char *para_logname(void);
30 __must_check __malloc char *para_homedir(void);
31 __must_check unsigned split_args(char *args, char *** const argv_ptr, const char *delim);
32 __malloc char *para_hostname(void);
33 void valid_fd_012(void);
34 __printf_2_3 int para_printf(struct para_buffer *b, const char *fmt, ...);
35 /** Used for for_each_line() and for_each_line_ro(). */
36 typedef int line_handler_t(char *, void *);
37 int for_each_line(char *buf, size_t size, line_handler_t *line_handler,
38 void *private_data);
39 int for_each_line_ro(char *buf, size_t size, line_handler_t *line_handler,
40 void *private_data);
41 int para_atoi64(const char *str, int64_t *result);
42 int para_atoi32(const char *str, int32_t *value);