cleanup whitespace
This commit is contained in:
@ -79,15 +79,15 @@ printDouble(const StreamFormat& format, StreamBuffer& output, double value)
|
|||||||
if (!(format.flags & alt_flag) ^ (endian == 4321))
|
if (!(format.flags & alt_flag) ^ (endian == 4321))
|
||||||
{
|
{
|
||||||
// swap if byte orders differ
|
// swap if byte orders differ
|
||||||
for (n = nbOfBytes-1; n >= 0; n--)
|
for (n = nbOfBytes-1; n >= 0; n--)
|
||||||
{
|
{
|
||||||
output.append(buffer.bytes[n]);
|
output.append(buffer.bytes[n]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (n = 0; n < nbOfBytes; n++)
|
for (n = 0; n < nbOfBytes; n++)
|
||||||
{
|
{
|
||||||
output.append(buffer.bytes[n]);
|
output.append(buffer.bytes[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -116,15 +116,15 @@ scanDouble(const StreamFormat& format, const char* input, double& value)
|
|||||||
if (!(format.flags & alt_flag) ^ (endian == 4321))
|
if (!(format.flags & alt_flag) ^ (endian == 4321))
|
||||||
{
|
{
|
||||||
// swap if byte orders differ
|
// swap if byte orders differ
|
||||||
for (n = nbOfBytes-1, i = 0; n >= 0; n--, i++)
|
for (n = nbOfBytes-1, i = 0; n >= 0; n--, i++)
|
||||||
{
|
{
|
||||||
buffer.bytes[n] = input[i];
|
buffer.bytes[n] = input[i];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (n = 0; n < nbOfBytes; n++)
|
for (n = 0; n < nbOfBytes; n++)
|
||||||
{
|
{
|
||||||
buffer.bytes[n] = input[n];
|
buffer.bytes[n] = input[n];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbOfBytes == 4)
|
if (nbOfBytes == 4)
|
||||||
|
@ -48,12 +48,12 @@ FILE *StreamDebugFile = NULL;
|
|||||||
|
|
||||||
/* Enable ANSI colors in Windows console */
|
/* Enable ANSI colors in Windows console */
|
||||||
static int win_console_init() {
|
static int win_console_init() {
|
||||||
DWORD dwMode = 0;
|
DWORD dwMode = 0;
|
||||||
HANDLE hCons = GetStdHandle(STD_ERROR_HANDLE);
|
HANDLE hCons = GetStdHandle(STD_ERROR_HANDLE);
|
||||||
GetConsoleMode(hCons, &dwMode);
|
GetConsoleMode(hCons, &dwMode);
|
||||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||||
SetConsoleMode(hCons, dwMode);
|
SetConsoleMode(hCons, dwMode);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static int s = win_console_init();
|
static int s = win_console_init();
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ value can also be gained from tm_gmtoff of the tm-structure.
|
|||||||
defined(__DragonFly__)
|
defined(__DragonFly__)
|
||||||
static int timezone_bsd=0;
|
static int timezone_bsd=0;
|
||||||
#define timezone timezone_bsd
|
#define timezone timezone_bsd
|
||||||
#define tzset() { struct tm tm; time_t timet; tzset(); time(&timet); \
|
#define tzset() { struct tm tm; time_t timet; tzset(); time(&timet); \
|
||||||
localtime_r(&timet, &tm); timezone=tm.tm_gmtoff; }
|
localtime_r(&timet, &tm); timezone=tm.tm_gmtoff; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
}
|
}
|
||||||
aai->nord = (long)length;
|
aai->nord = (long)length;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
errlogSevPrintf(errlogFatal,
|
errlogSevPrintf(errlogFatal,
|
||||||
"readData %s: can't convert from string to %s\n",
|
"readData %s: can't convert from string to %s\n",
|
||||||
|
@ -52,16 +52,16 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
val += ao->roff;
|
val += ao->roff;
|
||||||
if (ao->linr == menuConvertNO_CONVERSION) {
|
if (ao->linr == menuConvertNO_CONVERSION) {
|
||||||
; /*do nothing*/
|
; /*do nothing*/
|
||||||
} else if ((ao->linr == menuConvertLINEAR)
|
} else if ((ao->linr == menuConvertLINEAR)
|
||||||
#ifndef EPICS_3_13
|
#ifndef EPICS_3_13
|
||||||
|| (ao->linr == menuConvertSLOPE)
|
|| (ao->linr == menuConvertSLOPE)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
val = val * ao->eslo + ao->eoff;
|
val = val * ao->eslo + ao->eoff;
|
||||||
} else {
|
} else {
|
||||||
if (cvtRawToEngBpt(&val, ao->linr, 0,
|
if (cvtRawToEngBpt(&val, ao->linr, 0,
|
||||||
(void *)&ao->pbrk, &ao->lbrk) == ERROR) return ERROR;
|
(void *)&ao->pbrk, &ao->lbrk) == ERROR) return ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user