Make dbl emit empty strings for non-existent fields

Bug #572589 reported by Andrew Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Fix Released
Wishlist
Kim, Kukhee

Bug Description

The iocsh command
    dbl * "RTYP PREC EGU DTYP DESC"
emits a comma-separated list of quoted field values for the listed fields, but completely ignores the fields that don't exist for a particular record type. The results are difficult to parse; fields that don't exist should at least be given an empty place-holder. They can be distinguished from empty fields by the quotes.

While working on this, also make sure that the output is properly escaped (there's a libCom function for that) so that the output for string fields that contain double-quotes can still be parsed properly.

Tags: codeathon
Andrew Johnson (anj)
Changed in epics-base:
status: Confirmed → In Progress
Andrew Johnson (anj)
Changed in epics-base:
assignee: nobody → Kim, Kukhee (khkim)
Revision history for this message
Kim, Kukhee (khkim) wrote :

=== modified file 'src/db/dbTest.c'
--- src/db/dbTest.c 2009-07-08 19:08:22 +0000
+++ src/db/dbTest.c 2010-05-25 15:03:35 +0000
@@ -155,6 +155,7 @@
                     if (!strcmp(papfields[ifield], "recordType")) {
                         pvalue = dbGetRecordTypeName(pdbentry);
                     } else {
+ printf(", ");
                         continue;
                     }
                 } else {

Andrew Johnson (anj)
Changed in epics-base:
status: In Progress → Fix Committed
Andrew Johnson (anj)
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.