/[ascend]/trunk/base/generic/compiler/module.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/module.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 691 by johnpye, Wed Jun 14 09:58:42 2006 UTC revision 692 by johnpye, Thu Jun 22 02:45:47 2006 UTC
# Line 275  extern struct module_t *Asc_RequireModul Line 275  extern struct module_t *Asc_RequireModul
275      `do_not_overwrite' flag tells if we were called from      `do_not_overwrite' flag tells if we were called from
276      Asc_OpenModule() (==FALSE) or Asc_RequireModule() (==TRUE).      Asc_OpenModule() (==FALSE) or Asc_RequireModule() (==TRUE).
277    
278      @param name filanem of the module to find      @param name filename of the module to find
279      @param status status to return to caller      @param status status to return to caller
280      @param do_not_overwrite Should we keep existing modules?      @param do_not_overwrite Should we keep existing modules?
281      @param str String we keep and parse if not NULL.      @param keep_string String we keep and parse if not NULL.
282    
283      When str is NULL:      When str is NULL:
284          This function calls FindModuleFile() to find the module named `name'.          This function calls FindModuleFile() to find the module named `name'.
# Line 902  int module_searchpath_test(struct FilePa Line 902  int module_searchpath_test(struct FilePa
902    
903      fp1 = ospath_concat(path,sd->fp);      fp1 = ospath_concat(path,sd->fp);
904    
905        tmp  = ospath_str(sd->fp);
906        /* CONSOLE_DEBUG("Checking for path '%s'...",tmp); */
907        ospath_free_str(tmp);
908    
909      if(ospath_stat(fp1,&sd->buf)){      if(ospath_stat(fp1,&sd->buf)){
910          sd->error = errno;          sd->error = errno;
911          /* CONSOLE_DEBUG("Stat failed");*/          /* CONSOLE_DEBUG("Stat failed");*/
# Line 991  int ModuleSearchPath(CONST char *name, Line 995  int ModuleSearchPath(CONST char *name,
995    
996      }else{      }else{
997    
998            /* CONSOLE_DEBUG("ENV var name is '%s'",PATHENVIRONMENTVAR); */
999    
1000          tmp = Asc_GetEnv(PATHENVIRONMENTVAR);          tmp = Asc_GetEnv(PATHENVIRONMENTVAR);
1001          if(tmp==NULL){          if(tmp==NULL){
1002              ERROR_REPORTER_HERE(ASC_PROG_ERROR,"No paths to search (is env var '%s' set?)",PATHENVIRONMENTVAR);              ERROR_REPORTER_HERE(ASC_PROG_ERROR,"No paths to search (is env var '%s' set?)",PATHENVIRONMENTVAR);
1003              return 1;              return 1;
1004          }          }
1005    
1006          /* CONSOLE_DEBUG("ENV var is '%s'",tmp); */          /*  CONSOLE_DEBUG("ENV var value is '%s'",tmp); */
1007    
1008          sp1 = ospath_searchpath_new(tmp);          sp1 = ospath_searchpath_new(tmp);
1009          if(sp1==NULL){          if(sp1==NULL){
# Line 1017  int ModuleSearchPath(CONST char *name, Line 1023  int ModuleSearchPath(CONST char *name,
1023          if(fp2==NULL){          if(fp2==NULL){
1024              *error = sd.error;              *error = sd.error;
1025              ospath_searchpath_free(sp1);                      ospath_searchpath_free(sp1);        
1026                CONSOLE_DEBUG("File '%s' not found in search path",name);      
1027              return -1;              return -1;
1028          }          }
1029    

Legend:
Removed from v.691  
changed lines
  Added in v.692

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22