cleanup spaces
This commit is contained in:
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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();
|
||||||
@ -1343,7 +1343,7 @@ normal_format:
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (commandIndex[i] >= ' ') i++;
|
while (commandIndex[i] >= ' ') i++;
|
||||||
error("%s: Input \"%s%s%s\"\n",
|
error("%s: Input \"%s%s%s\"\n",
|
||||||
name(),
|
name(),
|
||||||
consumedInput > 20 ? "..." : "",
|
consumedInput > 20 ? "..." : "",
|
||||||
inputLine.expand(consumedInput > 20 ? consumedInput-20 : 0, 40)(),
|
inputLine.expand(consumedInput > 20 ? consumedInput-20 : 0, 40)(),
|
||||||
@ -1356,7 +1356,7 @@ normal_format:
|
|||||||
consumedInput > 10 ? "..." : "",
|
consumedInput > 10 ? "..." : "",
|
||||||
inputLine.expand(consumedInput > 10 ? consumedInput-10 : 0,
|
inputLine.expand(consumedInput > 10 ? consumedInput-10 : 0,
|
||||||
consumedInput > 10 ? 10 : consumedInput)());
|
consumedInput > 10 ? 10 : consumedInput)());
|
||||||
|
|
||||||
error("%s: got \"%s%s\" where \"%s\" was expected\n",
|
error("%s: got \"%s%s\" where \"%s\" was expected\n",
|
||||||
name(),
|
name(),
|
||||||
inputLine.expand(consumedInput, 10)(),
|
inputLine.expand(consumedInput, 10)(),
|
||||||
|
@ -224,7 +224,7 @@ public:
|
|||||||
void printProtocol(FILE* = stdout);
|
void printProtocol(FILE* = stdout);
|
||||||
const char* name() { return streamname; }
|
const char* name() { return streamname; }
|
||||||
void printStatus(StreamBuffer& buffer);
|
void printStatus(StreamBuffer& buffer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
char* printCommands(StreamBuffer& buffer, const char* c);
|
char* printCommands(StreamBuffer& buffer, const char* c);
|
||||||
};
|
};
|
||||||
|
@ -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;
|
||||||
@ -223,7 +223,7 @@ long streamReload(const char* recordname)
|
|||||||
if (recordname && recordname[0] &&
|
if (recordname && recordname[0] &&
|
||||||
#ifdef EPICS_3_13
|
#ifdef EPICS_3_13
|
||||||
strcmp(stream->name(), recordname) == 0)
|
strcmp(stream->name(), recordname) == 0)
|
||||||
#else
|
#else
|
||||||
!epicsStrGlobMatch(stream->name(), recordname))
|
!epicsStrGlobMatch(stream->name(), recordname))
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
@ -747,7 +747,7 @@ parseLink(const struct link *ioLink, char* filename,
|
|||||||
" in \"@%s\"\n", name(),
|
" in \"@%s\"\n", name(),
|
||||||
ioLink->value.instio.string);
|
ioLink->value.instio.string);
|
||||||
return S_dev_badInitRet;
|
return S_dev_badInitRet;
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -871,7 +871,7 @@ process()
|
|||||||
if (!startProtocol(record->proc == 2 ? StreamCore::StartInit : StreamCore::StartNormal))
|
if (!startProtocol(record->proc == 2 ? StreamCore::StartInit : StreamCore::StartNormal))
|
||||||
{
|
{
|
||||||
debug("Stream::process(%s): could not start %sprotocol, status=%s (%d)\n",
|
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 ?
|
status >= 0 && status < ALARM_NSTATUS ?
|
||||||
epicsAlarmConditionStrings[status] : "ERROR",
|
epicsAlarmConditionStrings[status] : "ERROR",
|
||||||
status);
|
status);
|
||||||
|
@ -286,7 +286,7 @@ parseProtocol(Protocol& protocol, StreamBuffer* commands)
|
|||||||
}
|
}
|
||||||
if (token[0] == '{')
|
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",
|
isGlobalContext(commands) ? "protocol" : "handler",
|
||||||
token[0]);
|
token[0]);
|
||||||
return false;
|
return false;
|
||||||
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
if (record->pact) return OK;
|
if (record->pact) return OK;
|
||||||
/* In @init handler, no processing, enforce monitor updates. */
|
/* In @init handler, no processing, enforce monitor updates. */
|
||||||
@ -60,10 +60,10 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user