From eaf97cc4bd995ee99e3d4403289fce87df8fd76c Mon Sep 17 00:00:00 2001 From: Jan Breuer <jan.breuer@jaybee.cz> Date: 周三, 17 9月 2014 22:03:53 +0800 Subject: [PATCH] Update comments about non-null terminated strings --- libscpi/src/units.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libscpi/src/units.c b/libscpi/src/units.c index 493c4ce..ac0a0bb 100644 --- a/libscpi/src/units.c +++ b/libscpi/src/units.c @@ -37,7 +37,7 @@ #include <string.h> #include "scpi/parser.h" #include "scpi/units.h" -#include "utils.h" +#include "scpi/utils_private.h" #include "scpi/error.h" @@ -109,7 +109,7 @@ {/* name */ "UP", /* type */ SCPI_NUM_UP}, {/* name */ "DOWN", /* type */ SCPI_NUM_DOWN}, {/* name */ "NAN", /* type */ SCPI_NUM_NAN}, - {/* name */ "INF", /* type */ SCPI_NUM_INF}, + {/* name */ "INFinity", /* type */ SCPI_NUM_INF}, {/* name */ "NINF", /* type */ SCPI_NUM_NINF}, SCPI_SPECIAL_NUMBERS_LIST_END, }; @@ -122,7 +122,7 @@ * @param value resultin value * @return TRUE if str matches one of specs patterns */ -static bool_t translateSpecialNumber(const scpi_special_number_def_t * specs, const char * str, size_t len, scpi_number_t * value) { +static scpi_bool_t translateSpecialNumber(const scpi_special_number_def_t * specs, const char * str, size_t len, scpi_number_t * value) { int i; value->value = 0.0; @@ -218,7 +218,7 @@ * @param value preparsed numeric value * @return TRUE if value parameter was converted to base units */ -static bool_t transformNumber(scpi_t * context, const char * unit, size_t len, scpi_number_t * value) { +static scpi_bool_t transformNumber(scpi_t * context, const char * unit, size_t len, scpi_number_t * value) { size_t s; const scpi_unit_def_t * unitDef; s = skipWhitespace(unit, len); @@ -248,8 +248,8 @@ * @param mandatory if the parameter is mandatory * @return */ -bool_t SCPI_ParamNumber(scpi_t * context, scpi_number_t * value, bool_t mandatory) { - bool_t result; +scpi_bool_t SCPI_ParamNumber(scpi_t * context, scpi_number_t * value, scpi_bool_t mandatory) { + scpi_bool_t result; const char * param; size_t len; size_t numlen; -- Gitblit v1.9.1