    if (EXTERN_ED_BUFFER)
        errorf("Tried to start an ed session, when already active.\n");

    /* Check for read on startup, since the buffer is read in. But don't
     * check for write, since we may want to change the file name.
     */
    new_path = check_valid_path(file_arg, command_giver, "ed_start", MY_FALSE);
    if (!file_arg && !new_path)
        return;

.....

    if (new_path)
    {
        xstrncpy(P_FNAME, new_path, MAXFNAME);
        P_FNAME[MAXFNAME] = 0;
        add_message("/%s, %d lines\n", new_path, P_LASTLN);
    }
    else
    {
        add_message("No file.\n");
    }
