Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (38 sloc) 1.644 kb
188bc211 »
2011-01-02 copyright 2011
1 /* Copyright (c) 2010-2011 Dave Reisner
1aaec0f0 »
2010-05-15 Add GPL license header
2 *
1b6e92a0 »
2010-08-29 relicense as MIT/X
3 * util.h
1aaec0f0 »
2010-05-15 Add GPL license header
4 *
1b6e92a0 »
2010-08-29 relicense as MIT/X
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:
1aaec0f0 »
2010-05-15 Add GPL license header
13 *
1b6e92a0 »
2010-08-29 relicense as MIT/X
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.
1aaec0f0 »
2010-05-15 Add GPL license header
25 */
26
7f07bca4 »
2010-05-15 Initial re-commit: reorganize code into multiple source files with he…
27 #ifndef _BURP_UTIL_H
28 #define _BURP_UTIL_H
29
73fa07c1 »
2011-04-03 use a sane debugging system
30 #include <stdarg.h>
ca00f1d3 »
2011-04-02 cleanup the mess that are my header includes
31 #include <string.h>
32
7f8ad0eb »
2011-04-10 memory management macro cleaning
33 #define ALLOC_FAIL(s) do { fprintf(stderr, "could not allocate %zd bytes\n", s); } while(0)
81c4376c »
2012-04-23 allocate room for closing null byte in error string
34 #define MALLOC(p, s, action) do { p = malloc(s); if(!p) { ALLOC_FAIL(s); action; } } while(0)
67be0d96 »
2011-08-22 remove superfluous "if" in FREE
35 #define FREE(x) do { free((void*)x); x = NULL; } while(0)
7f07bca4 »
2010-05-15 Initial re-commit: reorganize code into multiple source files with he…
36
73fa07c1 »
2011-04-03 use a sane debugging system
37 void debug(const char*, ...);
58ed0b07 »
2011-04-02 merge get_{username,password} into read_stdin
38 char *read_stdin(const char*, size_t, int);
2bafbb03 »
2011-10-03 return line length from strtrim, not the (un)modified pointer
39 size_t strtrim(char*);
a04b56ef »
2010-05-16 util: Add read_file_first_line, file_exists, touch, and STREQ macro
40 int touch(const char*);
7f07bca4 »
2010-05-15 Initial re-commit: reorganize code into multiple source files with he…
41
42 #endif /* _BURP_UTIL_H */
28315c6d »
2011-08-30 add proper vim modelines
43
44 /* vim: set et sw=2: */
Something went wrong with that request. Please try again.