rem: if (in_word) words++;
add: words += in_word;
context: wc (int fd, const char *file){  char buf[BUFFER_SIZE + 1];  size_t bytes_read;  uintmax_t lines, words, chars, bytes, linelength;  int count_bytes, count_chars, count_complicated;  lines = words = chars = bytes = linelength = 0;  /* If in the current locale, chars are equivalent to bytes, we prefer     counting bytes, because that's easier.  */#if HAVE_MBRTOWC && (MB_LEN_MAX > 1)  if (MB_CUR_MAX > 1)    {      count_bytes = print_bytes;      count_chars = print_chars;    }  else#endif    {      count_bytes = print_bytes + print_chars;      count_chars = 0;    }  count_complicated = print_words + print_linelength;  /* We need binary input, since `wc' relies on `lseek' and byte counts.  */  SET_BINARY (fd);  /* When counting only bytes, save some line- and word-counting     overhead.  If FD is a `regular' Unix file, using lseek is enough     to get its `size' in bytes.  Otherwise, read blocks of BUFFER_SIZE     bytes at a time until EOF.  Note that the `size' (number of bytes)     that wc reports is smaller than stats.st_size when the file is not     positioned at its beginning.  That's why the lseek calls below are     necessary.  For example the command     `(dd ibs=99k skip=1 count=0; ./wc -c) < /etc/group'     should make wc report `0' bytes.  */  if (count_bytes && !count_chars && !print_lines && !count_complicated)    {      off_t current_pos, end_pos;      struct stat stats;      if (fstat (fd, &stats) == 0 && S_ISREG (stats.st_mode)	  && (current_pos = lseek (fd, (off_t) 0, SEEK_CUR)) != -1	  && (end_pos = lseek (fd, (off_t) 0, SEEK_END)) != -1)	{	  off_t diff;	  /* Be careful here.  The current position may actually be	     beyond the end of the file.  As in the example above.  */	  bytes = (diff = end_pos - current_pos) < 0 ? 0 : diff;	}      else	{	  while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)	    {	      if (bytes_read == SAFE_READ_ERROR)		{		  error (0, errno, "%s", file);		  exit_status = 1;		  break;		}	      bytes += bytes_read;	    }	}    }  else if (!count_chars && !count_complicated)    {      /* Use a separate loop when counting only lines or lines and bytes --	 but not chars or words.  */      while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)	{	  register char *p = buf;	  if (bytes_read == SAFE_READ_ERROR)	    {	      error (0, errno, "%s", file);	      exit_status = 1;	      break;	    }	  while ((p = memchr (p, '\n', (buf + bytes_read) - p)))	    {	      ++p;	      ++lines;	    }	  bytes += bytes_read;	}    }#if HAVE_MBRTOWC && (MB_LEN_MAX > 1)# define SUPPORT_OLD_MBRTOWC 1  else if (MB_CUR_MAX > 1)    {      int in_word = 0;      uintmax_t linepos = 0;      mbstate_t state;      uintmax_t last_error_line = 0;      int last_error_errno = 0;# if SUPPORT_OLD_MBRTOWC      /* Back-up the state before each multibyte character conversion and	 move the last incomplete character of the buffer to the front	 of the buffer.  This is needed because we don't know whether	 the `mbrtowc' function updates the state when it returns -2, -	 this is the ISO C 99 and glibc-2.2 behaviour - or not - amended	 ANSI C, glibc-2.1 and Solaris 2.7 behaviour.  We don't have an	 autoconf test for this, yet.  */      size_t prev = 0; /* number of bytes carried over from previous round */# else      const size_t prev = 0;# endif      memset (&state, 0, sizeof (mbstate_t));      while ((bytes_read = safe_read (fd, buf + prev, BUFFER_SIZE - prev)) > 0)	{	  const char *p;# if SUPPORT_OLD_MBRTOWC	  mbstate_t backup_state;# endif	  if (bytes_read == SAFE_READ_ERROR)	    {	      error (0, errno, "%s", file);	      exit_status = 1;	      break;	    }	  bytes += bytes_read;	  p = buf;	  bytes_read += prev;	  do	    {	      wchar_t wide_char;	      size_t n;# if SUPPORT_OLD_MBRTOWC	      backup_state = state;# endif	      n = mbrtowc (&wide_char, p, bytes_read, &state);	      if (n == (size_t) -2)		{# if SUPPORT_OLD_MBRTOWC		  state = backup_state;# endif		  break;		}	      if (n == (size_t) -1)		{		  /* Signal repeated errors only once per line.  */		  if (!(lines + 1 == last_error_line			&& errno == last_error_errno))		    {		      char line_number_buf[INT_BUFSIZE_BOUND (uintmax_t)];		      last_error_line = lines + 1;		      last_error_errno = errno;		      error (0, errno, "%s:%s", file,			     umaxtostr (last_error_line, line_number_buf));		    }		  p++;		  bytes_read--;		}	      else		{		  if (n == 0)		    {		      wide_char = 0;		      n = 1;		    }		  p += n;		  bytes_read -= n;		  chars++;		  switch (wide_char)		    {		    case '\n':		      lines++;		      /* Fall through. */		    case '\r':		    case '\f':		      if (linepos > linelength)			linelength = linepos;		      linepos = 0;		      goto mb_word_separator;		    case '\t':		      linepos += 8 - (linepos % 8);		      goto mb_word_separator;		    case ' ':		      linepos++;		      /* Fall through. */		    case '\v':		    mb_word_separator:		      if (in_word)			{			  in_word = 0;			  words++;			}		      break;		    default:		      if (iswprint (wide_char))			{			  int width = wcwidth (wide_char);			  if (width > 0)			    linepos += width;			  if (iswspace (wide_char))			    goto mb_word_separator;			  in_word = 1;			}		      break;		    }		}	    }	  while (bytes_read > 0);# if SUPPORT_OLD_MBRTOWC	  if (bytes_read > 0)	    {	      if (bytes_read == BUFFER_SIZE)		{		  /* Encountered a very long redundant shift sequence.  */		  p++;		  bytes_read--;		}	      memmove (buf, p, bytes_read);	    }	  prev = bytes_read;# endif	}      if (linepos > linelength)	linelength = linepos;      if (in_word)	words++;    }#endif  else    {      int in_word = 0;      uintmax_t linepos = 0;      while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)	{	  const char *p = buf;	  if (bytes_read == SAFE_READ_ERROR)	    {	      error (0, errno, "%s", file);	      exit_status = 1;	      break;	    }	  bytes += bytes_read;	  do	    {	      switch (*p++)		{		case '\n':		  lines++;		  /* Fall through. */		case '\r':		case '\f':		  if (linepos > linelength)		    linelength = linepos;		  linepos = 0;		  goto word_separator;		case '\t':		  linepos += 8 - (linepos % 8);		  goto word_separator;		case ' ':		  linepos++;		  /* Fall through. */		case '\v':		word_separator:		  if (in_word)		    {		      in_word = 0;		      words++;		    }		  break;		default:		  if (ISPRINT ((unsigned char) p[-1]))		    {		      linepos++;		      if (ISSPACE ((unsigned char) p[-1]))			goto word_separator;		      in_word = 1;		    }		  break;		}	    }	  while (--bytes_read);	}      if (linepos > linelength)	linelength = linepos;      if (in_word)	words++;    }  if (count_chars < print_chars)    chars = bytes;  write_counts (lines, words, chars, bytes, linelength, file);  total_lines += lines;  total_words += words;  total_chars += chars;  total_bytes += bytes;  if (linelength > max_line_length)    max_line_length = linelength;}