Index: trunk/SRC/Utilities/createfunc.pro
===================================================================
--- trunk/SRC/Utilities/createfunc.pro	(revision 238)
+++ trunk/SRC/Utilities/createfunc.pro	(revision 239)
@@ -72,4 +72,11 @@
 ; update the list of .pro and .sav in !PATH
    path_cache, /rebuild
+; do we really use shortfilename?
+   list = find(shortfilename, /onlypro, /firstfound)
+   IF list[0] NE filename THEN BEGIN ; it is ok if filename is the first one
+     dummy = report(['Several files ' + shortfilename + ' are found in the !path and' $
+                     , list[0] + ' we be used instead of', filename, 'We stop...'], /simple)
+     stop
+   ENDIF
 ; compile it
    resolve_routine, shortfilename, /is_function
Index: trunk/SRC/Utilities/createpro.pro
===================================================================
--- trunk/SRC/Utilities/createpro.pro	(revision 238)
+++ trunk/SRC/Utilities/createpro.pro	(revision 239)
@@ -82,4 +82,11 @@
 ; update the list of .pro and .sav in !PATH
    path_cache, /rebuild
+; do we really use shortfilename?
+   list = find(shortfilename, /onlypro, /firstfound)
+   IF list[0] NE filename THEN BEGIN ; it is ok if filename is the first one
+     dummy = report(['Several files ' + shortfilename + ' are found in the !path and' $
+                     , list[0] + ' we be used instead of', filename, 'We stop...'], /simple)
+     stop
+   ENDIF
 ; compile it
    resolve_routine, shortfilename
Index: trunk/SRC/Utilities/def_myuniquetmpdir.pro
===================================================================
--- trunk/SRC/Utilities/def_myuniquetmpdir.pro	(revision 238)
+++ trunk/SRC/Utilities/def_myuniquetmpdir.pro	(revision 239)
@@ -39,5 +39,5 @@
     file_mkdir, myuniquetmpdir
 ; add it to !path
-    !path = !path+ ':' + expand_path(myuniquetmpdir)
+    !path = myuniquetmpdir + path_sep(/search_path) + !path
   ENDIF
 ;
Index: trunk/SRC/Utilities/find.pro
===================================================================
--- trunk/SRC/Utilities/find.pro	(revision 238)
+++ trunk/SRC/Utilities/find.pro	(revision 239)
@@ -116,15 +116,18 @@
   compile_opt idl2, strictarrsubs
 ;
+  cd, current = current
+  current = (file_search(current, /test_directory, /mark_directory))[0]
   CASE 1 OF
     keyword_set(lookalldir):BEGIN
 @cm_general
-      dirnames = ['./', iodir, homedir, !path]
+      dirnames = [current, iodir, homedir, !path]
       tstdtadir= file_dirname(find('find', /onlypro), /mark_directory)
-      tstdtadir = (file_search(tstdtadir+'../../DATA/TestsData'))[0]
+      parent = path_sep(/parent_directory)+path_sep()
+      tstdtadir = (file_search(tstdtadir+parent+parent+'DATA/TestsData'))[0]
       IF tstdtadir NE '' THEN dirnames = [tstdtadir, dirnames]
     END
     keyword_set(iodirectory): dirnames = iodirectory
     keyword_set(repertoire): dirnames = repertoire
-    ELSE: dirnames = ['./', !path]
+    ELSE: dirnames = [current, !path]
   ENDCASE
   tmp = dirnames
Index: trunk/SRC/Utilities/mergeonline_help.pro
===================================================================
--- trunk/SRC/Utilities/mergeonline_help.pro	(revision 238)
+++ trunk/SRC/Utilities/mergeonline_help.pro	(revision 239)
@@ -154,5 +154,6 @@
   homehtml = strsed(homehtml, 'src=\"', 'src="'+homeidl)
 ; except for SAXOIDL_OnlineHelp_title.png
-  homehtml = strsed(homehtml, 'src=\".*IDL_OnlineHelp_Title\.gif\"', 'src="' + homesaxo + '../xmldoc/images/SAXOIDL_OnlineHelp_title.png"')
+  parent = path_sep(/parent_directory)+path_sep()
+  homehtml = strsed(homehtml, 'src=\".*IDL_OnlineHelp_Title\.gif\"', 'src="' + homesaxo + parent + 'xmldoc/images/SAXOIDL_OnlineHelp_title.png"')
 ;
   putfile, homesrc + 'home.html', temporary(homehtml)
@@ -160,5 +161,5 @@
 ; build homesrc + 'aboutsaxo.txt'
 ;---------------------------------------------------------------
-  about = getfile(homesaxo + '../../overview')
+  about = getfile(homesaxo + parent + parent + 'overview')
 ; remove the lines containing @
   lines = strmatch(about, '@*')
Index: trunk/SRC/Utilities/report.pro
===================================================================
--- trunk/SRC/Utilities/report.pro	(revision 238)
+++ trunk/SRC/Utilities/report.pro	(revision 239)
@@ -69,40 +69,41 @@
   res = -1                      ;
 ; we separate the text in different lines (separated by !C) if it is not already done...
-   if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim)
+  if n_elements(text) EQ 1 then text = str_sep(text, '!C', /trim)
 ; there is some widgets activated, it is easy, we call dialog_massage
-   if (widget_info(/managed))[0] NE 0 then BEGIN
-      res = dialog_message(text, dialog_parent = parent, QUESTION = question $
-                           , title = routine_name(1), DEFAULT_NO = default_no, _extra = ex)
-      if keyword_set(question) THEN res = res EQ 'Yes' ELSE res = -1
-   ENDIF ELSE BEGIN
+  if (widget_info(/managed))[0] NE 0 then BEGIN
+    res = dialog_message(text, dialog_parent = parent, QUESTION = question $
+                         , title = routine_name(1), DEFAULT_NO = default_no, _extra = ex)
+    if keyword_set(question) THEN res = res EQ 'Yes' ELSE res = -1
+  ENDIF ELSE BEGIN
 ; there is not any widget activated
 ; do we ask a question ?
-      if keyword_set(question) then BEGIN
+    if keyword_set(question) then BEGIN
 ; what i sthe answer by default ?
-         if keyword_set(default_no) then answer = 'n' ELSE answer = 'y'
-         default_answer = answer
-         if n_elements(text) GT 1 THEN $
-          for i = 0, n_elements(text)-2 do print,text[i]
-         read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer
-         answer = strlowcase(answer) ;
+      if keyword_set(default_no) then answer = 'n' ELSE answer = 'y'
+      default_answer = answer
+      if n_elements(text) GT 1 THEN $
+        for i = 0, n_elements(text)-2 do print, text[i]
+      read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')', answer
+      answer = strlowcase(answer) ;
 ; if the answer is not appropriated
-         while answer NE '' and answer NE 'y' and answer NE 'n' do begin
-            read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')' , answer
-            answer = strlowcase(answer)
-         ENDWHILE               ;
+      while answer NE '' and answer NE 'y' and answer NE 'n' do begin
+        read, text[n_elements(text)-1]+' y/n (default answer is '+default_answer+')', answer
+        answer = strlowcase(answer)
+      ENDWHILE                  ;
 ; we adjust res in function of th answer
-         case answer of
-            '':res = default_answer EQ 'y'
-            'y':res = 1
-            'n':res = 0
-         endcase
-      endif ELSE BEGIN
+      case answer of
+        '':res = default_answer EQ 'y'
+        'y':res = 1
+        'n':res = 0
+      endcase
+    ENDIF
+  ENDELSE
 ; If we do not ask any question, we just make a print
-        IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': '
-         if n_elements(text) GT 1 THEN $
-          for i = 0, n_elements(text)-2 do print, prefix+text[i]
-         print, prefix+text[n_elements(text)-1]
-      ENDELSE
-   ENDELSE
+  IF NOT keyword_set(question) THEN BEGIN
+    IF keyword_set(simple) THEN prefix = '' ELSE prefix = '% '+routine_name(1)+': '
+    if n_elements(text) GT 1 THEN $
+      for i = 0, n_elements(text)-2 do print, prefix+text[i]
+    print, prefix+text[n_elements(text)-1]
+  ENDIF
 
    return,  res
Index: trunk/SRC/Utilities/xfile.pro
===================================================================
--- trunk/SRC/Utilities/xfile.pro	(revision 238)
+++ trunk/SRC/Utilities/xfile.pro	(revision 239)
@@ -3,7 +3,7 @@
 ; @file_comments
 ; display in a widget an ASCII file.
-; It is the same thing that xdisplayfile but here, we use it
-; to display the content of a procedure or of a function,
-; even if it is not in the current directory (thanks to the path).
+; It is the same thing that <proidl>xdisplayfile<proidl> but here, we use it
+; to display the content of a procedure or of a function located in the !path
+; ".pro" suffix will be appended if needed.
 ;
 ; @categories
@@ -15,5 +15,5 @@
 ;
 ; @keyword _EXTRA
-; Used to pass keywords
+; Used to pass keywords to <proidl>xdisplayfile</proidl>
 ;
 ; @examples
@@ -34,33 +34,15 @@
   compile_opt idl2, strictarrsubs
 ;
-pfile = strlowcase(filename)
-;
-; we have to find the full name.
-;
-   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"
-   thisOS = strupcase(strmid(!version.os_family, 0, 3))
-   CASE thisOS of
-      'MAC':BEGIN & sep = ':' & pathsep = ',' & end
-      'WIN':BEGIN & sep = '\' & pathsep = ';' & end
-      ELSE: BEGIN & sep = '/' & pathsep = ':' & end
-   ENDCASE
-   cd, current = current
-   if strpos(pfile,sep) lt 0 then BEGIN
-      if rstrpos(current,sep) NE strlen(current)-1 then current = current+sep
-      multipath = str_sep(!path,pathsep)
-      if rstrpos(multipath[0],sep) NE strlen(multipath[0])-1 then multipath = multipath +sep
-      pfile = [current, multipath]+ pfile
-   ENDIF
-   i = 0
-   repeat begin
-      res = findfile(pfile[i])
-      i = i+1
-   endrep until res[0] NE '' OR i EQ n_elements(pfile)
-   if res[0] NE  '' then BEGIN
-; we open the file in a widget
-   xdisplayfile, pfile[i-1], _extra = ex
-   ENDIF ELSE ras = report(filename + ' does not exist ...')
-;
-;
+; 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))
+      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 ...')
+
    return
 end
Index: trunk/SRC/Utilities/xhelp.pro
===================================================================
--- trunk/SRC/Utilities/xhelp.pro	(revision 238)
+++ trunk/SRC/Utilities/xhelp.pro	(revision 239)
@@ -9,11 +9,9 @@
 ; @param FILENAME {in}{required}
 ; A scalar string that contains the filename of the file to display.
-; If FILENAME does not include a complete path specification, xhelp will
-; search for the file in the current working directory and then each of the
-; directories listed in !PATH environment variable.  The
-; ".pro" file suffix will be appended if it is not supplied.
+; Filename should be located in !path.
+; ".pro" suffix will be appended if needed.
 ;
 ; @keyword _EXTRA
-; Used to pass keywords
+; Used to pass keywords to <proidl>xdisplayfile</proidl>
 ;
 ; @restrictions
@@ -45,59 +43,44 @@
 
 ; Are we sure filename is a string?
-   cquoidonc = size(filename, /type)
-   if cquoidonc NE 7 then begin
-      ras = report('Input parameter must be a string and not a '+size(filename, /tname))
+   intype = size(filename, /type)
+   if intype NE 7 then begin
+      dummy = report('Input parameter must be a string and not a '+size(filename, /tname))
       return
    endif
-; We have to find the full name
-   pfile=FILENAME
-   if strpos(pfile,".pro") lt 0 then pfile=pfile+".pro"
-   thisOS = strupcase(strmid(!version.os_family, 0, 3))
-   CASE thisOS of
-      'MAC':BEGIN & sep = ':' & pathsep = ',' & end
-      'WIN':BEGIN & sep = '\' & pathsep = ';' & end
-      ELSE: BEGIN & sep = '/' & pathsep = ':' & end
-   ENDCASE
-   cd, current = current
-   if strpos(pfile,sep) lt 0 then BEGIN
-      if rstrpos(current,sep) NE strlen(current)-1 then current = current+sep
-      multipath = str_sep(!path,pathsep)
-      if rstrpos(multipath[0],sep) NE strlen(multipath[0])-1 then multipath = multipath +sep
-      pfile = [current, multipath]+ pfile
-   ENDIF
-; We test each possible name to find where the file is.
-   nfile=n_elements(pfile)
-   n = 0
-   repeat begin
-      res = findfile(pfile[n])
-      n = n+1
-   endrep until res[0] NE '' OR n EQ n_elements(pfile)
-   if res[0] NE '' then BEGIN
-      openr, unit,pfile[n-1], /get_lun ; opening of the file
-; we select the heading piece
-      a = strarr(1000)          ;Maximum # of lines
-      xsize=0
-      i = 0
-      c = ''
-      readon=0
-      while not eof(unit) do begin
-         readf,unit,c
-         if strpos(c,';-') eq 0 then readon=0
-         if readon then BEGIN
-            dum=where(byte(c) eq 9b,ntab) ; count tab characters
-            xsize=xsize > (strlen(c)+8*ntab)
-            a[i] = strmid(c,1,200)
-            i = i + 1
-         endif
-         if strpos(c,';+') eq 0 then readon=1
-      endwhile
-      if i EQ 0 then $
-         ras = report('file is badly written, no header ... Use xfile') ELSE BEGIN
-         a = a[0:i-1]
-; we wrote the a's content in a widget
-         xdisplayfile,'toto',text = a,title=pfile[n-1], _extra = ex
-      ENDELSE
-      FREE_LUN, unit         ;free the file unit.
-   ENDIF ELSE ras = report(filename + ' does not exist ...')
+; find the file and display it!
+   pfile = (find(filename, /first_found))[0]
+; read it
+   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
+       dummy = report('file '+pfile+' is badly written, no proper header found... Use xfile')
+       return
+     ENDIF
+; do we have hidden parts?
+     hide = where(stregex(fulltext, '^ *; *@hidden *$', /boolean) EQ 1)
+; buid the text to display
+     header = ''
+     sepbloc = ['', string(replicate(byte('='), 60)), '']
+     FOR i = 0, cnt1-1 DO BEGIN
+; is this part hidden ?
+       st = start[i]
+       ed = ending[i]
+       IF st NE ed +1 THEN BEGIN ; non-empty bloc
+         dummy = where(hide GT st AND hide LT ed, cnt)
+       IF cnt EQ 0 THEN header = [header, '', sepbloc, fulltext[st+1:ed-1]]
+       ENDIF
+     ENDFOR
+; remove the fisrt 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 ...')
 
    return
