OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [fortran/] [scanner.c] - Diff between revs 285 and 378

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 285 Rev 378
Line 388... Line 388...
  gfc_free (gfc_option.module_dir);
  gfc_free (gfc_option.module_dir);
}
}
 
 
 
 
static FILE *
static FILE *
open_included_file (const char *name, gfc_directorylist *list, bool module)
open_included_file (const char *name, gfc_directorylist *list,
 
                    bool module, bool system)
{
{
  char *fullname;
  char *fullname;
  gfc_directorylist *p;
  gfc_directorylist *p;
  FILE *f;
  FILE *f;
 
 
Line 405... Line 406...
      strcpy (fullname, p->path);
      strcpy (fullname, p->path);
      strcat (fullname, name);
      strcat (fullname, name);
 
 
      f = gfc_open_file (fullname);
      f = gfc_open_file (fullname);
      if (f != NULL)
      if (f != NULL)
 
        {
 
          if (gfc_cpp_makedep ())
 
            gfc_cpp_add_dep (fullname, system);
 
 
        return f;
        return f;
    }
    }
 
    }
 
 
  return NULL;
  return NULL;
}
}
 
 
 
 
Line 419... Line 425...
   to open the file in the current directory first.  */
   to open the file in the current directory first.  */
 
 
FILE *
FILE *
gfc_open_included_file (const char *name, bool include_cwd, bool module)
gfc_open_included_file (const char *name, bool include_cwd, bool module)
{
{
  FILE *f;
  FILE *f = NULL;
 
 
  if (IS_ABSOLUTE_PATH (name))
  if (IS_ABSOLUTE_PATH (name) || include_cwd)
    return gfc_open_file (name);
 
 
 
  if (include_cwd)
 
    {
    {
      f = gfc_open_file (name);
      f = gfc_open_file (name);
      if (f != NULL)
      if (f && gfc_cpp_makedep ())
        return f;
        gfc_cpp_add_dep (name, false);
    }
    }
 
 
  return open_included_file (name, include_dirs, module);
  if (!f)
 
    f = open_included_file (name, include_dirs, module, false);
 
 
 
  return f;
}
}
 
 
FILE *
FILE *
gfc_open_intrinsic_module (const char *name)
gfc_open_intrinsic_module (const char *name)
{
{
 
  FILE *f = NULL;
 
 
  if (IS_ABSOLUTE_PATH (name))
  if (IS_ABSOLUTE_PATH (name))
    return gfc_open_file (name);
    {
 
      f = gfc_open_file (name);
 
      if (f && gfc_cpp_makedep ())
 
        gfc_cpp_add_dep (name, true);
 
    }
 
 
  return open_included_file (name, intrinsic_modules_dirs, true);
  if (!f)
 
    f = open_included_file (name, intrinsic_modules_dirs, true, true);
 
 
 
  return f;
}
}
 
 
 
 
/* Test to see if we're at the end of the main source file.  */
/* Test to see if we're at the end of the main source file.  */
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.