rem: recursive = 1;
add: recursive = true;
context: decode_switches (int argc, char **argv){  int c;  char *time_style_option = 0;  /* Record whether there is an option specifying sort type.  */  int sort_type_specified = 0;  qmark_funny_chars = QMARK_FUNNY_CHARS_TTY;  /* initialize all switches to default settings */  switch (ls_mode)    {    case LS_MULTI_COL:      /* This is for the `dir' program.  */      format = many_per_line;      set_quoting_style (NULL, escape_quoting_style);      break;    case LS_LONG_FORMAT:      /* This is for the `vdir' program.  */      format = long_format;      set_quoting_style (NULL, escape_quoting_style);      break;    case LS_LS:      /* This is for the `ls' program.  */      if (isatty (STDOUT_FILENO))	{	  format = many_per_line;	  /* See description of qmark_funny_chars, above.  */	  qmark_funny_chars = 1;	}      else	{	  format = one_per_line;	  qmark_funny_chars = 0;	}      break;    default:      abort ();    }  time_type = time_mtime;  sort_type = sort_name;  sort_reverse = 0;  numeric_ids = 0;  print_block_size = 0;  indicator_style = none;  print_inode = 0;  dereference = DEREF_UNDEFINED;  recursive = 0;  immediate_dirs = 0;  all_files = 0;  really_all_files = 0;  ignore_patterns = 0;  /* FIXME: put this in a function.  */  {    char const *q_style = getenv ("QUOTING_STYLE");    if (q_style)      {	int i = ARGMATCH (q_style, quoting_style_args, quoting_style_vals);	if (0 <= i)	  set_quoting_style (NULL, quoting_style_vals[i]);	else	  error (0, 0,	 _("ignoring invalid value of environment variable QUOTING_STYLE: %s"),		 quotearg (q_style));      }  }  {    char const *ls_block_size = getenv ("LS_BLOCK_SIZE");    human_output_opts = human_options (ls_block_size, false,				       &output_block_size);    if (ls_block_size || getenv ("BLOCK_SIZE"))      file_output_block_size = output_block_size;  }  line_length = 80;  {    char const *p = getenv ("COLUMNS");    if (p && *p)      {	long int tmp_long;	if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK	    && 0 < tmp_long && tmp_long <= INT_MAX)	  {	    line_length = (int) tmp_long;	  }	else	  {	    error (0, 0,	       _("ignoring invalid width in environment variable COLUMNS: %s"),		   quotearg (p));	  }      }  }#ifdef TIOCGWINSZ  {    struct winsize ws;    if (ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0)      line_length = ws.ws_col;  }#endif  /* Using the TABSIZE environment variable is not POSIX-approved.     Ignore it when POSIXLY_CORRECT is set.  */  {    char const *p;    tabsize = 8;    if (!getenv ("POSIXLY_CORRECT") && (p = getenv ("TABSIZE")))      {	long int tmp_long;	if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK	    && 0 <= tmp_long && tmp_long <= INT_MAX)	  {	    tabsize = (int) tmp_long;	  }	else	  {	    error (0, 0,	     _("ignoring invalid tab size in environment variable TABSIZE: %s"),		   quotearg (p));	  }      }  }  while ((c = getopt_long (argc, argv,			   "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",			   long_options, NULL)) != -1)    {      switch (c)	{	case 0:	  break;	case 'a':	  all_files = 1;	  really_all_files = 1;	  break;	case 'b':	  set_quoting_style (NULL, escape_quoting_style);	  break;	case 'c':	  time_type = time_ctime;	  break;	case 'd':	  immediate_dirs = 1;	  break;	case 'f':	  /* Same as enabling -a -U and disabling -l -s.  */	  all_files = 1;	  really_all_files = 1;	  sort_type = sort_none;	  sort_type_specified = 1;	  /* disable -l */	  if (format == long_format)	    format = (isatty (STDOUT_FILENO) ? many_per_line : one_per_line);	  print_block_size = 0;	/* disable -s */	  print_with_color = 0;	/* disable --color */	  break;	case 'g':	  format = long_format;	  print_owner = 0;	  break;	case 'h':	  human_output_opts = human_autoscale | human_SI | human_base_1024;	  file_output_block_size = output_block_size = 1;	  break;	case 'i':	  print_inode = 1;	  break;	case 'k':	  human_output_opts = 0;	  file_output_block_size = output_block_size = 1024;	  break;	case 'l':	  format = long_format;	  break;	case 'm':	  format = with_commas;	  break;	case 'n':	  numeric_ids = 1;	  format = long_format;	  break;	case 'o':  /* Just like -l, but don't display group info.  */	  format = long_format;	  print_group = 0;	  break;	case 'p':	  indicator_style = file_type;	  break;	case 'q':	  qmark_funny_chars = 1;	  break;	case 'r':	  sort_reverse = 1;	  break;	case 's':	  print_block_size = 1;	  break;	case 't':	  sort_type = sort_time;	  sort_type_specified = 1;	  break;	case 'u':	  time_type = time_atime;	  break;	case 'v':	  sort_type = sort_version;	  sort_type_specified = 1;	  break;	case 'w':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK		|| tmp_long <= 0 || tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0, _("invalid line width: %s"),		     quotearg (optarg));	    line_length = (int) tmp_long;	    break;	  }	case 'x':	  format = horizontal;	  break;	case 'A':	  really_all_files = 0;	  all_files = 1;	  break;	case 'B':	  add_ignore_pattern ("*~");	  add_ignore_pattern (".*~");	  break;	case 'C':	  format = many_per_line;	  break;	case 'D':	  dired = 1;	  break;	case 'F':	  indicator_style = classify;	  break;	case 'G':		/* inhibit display of group info */	  print_group = 0;	  break;	case 'H':	  dereference = DEREF_COMMAND_LINE_ARGUMENTS;	  break;	case DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION:	  dereference = DEREF_COMMAND_LINE_SYMLINK_TO_DIR;	  break;	case 'I':	  add_ignore_pattern (optarg);	  break;	case 'L':	  dereference = DEREF_ALWAYS;	  break;	case 'N':	  set_quoting_style (NULL, literal_quoting_style);	  break;	case 'Q':	  set_quoting_style (NULL, c_quoting_style);	  break;	case 'R':	  recursive = 1;	  break;	case 'S':	  sort_type = sort_size;	  sort_type_specified = 1;	  break;	case 'T':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 0, &tmp_long, NULL) != LONGINT_OK		|| tmp_long < 0 || tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0, _("invalid tab size: %s"),		     quotearg (optarg));	    tabsize = (int) tmp_long;	    break;	  }	case 'U':	  sort_type = sort_none;	  sort_type_specified = 1;	  break;	case 'X':	  sort_type = sort_extension;	  sort_type_specified = 1;	  break;	case '1':	  /* -1 has no effect after -l.  */	  if (format != long_format)	    format = one_per_line;	  break;        case AUTHOR_OPTION:          print_author = true;          break;	case SORT_OPTION:	  sort_type = XARGMATCH ("--sort", optarg, sort_args, sort_types);	  sort_type_specified = 1;	  break;	case TIME_OPTION:	  time_type = XARGMATCH ("--time", optarg, time_args, time_types);	  break;	case FORMAT_OPTION:	  format = XARGMATCH ("--format", optarg, format_args, format_types);	  break;	case FULL_TIME_OPTION:	  format = long_format;	  time_style_option = "full-iso";	  break;	case COLOR_OPTION:	  {	    int i;	    if (optarg)	      i = XARGMATCH ("--color", optarg, color_args, color_types);	    else	      /* Using --color with no argument is equivalent to using		 --color=always.  */	      i = color_always;	    print_with_color = (i == color_always				|| (i == color_if_tty				    && isatty (STDOUT_FILENO)));	    if (print_with_color)	      {		/* Don't use TAB characters in output.  Some terminal		   emulators can't handle the combination of tabs and		   color codes on the same line.  */		tabsize = 0;	      }	    break;	  }	case INDICATOR_STYLE_OPTION:	  indicator_style = XARGMATCH ("--indicator-style", optarg,				       indicator_style_args,				       indicator_style_types);	  break;	case QUOTING_STYLE_OPTION:	  set_quoting_style (NULL,			     XARGMATCH ("--quoting-style", optarg,					quoting_style_args,					quoting_style_vals));	  break;	case TIME_STYLE_OPTION:	  time_style_option = optarg;	  break;	case SHOW_CONTROL_CHARS_OPTION:	  qmark_funny_chars = 0;	  break;	case BLOCK_SIZE_OPTION:	  human_output_opts = human_options (optarg, true, &output_block_size);	  file_output_block_size = output_block_size;	  break;	case SI_OPTION:	  human_output_opts = human_autoscale | human_SI;	  file_output_block_size = output_block_size = 1;	  break;	case_GETOPT_HELP_CHAR;	case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);	default:	  usage (EXIT_FAILURE);	}    }  filename_quoting_options = clone_quoting_options (NULL);  if (get_quoting_style (filename_quoting_options) == escape_quoting_style)    set_char_quoting (filename_quoting_options, ' ', 1);  if (indicator_style != none)    {      char const *p;      for (p = "*=@|" + (int) indicator_style - 1;  *p;  p++)	set_char_quoting (filename_quoting_options, *p, 1);    }  dirname_quoting_options = clone_quoting_options (NULL);  set_char_quoting (dirname_quoting_options, ':', 1);  /* --dired is meaningful only with --format=long (-l).     Otherwise, ignore it.  FIXME: warn about this?     Alternatively, make --dired imply --format=long?  */  if (dired && format != long_format)    dired = 0;  /* If -c or -u is specified and not -l (or any other option that implies -l),     and no sort-type was specified, then sort by the ctime (-c) or atime (-u).     The behavior of ls when using either -c or -u but with neither -l nor -t     appears to be unspecified by POSIX.  So, with GNU ls, `-u' alone means     sort by atime (this is the one that's not specified by the POSIX spec),     -lu means show atime and sort by name, -lut means show atime and sort     by atime.  */  if ((time_type == time_ctime || time_type == time_atime)      && !sort_type_specified && format != long_format)    {      sort_type = sort_time;    }  if (format == long_format)    {      char *style = time_style_option;      static char const posix_prefix[] = "posix-";      if (! style)	if (! (style = getenv ("TIME_STYLE")))	  style = "posix-long-iso";      while (strncmp (style, posix_prefix, sizeof posix_prefix - 1) == 0)	{	  if (! hard_locale (LC_TIME))	    return optind;	  style += sizeof posix_prefix - 1;	}      if (*style == '+')	{	  char *p0 = style + 1;	  char *p1 = strchr (p0, '\n');	  if (! p1)	    p1 = p0;	  else	    {	      if (strchr (p1 + 1, '\n'))		error (EXIT_FAILURE, 0, _("invalid time style format %s"),		       quote (p0));	      *p1++ = '\0';	    }	  long_time_format[0] = p0;	  long_time_format[1] = p1;	}      else	switch (XARGMATCH ("time style", style,			   time_style_args,			   time_style_types))	  {	  case full_iso_time_style:	    long_time_format[0] = long_time_format[1] =	      "%Y-%m-%d %H:%M:%S.%N %z";	    break;	  case long_iso_time_style:	    long_time_format[0] = long_time_format[1] = "%Y-%m-%d %H:%M";	    break;	  case iso_time_style:	    long_time_format[0] = "%Y-%m-%d ";	    long_time_format[1] = "%m-%d %H:%M";	    break;	  case locale_time_style:	    if (hard_locale (LC_TIME))	      {		unsigned int i;		for (i = 0; i < 2; i++)		  long_time_format[i] =		    dcgettext (NULL, long_time_format[i], LC_TIME);	      }	  }    }  return optind;}