FreeBSD/contrib/gcc/c-common.c
/* Return the text name of the current function, suitably prettified
   by PRETTY_P.  Return string must be freed by caller.  */
Return the text name of the current function, suitably prettified
by PRETTY_P.  Return string must be freed by caller.
Return the text name of the current function suitably prettified by PRETTY_P . Return string must be freed by caller .
const char *
fname_as_string (int pretty_p)
{
  const char *name = "top level";
  char *namep;
  int vrb = 2;
  if (!pretty_p)
    {
      name = "";
      vrb = 0;
    }
  if (current_function_decl)
    name = lang_hooks.decl_printable_name (current_function_decl, vrb);
  if (c_lex_string_translate)
    {
      int len = strlen (name) + 3; 
      cpp_string cstr = { 0, 0 }, strname;
      namep = XNEWVEC (char, len);
      snprintf (namep, len, "\"%s\"", name);
      strname.text = (unsigned char *) namep;
      strname.len = len - 1;
      if (cpp_interpret_string (parse_in, &strname, 1, &cstr, false))
	{
	  XDELETEVEC (namep);
	  return (char *) cstr.text;
	}
    }
  else
    namep = xstrdup (name);
  return namep;
}
const char * fname_as_string ( int pretty_p ) { const char * name = " " ; char * namep ; int vrb = 2 ; if ( ! pretty_p ) { name = " " ; vrb = 0 ; } if ( current_function_decl ) name = lang_hooks . decl_printable_name ( current_function_decl , vrb ) ; if ( c_lex_string_translate ) { int len = strlen ( name ) + 3 ; cpp_string cstr = { 0 , 0 } , strname ; namep = XNEWVEC ( char , len ) ; snprintf ( namep , len , " \" \" " , name ) ; strname . text = ( unsigned char * ) namep ; strname . len = len - 1 ; if ( cpp_interpret_string ( parse_in , & strname , 1 , & cstr , false ) ) { XDELETEVEC ( namep ) ; return ( char * ) cstr . text ; } } else namep = xstrdup ( name ) ; return namep ; }
Return the text name of the current function, suitably prettified
by PRETTY_P.
Return the text name of the current function suitably prettified by PRETTY_P .
/* Two for '"'s.  One for NULL.  */