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;
while (numEnums-- && (value != index))
{
while(*s)
while (*s)
{
if (*s == esc) s++;
s++;
@ -140,7 +140,7 @@ printLong(const StreamFormat& fmt, StreamBuffer& output, long value)
error("Value %li not found in enum set\n", value);
return false;
}
while(*s)
while (*s)
{
if (*s == esc) 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);
consumed = 0;
match = true;
while(*s)
while (*s)
{
if (*s == StreamProtocolParser::skip)
{

View File

@ -28,7 +28,7 @@
#define 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)
#else
@ -65,7 +65,7 @@ _ENUM_CAST(type)
#define ENUM(type,...) \
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)
#endif

View File

@ -34,7 +34,7 @@ printCommands(StreamBuffer& buffer, const char* c)
unsigned long eventnumber;
while (1)
{
switch(*c++)
switch (*c++)
{
case end:
return buffer();
@ -1343,7 +1343,7 @@ normal_format:
{
int i = 0;
while (commandIndex[i] >= ' ') i++;
error("%s: Input \"%s%s%s\"\n",
error("%s: Input \"%s%s%s\"\n",
name(),
consumedInput > 20 ? "..." : "",
inputLine.expand(consumedInput > 20 ? consumedInput-20 : 0, 40)(),
@ -1356,7 +1356,7 @@ normal_format:
consumedInput > 10 ? "..." : "",
inputLine.expand(consumedInput > 10 ? consumedInput-10 : 0,
consumedInput > 10 ? 10 : consumedInput)());
error("%s: got \"%s%s\" where \"%s\" was expected\n",
name(),
inputLine.expand(consumedInput, 10)(),

View File

@ -224,7 +224,7 @@ public:
void printProtocol(FILE* = stdout);
const char* name() { return streamname; }
void printStatus(StreamBuffer& buffer);
private:
char* printCommands(StreamBuffer& buffer, const char* c);
};

View File

@ -211,7 +211,7 @@ long streamReload(const char* recordname)
int oldStreamError = streamError;
streamError = 1;
if(!pdbbase) {
if (!pdbbase) {
error("No database has been loaded\n");
streamError = oldStreamError;
return ERROR;
@ -223,7 +223,7 @@ long streamReload(const char* recordname)
if (recordname && recordname[0] &&
#ifdef EPICS_3_13
strcmp(stream->name(), recordname) == 0)
#else
#else
!epicsStrGlobMatch(stream->name(), recordname))
#endif
continue;
@ -747,7 +747,7 @@ parseLink(const struct link *ioLink, char* filename,
" in \"@%s\"\n", name(),
ioLink->value.instio.string);
return S_dev_badInitRet;
}
}
return OK;
}
@ -871,7 +871,7 @@ process()
if (!startProtocol(record->proc == 2 ? StreamCore::StartInit : StreamCore::StartNormal))
{
debug("Stream::process(%s): could not start %sprotocol, status=%s (%d)\n",
name(), record->proc == 2 ? "@init " : "",
name(), record->proc == 2 ? "@init " : "",
status >= 0 && status < ALARM_NSTATUS ?
epicsAlarmConditionStrings[status] : "ERROR",
status);

View File

@ -286,7 +286,7 @@ parseProtocol(Protocol& protocol, StreamBuffer* commands)
}
if (token[0] == '{')
{
error(line, filename(), "Expect %s name before '%c'\n",
error(line, filename(), "Expect %s name before '%c'\n",
isGlobalContext(commands) ? "protocol" : "handler",
token[0]);
return false;
@ -1039,7 +1039,7 @@ compileNumber(unsigned long& number, const char*& source, unsigned long max)
*source, source);
if (*source == '$')
{
if(!replaceVariable(buffer, source)) return false;
if (!replaceVariable(buffer, source)) return false;
debug("buffer=%s\n", buffer.expand()());
buffer.truncate(-1-(int)sizeof(int));
}

View File

@ -46,7 +46,7 @@ static long readData(dbCommon *record, format_t *format)
break;
}
default:
return ERROR;
return ERROR;
}
if (record->pact) return OK;
/* In @init handler, no processing, enforce monitor updates. */
@ -60,10 +60,10 @@ static long readData(dbCommon *record, format_t *format)
monitor_mask |= DBE_LOG;
co->alst = co->val;
}
if (monitor_mask){
if (monitor_mask) {
db_post_events(record, &co->val, monitor_mask);
}
return OK;
}

View File

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