diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index d05102908..8e019989d 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -13,6 +13,10 @@ +

Added -b option to dbExpand

+ +

This turns off monotonic checking of breakpoint tables.

+

Launchpad Bugs Resolved

The following are links to bugs in the Launchpad bug tracker that have been diff --git a/src/dbStatic/dbExpand.c b/src/dbStatic/dbExpand.c index 80c95cabd..8071c1d7f 100644 --- a/src/dbStatic/dbExpand.c +++ b/src/dbStatic/dbExpand.c @@ -1,14 +1,13 @@ /*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne +* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbExpand.c */ -/* Author: Marty Kraimer Date: 30NOV95 */ +/* Author: Marty Kraimer Date: 30NOV95 */ #include #include @@ -24,25 +23,28 @@ #include "gpHash.h" #include "osiFileName.h" +epicsShareExtern int dbBptNotMonotonic; /* from dbLexRoutines.c */ + DBBASE *pdbbase = NULL; - + void usage(void) { - fprintf(stderr, "Usage:\n\tdbExpand -Ipath -ooutfile " - "-S macro=value file1.dbd file2.dbd ...\n"); + fprintf(stderr, "Usage:\n\tdbExpand -b -Ipath -ooutfile " + "-S macro=value file1.dbd file2.dbd ...\n"); fprintf(stderr,"Specifying any path will replace the default of '.'\n"); + fprintf(stderr,"The -b option enables relaxed breakpoint table checking\n"); } int main(int argc,char **argv) { - char *path = NULL; - char *sub = NULL; - int pathLength = 0; - int subLength = 0; + char *path = NULL; + char *sub = NULL; + int pathLength = 0; + int subLength = 0; char *outFilename = NULL; FILE *outFP = stdout; - long status; - long returnStatus = 0; + long status; + long returnStatus = 0; static char *pathSep = OSI_PATH_LIST_SEPARATOR; static char *subSep = ","; @@ -53,8 +55,8 @@ int main(int argc,char **argv) while ((argc > 1) && (**argv == '-')) { char optLtr = (*argv)[1]; char *optArg; - - if (strlen(*argv) > 2) { + + if (strlen(*argv) > 2 || optLtr == 'b') { optArg = *argv+2; ++argv; --argc; @@ -63,36 +65,40 @@ int main(int argc,char **argv) argv += 2; argc -= 2; } - + switch (optLtr) { case 'o': outFilename = optArg; break; - + case 'I': dbCatString(&path, &pathLength, optArg, pathSep); break; - + case 'S': dbCatString(&sub, &subLength, optArg, subSep); break; - + + case 'b': + dbBptNotMonotonic = 1; + break; + default: fprintf(stderr, "dbExpand: Unknown option '-%c'\n", optLtr); usage(); exit(1); } } - + if (argc < 1) { - fprintf(stderr, "dbExpand: No input file specified\n"); + fprintf(stderr, "dbExpand: No input file specified\n"); usage(); - exit(1); + exit(1); } - + for (; argc>0; --argc, ++argv) { - status = dbReadDatabase(&pdbbase,*argv,path,sub); - if (status) returnStatus = status; + status = dbReadDatabase(&pdbbase,*argv,path,sub); + if (status) returnStatus = status; } if (returnStatus) { errlogFlush(); @@ -106,7 +112,7 @@ int main(int argc,char **argv) exit(1); } } - + dbWriteMenuFP(pdbbase,outFP,0); dbWriteRecordTypeFP(pdbbase,outFP,0); dbWriteDeviceFP(pdbbase,outFP); @@ -116,7 +122,7 @@ int main(int argc,char **argv) dbWriteVariableFP(pdbbase,outFP); dbWriteBreaktableFP(pdbbase,outFP); dbWriteRecordFP(pdbbase,outFP,0,0); - + free((void *)path); free((void *)sub); return 0;