summaryrefslogtreecommitdiff
path: root/src/utils.h
blob: 98a4c6bc0b47752fa836c053243c4180b8c7d58a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* utility helpers
 *
 * This file is part of nsnsgenbind.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
 */

#ifndef nsgenbind_utils_h
#define nsgenbind_utils_h

FILE *genb_fopen(const char *fname, const char *mode);

#ifdef _WIN32
#define NEED_STRNDUP 1
char *strndup(const char *s, size_t n);
#endif

#define SLEN(x) (sizeof((x)) - 1)

#endif