converting from Grass 3 to 4.0

I have been programming in GRASS for some months now and have finally started converting a project to 4.0. Things went as expected, changing "Dvect" to "d.vect" in system calls and the changes in front end stuff like the Gmakefile. Now I have gotten the code to compile cleanly and the program rolls along until I get to a short section of code:

  Derase(D_translate_color("black"));
  sprintf(name,"%s.pr",border[found].name);
  setmap = G_find_cell(name,"");

I get a segmentation core fault and then we are back at the grass prompt. The end. Does anyone have any experiance that might help here? I have looked at the 4.0 changes manual but it doesn't seem to address this issue. Thanks in advance.

          We're all in this together,
          Phil