--- var.c 2002/01/30 19:37:14 1.60
+++ var.c 2002/02/27 13:44:16 1.61
@@ -1,9 +1,9 @@
/*
-** VAR - OSSP variable expression library.
+** OSSP var - Variable Expansion
** Copyright (c) 2001-2002 The OSSP Project (http://www.ossp.org/)
** Copyright (c) 2001-2002 Cable & Wireless Deutschland (http://www.cw.com/de/)
**
-** This file is part of OSSP VAR, an extensible data serialization
+** This file is part of OSSP var, a variable expansion
** library which can be found at http://www.ossp.org/pkg/var/.
**
** Permission to use, copy, modify, and distribute this software for
@@ -24,7 +24,7 @@
** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
** SUCH DAMAGE.
**
-** var.c: VAR library implementation.
+** var.c: library implementation
*/
#ifdef HAVE_CONFIG_H
@@ -74,50 +74,49 @@
const char *var_strerror(var_rc_t rc)
{
static char *var_errors[] = {
- "OK", /* VAR_OK = 0 */
- "incomplete named character", /* VAR_ERR_INCOMPLETE_NAMED_CHARACTER = -1 */
- "incomplete hex", /* VAR_ERR_INCOMPLETE_HEX = -2 */
- "invalid hex", /* VAR_ERR_INVALID_HEX = -3 */
- "octal too large", /* VAR_ERR_OCTAL_TOO_LARGE = -4 */
- "invalid octal", /* VAR_ERR_INVALID_OCTAL = -5 */
- "incomplete octal", /* VAR_ERR_INCOMPLETE_OCTAL = -6 */
- "incomplete grouped hex", /* VAR_ERR_INCOMPLETE_GROUPED_HEX = -7 */
- "incorrect character class specification", /* VAR_ERR_INCORRECT_CLASS_SPEC = -8 */
- "var_expand() configuration is inconsistent", /* VAR_ERR_INVALID_CONFIGURATION = -9 */
- "out of memory", /* VAR_ERR_OUT_OF_MEMORY = -10 */
- "incomplete variable", /* VAR_ERR_INCOMPLETE_VARIABLE_SPEC = -11 */
- "undefined variable", /* VAR_ERR_UNDEFINED_VARIABLE = -12 */
- "input is neither text nor variable", /* VAR_ERR_INPUT_ISNT_TEXT_NOR_VARIABLE = -13 */
- "unknown command in variable", /* VAR_ERR_UNKNOWN_COMMAND_CHAR = -14 */
- "unknown error", /* -15 is not used */
- "malformated search and replace operation", /* VAR_ERR_MALFORMATTED_REPLACE = -16 */
- "unknown flag specified in search and replace operation", /* VAR_ERR_UNKNOWN_REPLACE_FLAG = -17 */
- "invalid regular expression in search and replace operation", /* VAR_ERR_INVALID_REGEX_IN_REPLACE = -18 */
- "missing parameter in command", /* VAR_ERR_MISSING_PARAMETER_IN_COMMAND = -19 */
- "empty search string in search and replace operation", /* VAR_ERR_EMPTY_SEARCH_STRING = -20 */
- "start offset missing in cut operation", /* VAR_ERR_MISSING_START_OFFSET = -21 */
- "offsets in cut operation delimited by unknown character", /* VAR_ERR_INVALID_OFFSET_DELIMITER = -22 */
- "range in cut operation is out of bounds", /* VAR_ERR_RANGE_OUT_OF_BOUNDS = -23 */
- "offset in cut operation is out of bounds", /* VAR_ERR_OFFSET_OUT_OF_BOUNDS = -24 */
- "logic error in cut operation", /* VAR_ERR_OFFSET_LOGIC = -25 */
- "malformatted transpose operation", /* VAR_ERR_MALFORMATTED_TRANSPOSE = -26 */
- "source class does not match destination class in transpose operation", /* VAR_ERR_TRANSPOSE_CLASSES_MISMATCH = -27 */
- "empty character class in transpose operation", /* VAR_ERR_EMPTY_TRANSPOSE_CLASS = -28 */
- "incorrect character class in transpose operation", /* VAR_ERR_INCORRECT_TRANSPOSE_CLASS_SPEC = -29 */
- "malformatted padding operation", /* VAR_ERR_MALFORMATTED_PADDING = -30 */
- "width parameter missing in padding operation", /* VAR_ERR_MISSING_PADDING_WIDTH = -31 */
- "fill string missing in padding operation", /* VAR_ERR_EMPTY_PADDING_FILL_STRING = -32 */
- "unknown quoted pair in search and replace operation", /* VAR_ERR_UNKNOWN_QUOTED_PAIR_IN_REPLACE = -33 */
- "submatch referred to in replace string does not exist in search string", /* VAR_ERR_SUBMATCH_OUT_OF_RANGE = -34 */
- "invalid argument", /* VAR_ERR_INVALID_ARGUMENT = -35 */
- "incomplete quoted pair", /* VAR_ERR_INCOMPLETE_QUOTED_PAIR = -36 */
- "lookup function does not support variable arrays", /* VAR_ERR_ARRAY_LOOKUPS_ARE_UNSUPPORTED = -37 */
- "index specification of array variable contains an invalid character", /* VAR_ERR_INVALID_CHAR_IN_INDEX_SPEC = -38 */
- "index specification of array variable is incomplete", /* VAR_ERR_INCOMPLETE_INDEX_SPEC = -39 */
- "bracket expression in array variable's index is not closed", /* VAR_ERR_UNCLOSED_BRACKET_IN_INDEX = -40 */
- "division by zero error in index specification", /* VAR_ERR_DIVISION_BY_ZERO_IN_INDEX = -41 */
- "unterminated loop construct", /* VAR_ERR_UNTERMINATED_LOOP_CONSTRUCT = -42 */
- "invalid character in loop limits" /* VAR_ERR_INVALID_CHAR_IN_LOOP_LIMITS = -43 */
+ "everything ok", /* VAR_OK = 0 */
+ "incomplete named character", /* VAR_ERR_INCOMPLETE_NAMED_CHARACTER */
+ "incomplete hexadecimal value", /* VAR_ERR_INCOMPLETE_HEX */
+ "invalid hexadecimal value", /* VAR_ERR_INVALID_HEX */
+ "octal value too large", /* VAR_ERR_OCTAL_TOO_LARGE */
+ "invalid octal value", /* VAR_ERR_INVALID_OCTAL */
+ "incomplete octal value", /* VAR_ERR_INCOMPLETE_OCTAL */
+ "incomplete grouped hexadecimal value", /* VAR_ERR_INCOMPLETE_GROUPED_HEX */
+ "incorrect character class specification", /* VAR_ERR_INCORRECT_CLASS_SPEC */
+ "invalid expansion configuration", /* VAR_ERR_INVALID_CONFIGURATION */
+ "out of memory", /* VAR_ERR_OUT_OF_MEMORY */
+ "incomplete variable specification", /* VAR_ERR_INCOMPLETE_VARIABLE_SPEC */
+ "undefined variable", /* VAR_ERR_UNDEFINED_VARIABLE */
+ "input is neither text nor variable", /* VAR_ERR_INPUT_ISNT_TEXT_NOR_VARIABLE */
+ "unknown command character in variable", /* VAR_ERR_UNKNOWN_COMMAND_CHAR */
+ "malformated search and replace operation", /* VAR_ERR_MALFORMATTED_REPLACE */
+ "unknown flag in search and replace operation", /* VAR_ERR_UNKNOWN_REPLACE_FLAG */
+ "invalid regular expression in search and replace operation", /* VAR_ERR_INVALID_REGEX_IN_REPLACE */
+ "missing parameter in command", /* VAR_ERR_MISSING_PARAMETER_IN_COMMAND */
+ "empty search string in search and replace operation", /* VAR_ERR_EMPTY_SEARCH_STRING */
+ "start offset missing in cut operation", /* VAR_ERR_MISSING_START_OFFSET */
+ "offsets in cut operation delimited by unknown character", /* VAR_ERR_INVALID_OFFSET_DELIMITER */
+ "range out of bounds in cut operation", /* VAR_ERR_RANGE_OUT_OF_BOUNDS */
+ "offset out of bounds in cut operation", /* VAR_ERR_OFFSET_OUT_OF_BOUNDS */
+ "logic error in cut operation", /* VAR_ERR_OFFSET_LOGIC */
+ "malformatted transpose operation", /* VAR_ERR_MALFORMATTED_TRANSPOSE */
+ "source and destination classes do not match in transpose operation", /* VAR_ERR_TRANSPOSE_CLASSES_MISMATCH */
+ "empty character class in transpose operation", /* VAR_ERR_EMPTY_TRANSPOSE_CLASS */
+ "incorrect character class in transpose operation", /* VAR_ERR_INCORRECT_TRANSPOSE_CLASS_SPEC */
+ "malformatted padding operation", /* VAR_ERR_MALFORMATTED_PADDING */
+ "width parameter missing in padding operation", /* VAR_ERR_MISSING_PADDING_WIDTH */
+ "fill string missing in padding operation", /* VAR_ERR_EMPTY_PADDING_FILL_STRING */
+ "unknown quoted pair in search and replace operation", /* VAR_ERR_UNKNOWN_QUOTED_PAIR_IN_REPLACE */
+ "sub-matching reference out of range", /* VAR_ERR_SUBMATCH_OUT_OF_RANGE */
+ "invalid argument", /* VAR_ERR_INVALID_ARGUMENT */
+ "incomplete quoted pair", /* VAR_ERR_INCOMPLETE_QUOTED_PAIR */
+ "lookup function does not support variable arrays", /* VAR_ERR_ARRAY_LOOKUPS_ARE_UNSUPPORTED */
+ "index specification of array variable contains an invalid character", /* VAR_ERR_INVALID_CHAR_IN_INDEX_SPEC */
+ "index specification of array variable is incomplete", /* VAR_ERR_INCOMPLETE_INDEX_SPEC */
+ "bracket expression in array variable's index is not closed", /* VAR_ERR_UNCLOSED_BRACKET_IN_INDEX */
+ "division by zero error in index specification", /* VAR_ERR_DIVISION_BY_ZERO_IN_INDEX */
+ "unterminated loop construct", /* VAR_ERR_UNTERMINATED_LOOP_CONSTRUCT */
+ "invalid character in loop limits" /* VAR_ERR_INVALID_CHAR_IN_LOOP_LIMITS */
};
rc = 0 - rc;
|