rem: { long int tmp_long; if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK  || tmp_long > INT_MAX) error (EXIT_FAILURE, 0, _("invalid starting line number: `%s'"), optarg); starting_line_number = (int) tmp_long; }
add: if (xstrtoimax (optarg, NULL, 10, &starting_line_number, "") != LONGINT_OK) { error (0, 0, _("invalid starting line number: %s"), quote (optarg)); ok = false; }
context: main (int argc, char **argv){  int c, exit_status = 0;  size_t len;  program_name = argv[0];  setlocale (LC_ALL, "");  bindtextdomain (PACKAGE, LOCALEDIR);  textdomain (PACKAGE);  atexit (close_stdout);  have_read_stdin = 0;  while ((c = getopt_long (argc, argv, "h:b:f:v:i:pl:s:w:n:d:", longopts,			   NULL)) != -1)    {      switch (c)	{	case 0:	  break;	case 'h':	  if (build_type_arg (&header_type, &header_regex) != TRUE)	    usage (2);	  break;	case 'b':	  if (build_type_arg (&body_type, &body_regex) != TRUE)	    usage (2);	  break;	case 'f':	  if (build_type_arg (&footer_type, &footer_regex) != TRUE)	    usage (2);	  break;	case 'v':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK		/* Allow it to be negative.  */		|| tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0, _("invalid starting line number: `%s'"),		     optarg);	    starting_line_number = (int) tmp_long;	  }	  break;	case 'i':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK		|| tmp_long <= 0 || tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0, _("invalid line number increment: `%s'"),		     optarg);	    page_incr = (int) tmp_long;	  }	  break;	case 'p':	  reset_numbers = FALSE;	  break;	case 'l':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK		|| tmp_long <= 0 || tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0, _("invalid number of blank lines: `%s'"),		     optarg);	    blank_join = (int) tmp_long;	  }	  break;	case 's':	  separator_str = optarg;	  break;	case 'w':	  {	    long int tmp_long;	    if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK		|| tmp_long <= 0 || tmp_long > INT_MAX)	      error (EXIT_FAILURE, 0,		     _("invalid line number field width: `%s'"),		     optarg);	    lineno_width = (int) tmp_long;	  }	  break;	case 'n':	  switch (*optarg)	    {	    case 'l':	      if (optarg[1] == 'n')		lineno_format = FORMAT_LEFT;	      else		usage (2);	      break;	    case 'r':	      switch (optarg[1])		{		case 'n':		  lineno_format = FORMAT_RIGHT_NOLZ;		  break;		case 'z':		  lineno_format = FORMAT_RIGHT_LZ;		  break;		default:		  usage (2);		  break;		}	      break;	    default:	      usage (2);	      break;	    }	  break;	case 'd':	  section_del = optarg;	  break;	case_GETOPT_HELP_CHAR;	case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);	default:	  usage (2);	  break;	}    }  /* Initialize the section delimiters.  */  len = strlen (section_del);  header_del_len = len * 3;  header_del = xmalloc (header_del_len + 1);  strcat (strcat (strcpy (header_del, section_del), section_del), section_del);  body_del_len = len * 2;  body_del = xmalloc (body_del_len + 1);  strcat (strcpy (body_del, section_del), section_del);  footer_del_len = len;  footer_del = xmalloc (footer_del_len + 1);  strcpy (footer_del, section_del);  /* Initialize the input buffer.  */  initbuffer (&line_buf);  /* Initialize the printf format for unnumbered lines. */  len = strlen (separator_str);  print_no_line_fmt = xmalloc (lineno_width + len + 1);  memset (print_no_line_fmt, ' ', lineno_width + len);  print_no_line_fmt[lineno_width + len] = '\0';  line_no = starting_line_number;  current_type = body_type;  current_regex = &body_regex;  build_print_fmt ();  /* Main processing. */  if (optind == argc)    exit_status |= nl_file ("-");  else    for (; optind < argc; optind++)      exit_status |= nl_file (argv[optind]);  if (have_read_stdin && fclose (stdin) == EOF)    {      error (0, errno, "-");      exit_status = 1;    }  exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);}