]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: tools: move PARSE_OPT_* from tools.h to tools-t.h
authorWilly Tarreau <w@1wt.eu>
Fri, 4 Sep 2020 13:24:53 +0000 (15:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Sep 2020 09:27:22 +0000 (11:27 +0200)
These would better be placed into the low-level type files with other
similar macros.

include/haproxy/tools-t.h
include/haproxy/tools.h

index bb99a23737ec0d0dd368e149eddf871833665920..91363d93dc8f7906b7f17f054da65e378f119ca6 100644 (file)
 #define DEFNULL(...) _FIRST_ARG(NULL, ##__VA_ARGS__, NULL)
 #define _FIRST_ARG(a, b, ...) b
 
+/* options flags for parse_line() */
+#define PARSE_OPT_SHARP         0x00000001      // '#' ends the line
+#define PARSE_OPT_BKSLASH       0x00000002      // '\' escapes chars
+#define PARSE_OPT_SQUOTE        0x00000004      // "'" encloses a string
+#define PARSE_OPT_DQUOTE        0x00000008      // '"' encloses a string
+#define PARSE_OPT_ENV           0x00000010      // '$' is followed by environment variables
+#define PARSE_OPT_INPLACE       0x00000020      // parse and tokenize in-place (src == dst)
+
+/* return error flags from parse_line() */
+#define PARSE_ERR_TOOLARGE      0x00000001      // result is too large for initial outlen
+#define PARSE_ERR_TOOMANY       0x00000002      // more words than initial nbargs
+#define PARSE_ERR_QUOTE         0x00000004      // unmatched quote (offending one at errptr)
+#define PARSE_ERR_BRACE         0x00000008      // unmatched brace (offending one at errptr)
+#define PARSE_ERR_HEX           0x00000010      // unparsable hex sequence (at errptr)
+#define PARSE_ERR_VARNAME       0x00000020      // invalid variable name (at errptr)
+#define PARSE_ERR_OVERLAP       0x00000040      // output overlaps with input, need to allocate
+
 /* special return values for the time parser (parse_time_err()) */
 #define PARSE_TIME_UNDER ((char *)1)
 #define PARSE_TIME_OVER  ((char *)2)
index 0cf605352823133de2991616f9b0a6384cdadfb8..068c13483bfe6daeb5613c3327d93fcc0d31ea09 100644 (file)
 
 #define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0)
 
-/* options flags for parse_line() */
-#define PARSE_OPT_SHARP         0x00000001      // '#' ends the line
-#define PARSE_OPT_BKSLASH       0x00000002      // '\' escapes chars
-#define PARSE_OPT_SQUOTE        0x00000004      // "'" encloses a string
-#define PARSE_OPT_DQUOTE        0x00000008      // '"' encloses a string
-#define PARSE_OPT_ENV           0x00000010      // '$' is followed by environment variables
-#define PARSE_OPT_INPLACE       0x00000020      // parse and tokenize in-place (src == dst)
-
-/* return error flags from parse_line() */
-#define PARSE_ERR_TOOLARGE      0x00000001      // result is too large for initial outlen
-#define PARSE_ERR_TOOMANY       0x00000002      // more words than initial nbargs
-#define PARSE_ERR_QUOTE         0x00000004      // unmatched quote (offending one at errptr)
-#define PARSE_ERR_BRACE         0x00000008      // unmatched brace (offending one at errptr)
-#define PARSE_ERR_HEX           0x00000010      // unparsable hex sequence (at errptr)
-#define PARSE_ERR_VARNAME       0x00000020      // invalid variable name (at errptr)
-#define PARSE_ERR_OVERLAP       0x00000040      // output overlaps with input, need to allocate
-
 /*
  * copies at most <size-1> chars from <src> to <dst>. Last char is always
  * set to 0, unless <size> is 0. The number of chars copied is returned