diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-17 00:30:52 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-17 00:30:52 +0000 |
commit | c0f4495d5e9736d77cb5142a6f5112764b5ca3d2 (patch) | |
tree | af30ade9e318b1e4b488ee6c5839f1fc75d99808 /src/helper | |
parent | d579befc0702969f71fce974befe898dec3af6dd (diff) | |
download | riscv-openocd-c0f4495d5e9736d77cb5142a6f5112764b5ca3d2.zip riscv-openocd-c0f4495d5e9736d77cb5142a6f5112764b5ca3d2.tar.gz riscv-openocd-c0f4495d5e9736d77cb5142a6f5112764b5ca3d2.tar.bz2 |
Change parse_type macros to be sed-friendly.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2259 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/command.c | 18 | ||||
-rw-r--r-- | src/helper/command.h | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 10ff523..5dbc047 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -884,7 +884,7 @@ DEFINE_PARSE_NUM_TYPE(_long, long , strtol, LONG_MIN, LONG_MAX) DEFINE_PARSE_NUM_TYPE(_llong, long long, strtoll, LLONG_MIN, LLONG_MAX) #define DEFINE_PARSE_WRAPPER(name, type, min, max, functype, funcname) \ - int parse_##name(const char *str, type *ul) \ + int parse##name(const char *str, type *ul) \ { \ functype n; \ int retval = parse##funcname(str, &n); \ @@ -900,14 +900,14 @@ DEFINE_PARSE_NUM_TYPE(_llong, long long, strtoll, LLONG_MIN, LLONG_MAX) #define DEFINE_PARSE_ULONG(name, type, min, max) \ DEFINE_PARSE_WRAPPER(name, type, min, max, unsigned long, _ulong) -DEFINE_PARSE_ULONG(uint, unsigned, 0, UINT_MAX) -DEFINE_PARSE_ULONG(u32, uint32_t, 0, UINT32_MAX) -DEFINE_PARSE_ULONG(u16, uint16_t, 0, UINT16_MAX) -DEFINE_PARSE_ULONG(u8, uint8_t, 0, UINT8_MAX) +DEFINE_PARSE_ULONG(_uint, unsigned, 0, UINT_MAX) +DEFINE_PARSE_ULONG(_u32, uint32_t, 0, UINT32_MAX) +DEFINE_PARSE_ULONG(_u16, uint16_t, 0, UINT16_MAX) +DEFINE_PARSE_ULONG(_u8, uint8_t, 0, UINT8_MAX) #define DEFINE_PARSE_LONG(name, type, min, max) \ DEFINE_PARSE_WRAPPER(name, type, min, max, long, _long) -DEFINE_PARSE_LONG(int, int, n < INT_MIN, INT_MAX) -DEFINE_PARSE_LONG(s32, int32_t, n < INT32_MIN, INT32_MAX) -DEFINE_PARSE_LONG(s16, int16_t, n < INT16_MIN, INT16_MAX) -DEFINE_PARSE_LONG(s8, int8_t, n < INT8_MIN, INT8_MAX) +DEFINE_PARSE_LONG(_int, int, n < INT_MIN, INT_MAX) +DEFINE_PARSE_LONG(_s32, int32_t, n < INT32_MIN, INT32_MAX) +DEFINE_PARSE_LONG(_s16, int16_t, n < INT16_MIN, INT16_MAX) +DEFINE_PARSE_LONG(_s8, int8_t, n < INT8_MIN, INT8_MAX) diff --git a/src/helper/command.h b/src/helper/command.h index 565a83e..3e7bea9 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -117,17 +117,17 @@ int parse_long(const char *str, long *ul); int parse_llong(const char *str, long long *ul); #define DECLARE_PARSE_WRAPPER(name, type) \ - int parse_##name(const char *str, type *ul) + int parse##name(const char *str, type *ul) -DECLARE_PARSE_WRAPPER(uint, unsigned); -DECLARE_PARSE_WRAPPER(u32, uint32_t); -DECLARE_PARSE_WRAPPER(u16, uint16_t); -DECLARE_PARSE_WRAPPER(u8, uint8_t); +DECLARE_PARSE_WRAPPER(_uint, unsigned); +DECLARE_PARSE_WRAPPER(_u32, uint32_t); +DECLARE_PARSE_WRAPPER(_u16, uint16_t); +DECLARE_PARSE_WRAPPER(_u8, uint8_t); -DECLARE_PARSE_WRAPPER(int, int); -DECLARE_PARSE_WRAPPER(s32, int32_t); -DECLARE_PARSE_WRAPPER(s16, int16_t); -DECLARE_PARSE_WRAPPER(s8, int8_t); +DECLARE_PARSE_WRAPPER(_int, int); +DECLARE_PARSE_WRAPPER(_s32, int32_t); +DECLARE_PARSE_WRAPPER(_s16, int16_t); +DECLARE_PARSE_WRAPPER(_s8, int8_t); void script_debug(Jim_Interp *interp, const char *cmd, int argc, Jim_Obj *const *argv); |