rem: *is_dir = (S_ISDIR (sbuf.st_mode) ? T_YES : T_NO);
add: *is_dir = (S_ISDIR (sbuf->st_mode) ? T_YES : T_NO);
context: prompt (Dirstack_state const *ds, char const *filename,	struct rm_options const *x, enum Prompt_action mode,	Ternary *is_dir, Ternary *is_empty){  int write_protected = 0;  *is_empty = T_UNKNOWN;  *is_dir = T_UNKNOWN;  if ((!x->ignore_missing_files && (x->interactive || x->stdin_tty)       && (write_protected = (euidaccess (filename, W_OK) && errno == EACCES)))      || x->interactive)    {      struct stat sbuf;      if (lstat (filename, &sbuf))	{	  /* lstat failed.  This happens e.g., with `rm '''.  */	  error (0, errno, _("cannot lstat %s"),		 quote (full_filename (filename)));	  return RM_ERROR;	}      /* Using permissions doesn't make sense for symlinks.  */      if (S_ISLNK (sbuf.st_mode))	{	  if ( ! x->interactive)	    return RM_OK;	  write_protected = 0;	}      /* Issue the prompt.  */      {	char const *quoted_name = quote (full_filename (filename));	*is_dir = (S_ISDIR (sbuf.st_mode) ? T_YES : T_NO);	/* FIXME: use a variant of error (instead of fprintf) that doesn't	   append a newline.  Then we won't have to declare program_name in	   this file.  */	if (S_ISDIR (sbuf.st_mode)	    && x->recursive	    && mode == PA_DESCEND_INTO_DIR	    && ((*is_empty = (is_empty_dir (filename) ? T_YES : T_NO))		== T_NO))	  fprintf (stderr,		   (write_protected		    ? _("%s: descend into write-protected directory %s? ")		    : _("%s: descend into directory %s? ")),		   program_name, quoted_name);	else	  {	    /* TRANSLATORS: You may find it more convenient to translate	       the equivalent of _("%s: remove %s (write-protected) %s? ").	       It should avoid grammatical problems with the output	       of file_type.  */	    fprintf (stderr,		     (write_protected		      ? _("%s: remove write-protected %s %s? ")		      : _("%s: remove %s %s? ")),		     program_name, file_type (&sbuf), quoted_name);	  }	if (!yesno ())	  return RM_USER_DECLINED;      }    }  return RM_OK;}