Index: trunk/SRC/Utilities/report.pro
===================================================================
--- trunk/SRC/Utilities/report.pro	(revision 262)
+++ trunk/SRC/Utilities/report.pro	(revision 266)
@@ -4,10 +4,9 @@
 ; Like <proidl>DIALOG_MESSAGE</proidl> if there is already some widget
 ; active or like <proidl>MESSAGE</proidl> if there is not any widget active.
-; To ask a question whose answer is not yes/no, use xquestion.
+; To ask a question whose answer is not yes/no, use <pro>xquestion</pro>.
 ;
 ; @param TEXT {in}{required} {type=scalar string or arrays of string}
-; If TEXT is a scalar string, we look for the line feed characters "!C"
-; comporte qu''un element, on cherche les eventuels caracteres de
-; retour a la ligne: '!C'. If text is set to an array of strings, each
+; If TEXT is a scalar string, we look for the line feed character "!C".
+; If TEXT is set to an array of strings, each
 ; array element is displayed as a separate line of text.
 ;
@@ -78,5 +77,5 @@
 ; do we ask a question ?
     if keyword_set(question) then BEGIN
-; what i sthe answer by default ?
+; what is the answer by default ?
       if keyword_set(default_no) then answer = 'n' ELSE answer = 'y'
       default_answer = answer
@@ -90,5 +89,5 @@
         answer = strlowcase(answer)
       ENDWHILE                  ;
-; we adjust res in function of th answer
+; we adjust res in function of the answer
       case answer of
         '':res = default_answer EQ 'y'
Index: trunk/SRC/Utilities/xfile.pro
===================================================================
--- trunk/SRC/Utilities/xfile.pro	(revision 262)
+++ trunk/SRC/Utilities/xfile.pro	(revision 266)
@@ -8,12 +8,17 @@
 ;
 ; @categories
-; Utilities
+; Utilities Widget
 ;
-; @param FILENAME {in}{required}
+; @param FILENAME {in}{required} {type=scalar string}
 ; It is the name of the procedure or of the function
 ; we want to display (with or without .pro at the end).
+; FILENAME should be located in !path.
+; ".pro" suffix will be appended if needed.
 ;
 ; @keyword _EXTRA
 ; Used to pass keywords to <proidl>XDISPLAYFILE</proidl>
+;
+; @restrictions
+; Triggers the <proidl>XMANAGER</proidl> if it is not already in use.
 ;
 ; @examples
@@ -34,15 +39,38 @@
   compile_opt idl2, strictarrsubs
 ;
+  usage="xfile, filename, _EXTRA = ex"
+;
+; check parameters
+  check_param = N_PARAMS()
+  if (check_param EQ 0) then begin
+     dummy = report(['No input parameter', $
+                     'Usage : ' + usage])
+     return
+  endif
+;
+; check arguments
+  if arg_present(filename) then begin
+     dummy = report(['No input parameter filename', $
+                     'Usage : ' + usage])
+     return
+  endif
+;
 ; Are we sure filename is a string?
    intype = size(filename, /type)
    if intype NE 7 then begin
-      dummy = report('Input parameter must be a string and not a '+size(filename, /tname))
+      dummy = report(['Input parameter filename type : ' + size(filename,/TNAME) , $
+                      'Input parameter filename must be a string'])
       return
    endif
+;
 ; find the file and display it!
    pfile = find(filename, /first_found)
-   IF pfile NE 'NOT_FOUND' THEN xdisplayfile, pfile[0], _extra = ex $
-   ELSE dummy = report(filename + ' does not exist ...')
-
+   if (pfile NE 'NOT FOUND') then begin
+     xdisplayfile, pfile[0], _EXTRA = ex
+   endif else begin
+     dummy = report(['Input parameter filename : ' + filename, $
+                     filename + ' does not exist ...'])
+   endelse
+;
    return
 end
Index: trunk/SRC/Utilities/xhelp.pro
===================================================================
--- trunk/SRC/Utilities/xhelp.pro	(revision 262)
+++ trunk/SRC/Utilities/xhelp.pro	(revision 266)
@@ -5,8 +5,9 @@
 ;
 ; @categories
-; Widget
+; Utilities Widget
 ;
 ; @param FILENAME {in}{required} {type=scalar string}
-; the name of the file to display.
+; It is the name of the procedure or of the function
+; we want to display (with or without .pro at the end).
 ; FILENAME should be located in !path.
 ; ".pro" suffix will be appended if needed.
@@ -41,20 +42,38 @@
   compile_opt idl2, strictarrsubs
 ;
-
+  usage="xhelp, filename, _EXTRA = ex"
+;
+; check parameters
+  check_param = N_PARAMS()
+  if (check_param EQ 0) then begin
+     dummy = report(['No input parameter', $
+                     'Usage : ' + usage])
+     return
+  endif
+;
+; check arguments
+  if arg_present(filename) then begin
+     dummy = report(['No input parameter filename', $
+                     'Usage : ' + usage])
+     return
+  endif
+;
 ; Are we sure filename is a string?
    intype = size(filename, /type)
    if intype NE 7 then begin
-      dummy = report('Input parameter must be a string and not a '+size(filename, /tname))
+      dummy = report(['Input parameter filename type : ' + size(filename,/TNAME) , $
+                      'Input parameter filename must be a string'])
       return
    endif
+;
 ; find the file and display it!
    pfile = (find(filename, /first_found))[0]
 ; read it
-   IF pfile NE 'NOT_FOUND' THEN BEGIN 
+   IF (pfile NE 'NOT FOUND') THEN BEGIN
      fulltext = getfile(pfile)
 ; find the ";+"and ";-"
      start = where(stregex(fulltext,'^ *;\+ *$', /boolean) EQ 1, cnt1)
      ending = where(stregex(fulltext,'^ *;- *$', /boolean) EQ 1, cnt2)
-     IF cnt1 EQ 0 OR cnt1 NE cnt2 THEN BEGIN
+     IF ((cnt1 EQ 0) OR (cnt1 NE cnt2)) THEN BEGIN
        dummy = report('file '+pfile+' is badly written, no proper header found... Use xfile')
        return
@@ -74,15 +93,17 @@
        ENDIF
      ENDFOR
-; remove the fisrt useless lines
-     IF n_elements(header) GT 1 THEN header = header[4:*] ELSE BEGIN 
+; remove the first useless lines
+     IF n_elements(header) GT 1 THEN header = header[4:*] ELSE BEGIN
        dummy = report('file '+pfile+' has empty header... Use xfile')
        return
      ENDELSE
-;     
+;
      xdisplayfile, 'dummy', text = header[1:*], title = pfile, _extra = ex
 ;
-   ENDIF ELSE dummy = report(filename + ' does not exist ...')
-
+   endif else begin
+     dummy = report(['Input parameter filename : ' + filename, $
+                     filename + ' does not exist ...'])
+   endelse
+;
    return
 end
-
