Changeset 12697


Ignore:
Timestamp:
09/07/06 11:03:38 (14 years ago)
Author:
mdewsnip
Message:

Changed IsisGdl to ignore logically deleted records, unless the new "-include_logically_deleted_records" argument is given.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/packages/isis-gdl/IsisGdl.cpp

    r6127 r12697  
    5454{
    5555
    56     if (argc < 2)
     56    if (argc < 2 || argc > 3)
    5757    {
    58         std::cout << "usage: IsisGdl master_file_full_name" << std::endl;
     58        std::cout << "usage: IsisGdl [-include_logically_deleted_records] master_file_full_name" << std::endl;
    5959        return 1;
    6060    }
     
    6666        // and should be the master file name with extension ".mst"
    6767        // "C:\IsisGdl\cds.mst" for ex
    68         db.OpenDb(argv[1]);
     68        db.OpenDb(argv[argc - 1]);
    6969    }
    7070    catch(CIsisDbException e)
    7171    {
    7272        std::string msg = "Cannot open isis db: ";
    73         msg += argv[1];
     73        msg += argv[argc - 1];
    7474        msg += isisExceptionMessage((IsisError) e.m_iError);
    7575        std::cerr<< msg << std::endl;
     
    9494        int status = db.ReadDbRecord(i, mfr);
    9595
    96         if (status == Active || status == LogicalyDeleted)
     96        if (status == Active || (strcmp(argv[1], "-include_logically_deleted_records") == 0 && status == LogicalyDeleted))
    9797        {
    9898            // If the record is physically on the master file
Note: See TracChangeset for help on using the changeset viewer.