From d0bc5f4b3304d6b4f8aff470e1de05c5b82cebab Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 15 Apr 2020 10:55:29 +0200 Subject: [PATCH 1/3] replaced tabs with spaces --- pdbApp/pvif.h | 24 +++--- pdbApp/softMain.cpp | 184 ++++++++++++++++++++++---------------------- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/pdbApp/pvif.h b/pdbApp/pvif.h index d30af74..66c7711 100644 --- a/pdbApp/pvif.h +++ b/pdbApp/pvif.h @@ -50,23 +50,23 @@ long copyDBF2PVD(const epics::pvData::shared_vector& buf, const epics::pvData::PVStringArray::const_svector& choices); union dbrbuf { - epicsInt8 dbf_CHAR; - epicsUInt8 dbf_UCHAR; - epicsInt16 dbf_SHORT; - epicsUInt16 dbf_USHORT; - epicsEnum16 dbf_ENUM; - epicsInt32 dbf_LONG; - epicsUInt32 dbf_ULONG; - epicsFloat32 dbf_FLOAT; - epicsFloat64 dbf_DOUBLE; + epicsInt8 dbf_CHAR; + epicsUInt8 dbf_UCHAR; + epicsInt16 dbf_SHORT; + epicsUInt16 dbf_USHORT; + epicsEnum16 dbf_ENUM; + epicsInt32 dbf_LONG; + epicsUInt32 dbf_ULONG; + epicsFloat32 dbf_FLOAT; + epicsFloat64 dbf_DOUBLE; #ifdef EPICS_VERSION_INT # if EPICS_VERSION_INT>=VERSION_INT(3,16,1,0) - epicsInt64 dbf_INT64; - epicsUInt64 dbf_UINT64; + epicsInt64 dbf_INT64; + epicsUInt64 dbf_UINT64; # endif #endif - char dbf_STRING[MAX_STRING_SIZE]; + char dbf_STRING[MAX_STRING_SIZE]; }; struct QSRV_API DBCH { diff --git a/pdbApp/softMain.cpp b/pdbApp/softMain.cpp index b9d05be..f7a9a27 100644 --- a/pdbApp/softMain.cpp +++ b/pdbApp/softMain.cpp @@ -9,12 +9,12 @@ /* Copyed from EPICS Base 3.16 branch */ -/* Author: Andrew Johnson Date: 2003-04-08 */ +/* Author: Andrew Johnson Date: 2003-04-08 */ /* Usage: * softIoc [-D softIoc.dbd] [-h] [-S] [-s] [-a ascf] - * [-m macro=value,macro2=value2] [-d file.db] - * [-x prefix] [st.cmd] + * [-m macro=value,macro2=value2] [-d file.db] + * [-x prefix] [st.cmd] * * If used the -D option must come first, and specify the * path to the softIoc.dbd file. The compile-time install @@ -114,133 +114,133 @@ int main(int argc, char *argv[]) char *dbd_file = const_cast(base_dbd); char *macros = NULL; char xmacro[PVNAME_STRINGSZ + 4]; - int startIocsh = 1; /* default = start shell */ + int startIocsh = 1; /* default = start shell */ int loadedDb = 0; arg0 = strrchr(*argv, '/'); if (!arg0) { - arg0 = *argv; + arg0 = *argv; } else { - ++arg0; /* skip the '/' */ + ++arg0; /* skip the '/' */ } --argc, ++argv; /* Do this here in case the dbd file not available */ if (argc>0 && **argv=='-' && (*argv)[1]=='h') { - usage(EXIT_SUCCESS); + usage(EXIT_SUCCESS); } if (argc>1 && **argv=='-' && (*argv)[1]=='D') { - dbd_file = *++argv; - argc -= 2; - ++argv; + dbd_file = *++argv; + argc -= 2; + ++argv; } if (dbLoadDatabase(dbd_file, NULL, NULL)) { - epicsExit(EXIT_FAILURE); + epicsExit(EXIT_FAILURE); } softIocPVA_registerRecordDeviceDriver(pdbbase); registryFunctionAdd("exit", (REGISTRYFUNCTION) exitSubroutine); while (argc>1 && **argv == '-') { - switch ((*argv)[1]) { - case 'a': - if (macros) asSetSubstitutions(macros); - asSetFilename(*++argv); - --argc; - break; - - case 'd': - if (dbLoadRecords(*++argv, macros)) { - epicsExit(EXIT_FAILURE); - } - loadedDb = 1; - --argc; - break; - - case 'h': - usage(EXIT_SUCCESS); - - case 'm': - macros = *++argv; - --argc; - break; - - case 'S': - startIocsh = 0; - break; - - case 's': - break; - - case 'x': - epicsSnprintf(xmacro, sizeof xmacro, "IOC=%s", *++argv); - if (dbLoadRecords(exit_db, xmacro)) { - epicsExit(EXIT_FAILURE); - } - loadedDb = 1; - --argc; - break; - - default: - printf("%s: option '%s' not recognized\n", arg0, *argv); - usage(EXIT_FAILURE); - } - --argc; - ++argv; + switch ((*argv)[1]) { + case 'a': + if (macros) asSetSubstitutions(macros); + asSetFilename(*++argv); + --argc; + break; + + case 'd': + if (dbLoadRecords(*++argv, macros)) { + epicsExit(EXIT_FAILURE); + } + loadedDb = 1; + --argc; + break; + + case 'h': + usage(EXIT_SUCCESS); + + case 'm': + macros = *++argv; + --argc; + break; + + case 'S': + startIocsh = 0; + break; + + case 's': + break; + + case 'x': + epicsSnprintf(xmacro, sizeof xmacro, "IOC=%s", *++argv); + if (dbLoadRecords(exit_db, xmacro)) { + epicsExit(EXIT_FAILURE); + } + loadedDb = 1; + --argc; + break; + + default: + printf("%s: option '%s' not recognized\n", arg0, *argv); + usage(EXIT_FAILURE); + } + --argc; + ++argv; } if (argc>0 && **argv=='-') { - switch((*argv)[1]) { - case 'a': - case 'd': - case 'm': - case 'x': - printf("%s: missing argument to option '%s'\n", arg0, *argv); - usage(EXIT_FAILURE); - - case 'h': - usage(EXIT_SUCCESS); - - case 'S': - startIocsh = 0; - break; - - case 's': - break; - - default: - printf("%s: option '%s' not recognized\n", arg0, *argv); - usage(EXIT_FAILURE); - } - --argc; - ++argv; + switch((*argv)[1]) { + case 'a': + case 'd': + case 'm': + case 'x': + printf("%s: missing argument to option '%s'\n", arg0, *argv); + usage(EXIT_FAILURE); + + case 'h': + usage(EXIT_SUCCESS); + + case 'S': + startIocsh = 0; + break; + + case 's': + break; + + default: + printf("%s: option '%s' not recognized\n", arg0, *argv); + usage(EXIT_FAILURE); + } + --argc; + ++argv; } if (loadedDb) { - iocInit(); - epicsThreadSleep(0.2); + iocInit(); + epicsThreadSleep(0.2); } /* run user's startup script */ if (argc>0) { - if (iocsh(*argv)) epicsExit(EXIT_FAILURE); - epicsThreadSleep(0.2); - loadedDb = 1; /* Give it the benefit of the doubt... */ + if (iocsh(*argv)) epicsExit(EXIT_FAILURE); + epicsThreadSleep(0.2); + loadedDb = 1; /* Give it the benefit of the doubt... */ } /* start an interactive shell if it was requested */ if (startIocsh) { - iocsh(NULL); + iocsh(NULL); } else { - if (loadedDb) { - epicsThreadExitMain(); - } else { - printf("%s: Nothing to do!\n", arg0); - usage(EXIT_FAILURE); - } + if (loadedDb) { + epicsThreadExitMain(); + } else { + printf("%s: Nothing to do!\n", arg0); + usage(EXIT_FAILURE); + } } epicsExit(EXIT_SUCCESS); /*Note that the following statement will never be executed*/ From 3e747809d9c3167936be74c1bf081cb159a3d829 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 15 Apr 2020 13:12:09 +0200 Subject: [PATCH 2/3] removed spaces at end of line --- pdbApp/softMain.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/pdbApp/softMain.cpp b/pdbApp/softMain.cpp index f7a9a27..fb1d4d3 100644 --- a/pdbApp/softMain.cpp +++ b/pdbApp/softMain.cpp @@ -116,31 +116,31 @@ int main(int argc, char *argv[]) char xmacro[PVNAME_STRINGSZ + 4]; int startIocsh = 1; /* default = start shell */ int loadedDb = 0; - + arg0 = strrchr(*argv, '/'); if (!arg0) { arg0 = *argv; } else { ++arg0; /* skip the '/' */ } - + --argc, ++argv; - + /* Do this here in case the dbd file not available */ if (argc>0 && **argv=='-' && (*argv)[1]=='h') { usage(EXIT_SUCCESS); } - + if (argc>1 && **argv=='-' && (*argv)[1]=='D') { dbd_file = *++argv; argc -= 2; ++argv; } - + if (dbLoadDatabase(dbd_file, NULL, NULL)) { epicsExit(EXIT_FAILURE); } - + softIocPVA_registerRecordDeviceDriver(pdbbase); registryFunctionAdd("exit", (REGISTRYFUNCTION) exitSubroutine); @@ -151,7 +151,7 @@ int main(int argc, char *argv[]) asSetFilename(*++argv); --argc; break; - + case 'd': if (dbLoadRecords(*++argv, macros)) { epicsExit(EXIT_FAILURE); @@ -159,22 +159,22 @@ int main(int argc, char *argv[]) loadedDb = 1; --argc; break; - + case 'h': usage(EXIT_SUCCESS); - + case 'm': macros = *++argv; --argc; break; - + case 'S': startIocsh = 0; break; - + case 's': break; - + case 'x': epicsSnprintf(xmacro, sizeof xmacro, "IOC=%s", *++argv); if (dbLoadRecords(exit_db, xmacro)) { @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) loadedDb = 1; --argc; break; - + default: printf("%s: option '%s' not recognized\n", arg0, *argv); usage(EXIT_FAILURE); @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) --argc; ++argv; } - + if (argc>0 && **argv=='-') { switch((*argv)[1]) { case 'a': @@ -200,17 +200,17 @@ int main(int argc, char *argv[]) case 'x': printf("%s: missing argument to option '%s'\n", arg0, *argv); usage(EXIT_FAILURE); - + case 'h': usage(EXIT_SUCCESS); - + case 'S': startIocsh = 0; break; - + case 's': break; - + default: printf("%s: option '%s' not recognized\n", arg0, *argv); usage(EXIT_FAILURE); @@ -218,19 +218,19 @@ int main(int argc, char *argv[]) --argc; ++argv; } - + if (loadedDb) { iocInit(); epicsThreadSleep(0.2); } - + /* run user's startup script */ if (argc>0) { if (iocsh(*argv)) epicsExit(EXIT_FAILURE); epicsThreadSleep(0.2); loadedDb = 1; /* Give it the benefit of the doubt... */ } - + /* start an interactive shell if it was requested */ if (startIocsh) { iocsh(NULL); From b1dfacfa9bd6929047fd2e1c16013de69523c0f8 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 15 Apr 2020 18:09:17 +0200 Subject: [PATCH 3/3] removed empty lines at end of file --- p2pApp/chancache.h | 1 - 1 file changed, 1 deletion(-) diff --git a/p2pApp/chancache.h b/p2pApp/chancache.h index 52a25f1..39a2736 100644 --- a/p2pApp/chancache.h +++ b/p2pApp/chancache.h @@ -175,4 +175,3 @@ struct ChannelCache }; #endif // CHANCACHE_H -