File: utils.h

package info (click to toggle)
wayback 0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 216 kB
  • sloc: ansic: 1,363; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Minor common utilities
 *
 * SPDX-License-Identifier: MIT
 */

#ifndef UTILS_IMPORTED
#define UTILS_IMPORTED

#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x))

void asprintf_or_exit(char **restrict strp, const char *restrict fmt, ...);
char *strdup_or_exit(const char *s);

#endif