cleanup spaces

This commit is contained in:
2020-02-26 15:49:46 +01:00
parent afe8cc9a3e
commit 0803c94c79
8 changed files with 19 additions and 19 deletions

View File

@ -127,7 +127,7 @@ printLong(const StreamFormat& fmt, StreamBuffer& output, long value)
if (numEnums < 0) numEnums=-numEnums-1; if (numEnums < 0) numEnums=-numEnums-1;
while (numEnums-- && (value != index)) while (numEnums-- && (value != index))
{ {
while(*s) while (*s)
{ {
if (*s == esc) s++; if (*s == esc) s++;
s++; s++;
@ -140,7 +140,7 @@ printLong(const StreamFormat& fmt, StreamBuffer& output, long value)
error("Value %li not found in enum set\n", value); error("Value %li not found in enum set\n", value);
return false; return false;
} }
while(*s) while (*s)
{ {
if (*s == esc) s++; if (*s == esc) s++;
output.append(*s++); output.append(*s++);
@ -165,7 +165,7 @@ scanLong(const StreamFormat& fmt, const char* input, long& value)
debug("EnumConverter::scanLong: check #%ld \"%s\"\n", index, s); debug("EnumConverter::scanLong: check #%ld \"%s\"\n", index, s);
consumed = 0; consumed = 0;
match = true; match = true;
while(*s) while (*s)
{ {
if (*s == StreamProtocolParser::skip) if (*s == StreamProtocolParser::skip)
{ {

View File

@ -28,7 +28,7 @@
#define ENUM(type, args...) \ #define ENUM(type, args...) \
enum type { args }; \ enum type { args }; \
static inline const char* type##ToStr(int x) {switch(x){MACRO_FOR_EACH(_CASE_LINE,args)default: return "invalid";}}\ static inline const char* type##ToStr(int x) {switch(x) {MACRO_FOR_EACH(_CASE_LINE,args)default: return "invalid";}}\
_ENUM_CAST(type) _ENUM_CAST(type)
#else #else
@ -65,7 +65,7 @@ _ENUM_CAST(type)
#define ENUM(type,...) \ #define ENUM(type,...) \
enum type { __VA_ARGS__ }; \ enum type { __VA_ARGS__ }; \
static inline const char* type##ToStr(int x) {switch(x){_EXPAND(MACRO_FOR_EACH(_CASE_LINE,__VA_ARGS__)) default: return "invalid";}} \ static inline const char* type##ToStr(int x) {switch(x) {_EXPAND(MACRO_FOR_EACH(_CASE_LINE,__VA_ARGS__)) default: return "invalid";}} \
_ENUM_CAST(type) _ENUM_CAST(type)
#endif #endif

View File

@ -34,7 +34,7 @@ printCommands(StreamBuffer& buffer, const char* c)
unsigned long eventnumber; unsigned long eventnumber;
while (1) while (1)
{ {
switch(*c++) switch (*c++)
{ {
case end: case end:
return buffer(); return buffer();

View File

@ -211,7 +211,7 @@ long streamReload(const char* recordname)
int oldStreamError = streamError; int oldStreamError = streamError;
streamError = 1; streamError = 1;
if(!pdbbase) { if (!pdbbase) {
error("No database has been loaded\n"); error("No database has been loaded\n");
streamError = oldStreamError; streamError = oldStreamError;
return ERROR; return ERROR;

View File

@ -1039,7 +1039,7 @@ compileNumber(unsigned long& number, const char*& source, unsigned long max)
*source, source); *source, source);
if (*source == '$') if (*source == '$')
{ {
if(!replaceVariable(buffer, source)) return false; if (!replaceVariable(buffer, source)) return false;
debug("buffer=%s\n", buffer.expand()()); debug("buffer=%s\n", buffer.expand()());
buffer.truncate(-1-(int)sizeof(int)); buffer.truncate(-1-(int)sizeof(int));
} }

View File

@ -60,7 +60,7 @@ static long readData(dbCommon *record, format_t *format)
monitor_mask |= DBE_LOG; monitor_mask |= DBE_LOG;
co->alst = co->val; co->alst = co->val;
} }
if (monitor_mask){ if (monitor_mask) {
db_post_events(record, &co->val, monitor_mask); db_post_events(record, &co->val, monitor_mask);
} }

View File

@ -25,7 +25,7 @@
of the device support. of the device support.
Fix: sCalcoutRecord.c, end of init_record() add Fix: sCalcoutRecord.c, end of init_record() add
if(pscalcoutDSET->init_record ) { if (pscalcoutDSET->init_record ) {
return (*pscalcoutDSET->init_record)(pcalc); return (*pscalcoutDSET->init_record)(pcalc);
} }
*/ */