import re


def find_type_declaration_insertion_point(lines,subr_lines):
   """
   Find the point in the subroutine where the array declarations for the
   subroutine calls can be inserted.
   """
   (lineno_start,lineno_end) = subr_lines
   pattern = re.compile("#include \"nwxc_param.fh\"")
   line_insert = -1
   line = lineno_start
   while line <= lineno_end:
      if pattern.match(lines[line]):
         line_insert = line
         break
      line += 1
   return line_insert