Skip to content
Snippets Groups Projects
Commit 8764c997 authored by zimoch's avatar zimoch
Browse files

function (and file) renamed, usage message added

parent 122f7680
No related branches found
No related tags found
1 merge request!7Submodule merge
/* dumpRecords is a wrapper function for dbl /* listRecords is a wrapper function for dbl
it is required because of the changed syntax of dbl in R3.14. it is required because of the changed syntax of dbl in R3.14.
*/ */
...@@ -8,23 +8,32 @@ ...@@ -8,23 +8,32 @@
#ifdef BASE_VERSION #ifdef BASE_VERSION
/* This is R3.13 */ /* This is R3.13 */
long dbl(char *precordTypename, char *filename, char *fields); long dbl(char *precordTypename, char *filename, char *fields);
int dumpRecords(char* file, char* fields)
{
return dbl(0L, file, fields);
}
#else #else
/* This is R3.14 */ /* This is R3.14 */
#include <string.h> #include <string.h>
#include <dbTest.h> #include <dbTest.h>
#include <epicsStdio.h> #include <epicsStdio.h>
#endif
int dumpRecords(char* file, char* fields) int listRecords(char* file, char* fields)
{ {
#ifndef BASE_VERSION
/* This is R3.14 */
FILE* oldStdout; FILE* oldStdout;
FILE* newStdout; FILE* newStdout;
#endif
if (!file)
{
printf ("usage: listRecords \"filename\", \"field, field, ...\"\n");
return -1;
}
#ifdef BASE_VERSION
/* This is R3.13 */
return dbl(0L, file, fields);
#else
/* This is R3.14 */
newStdout = fopen(file, "w"); newStdout = fopen(file, "w");
if (!newStdout) if (!newStdout)
{ {
...@@ -38,6 +47,4 @@ int dumpRecords(char* file, char* fields) ...@@ -38,6 +47,4 @@ int dumpRecords(char* file, char* fields)
fclose(newStdout); fclose(newStdout);
epicsSetThreadStdout(oldStdout); epicsSetThreadStdout(oldStdout);
return OK; return OK;
} }
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment