From e4087a9244e6e48621ac5a074e2ea0618a0a0750 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 5 May 2020 13:58:44 +0200 Subject: [PATCH] cleanup whitespace --- src/Makefile | 2 +- src/RawFloatConverter.cc | 24 ++++++++++++------------ src/StreamError.cc | 10 +++++----- src/TimestampConverter.cc | 2 +- src/devaaiStream.c | 2 +- src/devaoStream.c | 6 +++--- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Makefile b/src/Makefile index 54d1106..755b45f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -51,7 +51,7 @@ endif ifeq ($(LOADABLE_MODULE),YES) SRCS += $(LIBRARY_DEFAULT)_registerRecordDeviceDriver.cpp -endif +endif SRCS += $(BUSSES:%=%Interface.cc) SRCS += $(FORMATS:%=%Converter.cc) SRCS += $(RECORDTYPES:%=dev%Stream.c) diff --git a/src/RawFloatConverter.cc b/src/RawFloatConverter.cc index 1faef70..5dc89c4 100644 --- a/src/RawFloatConverter.cc +++ b/src/RawFloatConverter.cc @@ -79,15 +79,15 @@ printDouble(const StreamFormat& format, StreamBuffer& output, double value) if (!(format.flags & alt_flag) ^ (endian == 4321)) { // swap if byte orders differ - for (n = nbOfBytes-1; n >= 0; n--) - { + for (n = nbOfBytes-1; n >= 0; n--) + { output.append(buffer.bytes[n]); - } + } } else { - for (n = 0; n < nbOfBytes; n++) - { + for (n = 0; n < nbOfBytes; n++) + { output.append(buffer.bytes[n]); - } + } } return true; } @@ -116,15 +116,15 @@ scanDouble(const StreamFormat& format, const char* input, double& value) if (!(format.flags & alt_flag) ^ (endian == 4321)) { // 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]; - } + } } else { - for (n = 0; n < nbOfBytes; n++) - { + for (n = 0; n < nbOfBytes; n++) + { buffer.bytes[n] = input[n]; - } + } } if (nbOfBytes == 4) diff --git a/src/StreamError.cc b/src/StreamError.cc index 787f486..65f7776 100644 --- a/src/StreamError.cc +++ b/src/StreamError.cc @@ -48,12 +48,12 @@ FILE *StreamDebugFile = NULL; /* Enable ANSI colors in Windows console */ static int win_console_init() { - DWORD dwMode = 0; + DWORD dwMode = 0; HANDLE hCons = GetStdHandle(STD_ERROR_HANDLE); - GetConsoleMode(hCons, &dwMode); - dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; - SetConsoleMode(hCons, dwMode); - return 0; + GetConsoleMode(hCons, &dwMode); + dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; + SetConsoleMode(hCons, dwMode); + return 0; } static int s = win_console_init(); diff --git a/src/TimestampConverter.cc b/src/TimestampConverter.cc index 69ed15a..57ea388 100644 --- a/src/TimestampConverter.cc +++ b/src/TimestampConverter.cc @@ -42,7 +42,7 @@ value can also be gained from tm_gmtoff of the tm-structure. defined(__DragonFly__) static int timezone_bsd=0; #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; } #endif diff --git a/src/devaaiStream.c b/src/devaaiStream.c index eea51f1..2074644 100644 --- a/src/devaaiStream.c +++ b/src/devaaiStream.c @@ -126,7 +126,7 @@ static long readData(dbCommon *record, format_t *format) } aai->nord = (long)length; return OK; - } + } default: errlogSevPrintf(errlogFatal, "readData %s: can't convert from string to %s\n", diff --git a/src/devaoStream.c b/src/devaoStream.c index 41dde4f..59c6658 100644 --- a/src/devaoStream.c +++ b/src/devaoStream.c @@ -52,16 +52,16 @@ static long readData(dbCommon *record, format_t *format) break; val += ao->roff; if (ao->linr == menuConvertNO_CONVERSION) { - ; /*do nothing*/ + ; /*do nothing*/ } else if ((ao->linr == menuConvertLINEAR) #ifndef EPICS_3_13 - || (ao->linr == menuConvertSLOPE) + || (ao->linr == menuConvertSLOPE) #endif ) { val = val * ao->eslo + ao->eoff; } else { if (cvtRawToEngBpt(&val, ao->linr, 0, - (void *)&ao->pbrk, &ao->lbrk) == ERROR) return ERROR; + (void *)&ao->pbrk, &ao->lbrk) == ERROR) return ERROR; } } default: