diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:36:27 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:36:27 +0000 |
commit | 72c39e3522c5781d1e7dc8abad77d96141c5d49b (patch) | |
tree | e16497caaa0bf20771ef34787de02fc95e5993bf /src/utils/utils.h | |
download | libcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.gz libcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.bz2 |
Import beginnings of a CSS parsing library.
Currently comprises a lexer.
svn path=/trunk/libcss/; revision=4112
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h new file mode 100644 index 0000000..ac19e59 --- /dev/null +++ b/src/utils/utils.h @@ -0,0 +1,28 @@ +/* + * This file is part of LibCSS. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#ifndef css_utils_h_ +#define css_utils_h_ + +#ifndef max +#define max(a,b) ((a)>(b)?(a):(b)) +#endif + +#ifndef min +#define min(a,b) ((a)<(b)?(a):(b)) +#endif + +#ifndef SLEN +/* Calculate length of a string constant */ +#define SLEN(s) (sizeof((s)) - 1) /* -1 for '\0' */ +#endif + +#ifndef UNUSED +#define UNUSED(x) ((x)=(x)) +#endif + +#endif |