FUNCTION getDICalConfig

;;-----------------------------------------------------------------------------
;; PURPOSE:
;;	Gets the configuration for the program from the file 'dical.config'. If
;;	The file does not exist, creates a default configuration.
;;
;; CALLING SEQUENCE:
;;	RESULT = getDICalConfig()
;;
;; REQUIRED INPUTS:
;;	none
;;
;; OUTPUTS:
;;	RETURN - A structure defining the configuration. The tags are:
;;		calibDir - local directory which is the root of the calibration
;;			files.
;;		sqlServers - array of sqlServer structures specifying the
;;			SQL servers to try and connect to.
;;		
;;
;; OPTIONAL INPUT KEYWORDS:
;;
;; EXAMPLE:
;;      IDL> config = getDICalConfig()
;;
;; PROCEDURES USED (i.e. called directly!):
;;
;; MODIFICATION HISTORY:
;;   	2004-08-13  M. Desnoyer - Created
;;
;;-----------------------------------------------------------------------------

fn = 'dical.config'

;; See if the configuration file exists
IF FILE_TEST(fn, /READ) THEN BEGIN
	RESTORE, fn
	RETURN, config
ENDIF

;; It didn't exist so create the default
RETURN, {calibDir:'', sqlServers:ptr_new()}

END