Subversion Repositories svn1

Rev

Rev 297 | Rev 320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 297 Rev 315
Line 17... Line 17...
17
**  Local definitions
17
**  Local definitions
18
*/
18
*/
19
char        datfile[20];                         /* Name of the data file */
19
char        datfile[20];                         /* Name of the data file */
20
char        filebase[20];                        /* Event file name base */
20
char        filebase[20];                        /* Event file name base */
21
char        filepath[300];
21
char        filepath[300];
22
char        addendumFilepath[300];
-
 
23
 
22
 
24
 
23
 
25
void QmConfig::load(const QString &cnfFile)
24
void QmConfig::load(const QString &cnfFile)
26
{
25
{
27
#ifdef DISPLAY_STRUCTURES
26
#ifdef DISPLAY_STRUCTURES
Line 307... Line 306...
307
 
306
 
308
/*----------------------------------------------------------------------------
307
/*----------------------------------------------------------------------------
309
** FUNCTION           : getAddendemFile
308
** FUNCTION           : getAddendemFile
310
**
309
**
311
** DESCRIPTION        : Returns the full path the the addemdum file
310
** DESCRIPTION        : Returns the full path the the addemdum file
312
**                      The functionwill lookfor the file in a number of
311
**                      The function will look for the file in a number of
313
**                      locations
312
**                      locations
314
**
313
**
315
**
314
**
316
** INPUTS             : name    - Name of the addenum file
315
** INPUTS             : name    - Name of the addenum file
317
**                      create  - True. Allow file to be created
316
**                      create  - True. Allow file to be created
Line 321... Line 320...
321
**                                location will be returned.
320
**                                location will be returned.
322
**
321
**
323
----------------------------------------------------------------------------*/
322
----------------------------------------------------------------------------*/
324
 
323
 
325
 
324
 
326
const char *QmConfig::getAddendemFile(const QString &name, bool create )
325
const QString QmConfig::getAddendemFile(const QString &name, bool create )
327
{
326
{
328
    if (name.isEmpty())
327
    if (name.isEmpty())
329
        return NULL;
328
        return NULL;
330
 
329
 
331
    QFile file;
330
    QFile file;
Line 361... Line 360...
361
                     return NULL;
360
                     return NULL;
362
                 }
361
                 }
363
             }
362
             }
364
        }
363
        }
365
    }
364
    }
366
    strncpy(addendumFilepath, qPrintable(addendumFileName), sizeof(addendumFilepath));
-
 
367
    return addendumFilepath;
365
    return addendumFileName;
368
}
366
}
369
 
367
 
370
 
-
 
371
/*========================================================================
368
/*========================================================================
372
 *
369
 *
373
 *  Write out the configuration file
370
 *  Write out the configuration file
374
 *
371
 *
375
 *  Purpose:
372
 *  Purpose: