Changeset 317
- Timestamp:
- 12/03/07 15:20:41 (17 years ago)
- Location:
- trunk/SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ForOldVersion/keep_compatibility.pro
r281 r317 2 2 ; 3 3 ; @file_comments 4 ; For internal use of SAXO 4 5 ; 1) define key_forgetold = 1b - keyword_set(flag) 5 6 ; 2) remove all oldcm_used.pro found in !path 6 7 ; 3) define and create myuniquetmpdir and add it to !path 7 8 ; 4) copy oldcm_full(_empty) to myuniquetmpdir+'oldcm_used.pro' 9 ; 5) make sure that the common variables are correctly initialized. 10 ; 6) merge the online_help if possible... 8 11 ; 9 12 ; @categories … … 16 19 ; cm_general 17 20 ; 18 ; @restrictions19 ; copy oldcm_full or oldcm_empty must be found in the !path.20 ; dir must also be in the !path21 ;22 21 ; @examples 23 ; IDL> keep_compatibility,022 ; keep_compatibility, 0 24 23 ; 25 24 ; @history … … 37 36 ; 38 37 @cm_general 38 ; 39 IF n_elements(myuniquetmpdir) NE 0 THEN return 39 40 ; 40 41 ; version should be at least 6.0 … … 54 55 ; are we using gdl or idl?? 55 56 defsysv, '!gdl', exist = key_gdl 56 ;57 IF n_elements(myuniquetmpdir) NE 0 THEN BEGIN58 !path = myuniquetmpdir + path_sep(/search_path) + !path59 return60 ENDIF61 57 ; 62 58 if n_elements(flag) eq 0 then flag = 1b - keyword_set(key_forgetold) … … 96 92 ENDIF 97 93 ; 98 ; make sure that the common variables are correctly initialized.94 ; 5) make sure that the common variables are correctly initialized. 99 95 ; 100 96 IF size(ccmeshparameters, /type) NE 8 THEN BEGIN … … 109 105 ENDIF 110 106 ; 111 ; merge the online_help if possible...107 ; 6) merge the online_help if possible... 112 108 ; 113 109 mergeonline_help -
trunk/SRC/Utilities/def_myuniquetmpdir.pro
r311 r317 40 40 ; add it to !path 41 41 !path = myuniquetmpdir + path_sep(/search_path) + !path 42 ; check that each element of !path is unique 43 splpath = strsplit(!path, path_sep(/search_path), /extract, count = ndir) 44 nouniq = different(lindgen(ndir), uniq(splpath, sort(splpath))) 45 IF nouniq[0] NE -1 THEN BEGIN 46 allpro = find('*.pro', iodirectory = !path, /onlypro) 47 nall = n_elements(allpro) 48 allpro = strmid(allpro, reform(strpos(allpro, '/', /reverse_search), 1, nall)+1) 49 nouniqpro = different(lindgen(nall), uniq(allpro, sort(allpro))) 50 IF nouniqpro[0] NE -1 THEN BEGIN 51 nouniqcnt = n_elements(nouniq) 52 nouniqprocnt = n_elements(nouniqpro) 53 text = ['', ' --- WARNING ---' $ 54 , 'Your !path contains '+strtrim(nouniqcnt, 1)+' duplicate elements' $ 55 , 'This can create bugs for files with the same name located in several directories ('+strtrim(nouniqprocnt, 1)+' found)'] 56 dummy = report(text) 57 text = ['', 'duplicate directories in the path:', splpath[nouniq[0:9 <(nouniqcnt-1)]]] 58 IF nouniqcnt GT 10 THEN text = [text, '...'] 59 dummy = report(text, /simple) 60 text = ['', 'files with the same name:', allpro[nouniqpro[0:9 <(nouniqprocnt-1)]]] 61 IF nouniqprocnt GT 10 THEN text = [text, '...', ''] 62 dummy = report(text, /simple) 63 ENDIF 64 ENDIF 42 65 ENDIF 43 66 ;
Note: See TracChangeset
for help on using the changeset viewer.