Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 45 lines (38 sloc) 1.644 kB
188bc21 @falconindy copyright 2011
authored
1 /* Copyright (c) 2010-2011 Dave Reisner
1aaec0f @falconindy Add GPL license header
authored
2 *
1b6e92a @falconindy relicense as MIT/X
authored
3 * util.h
1aaec0f @falconindy Add GPL license header
authored
4 *
1b6e92a @falconindy relicense as MIT/X
authored
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation
7 * files (the "Software"), to deal in the Software without
8 * restriction, including without limitation the rights to use,
9 * copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following
12 * conditions:
1aaec0f @falconindy Add GPL license header
authored
13 *
1b6e92a @falconindy relicense as MIT/X
authored
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 * OTHER DEALINGS IN THE SOFTWARE.
1aaec0f @falconindy Add GPL license header
authored
25 */
26
7f07bca @falconindy Initial re-commit: reorganize code into multiple source files with he…
authored
27 #ifndef _BURP_UTIL_H
28 #define _BURP_UTIL_H
29
73fa07c @falconindy use a sane debugging system
authored
30 #include <stdarg.h>
ca00f1d @falconindy cleanup the mess that are my header includes
authored
31 #include <string.h>
32
7f8ad0e @falconindy memory management macro cleaning
authored
33 #define ALLOC_FAIL(s) do { fprintf(stderr, "could not allocate %zd bytes\n", s); } while(0)
81c4376 @falconindy allocate room for closing null byte in error string
authored
34 #define MALLOC(p, s, action) do { p = malloc(s); if(!p) { ALLOC_FAIL(s); action; } } while(0)
67be0d9 @falconindy remove superfluous "if" in FREE
authored
35 #define FREE(x) do { free((void*)x); x = NULL; } while(0)
7f07bca @falconindy Initial re-commit: reorganize code into multiple source files with he…
authored
36
73fa07c @falconindy use a sane debugging system
authored
37 void debug(const char*, ...);
58ed0b0 @falconindy merge get_{username,password} into read_stdin
authored
38 char *read_stdin(const char*, size_t, int);
2bafbb0 @falconindy return line length from strtrim, not the (un)modified pointer
authored
39 size_t strtrim(char*);
a04b56e @falconindy util: Add read_file_first_line, file_exists, touch, and STREQ macro
authored
40 int touch(const char*);
7f07bca @falconindy Initial re-commit: reorganize code into multiple source files with he…
authored
41
42 #endif /* _BURP_UTIL_H */
28315c6 @falconindy add proper vim modelines
authored
43
44 /* vim: set et sw=2: */
Something went wrong with that request. Please try again.