Print this page
8485 Remove set but unused variables in usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mail/copylet.c
          +++ new/usr/src/cmd/mail/copylet.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2017 Gary Mills
  23   24   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   29  /*        All Rights Reserved   */
  29   30  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   31  #include "mail.h"
  33   32  
  34   33  /*
  35   34      NAME
  36   35          copylet - copy a given letter to a file pointer
  37   36  
  38   37      SYNOPSIS
  39   38          int copylet(int letnum, FILE *f, int type)
  40   39  
  41   40      DESCRIPTION
↓ open down ↓ 41 lines elided ↑ open up ↑
  83   82          int     print_from_struct = FALSE; /* print from hdrlines struct */
  84   83                                             /* rather than fgets() buffer */
  85   84          int     pushrest = FALSE;
  86   85          int     ctf = FALSE;
  87   86          int     didafflines = FALSE;    /* Did we already put out any */
  88   87                                          /* H_AFWDFROM lines? */
  89   88          int     didrcvlines = FALSE;    /* Did we already put out any */
  90   89                                          /* H_RECEIVED lines? */
  91   90          long    clen = -1L;
  92   91          int     htype;                  /* header type */
  93      -        int     sav_htype;      /* Header type of last non-H_CONT header line */
  94   92          struct hdrs *hptr;
  95   93  
  96   94          if (!sending) {
  97   95                  /* Clear out any saved header info from previous message */
  98   96                  clr_hinfo();
  99   97          }
 100   98  
 101   99          fseek(tmpf, let[letnum].adr, 0);
 102  100          /* Get size of message as stored into tempfile by copymt() */
 103  101          k = let[letnum+1].adr - let[letnum].adr;
↓ open down ↓ 185 lines elided ↑ open up ↑
 289  287                          k -= n;
 290  288                          lastc = buf[n-1];
 291  289  
 292  290                          if (pushrest) {
 293  291                                  pushrest = (lastc != '\n');
 294  292                                  continue;
 295  293                          }
 296  294                          sav_suppress = suppress;
 297  295                          suppress = FALSE;
 298  296                          print_from_struct = FALSE;
 299      -                        sav_htype = htype;
 300  297                          htype = isheader (buf, &ctf);
 301  298                          Dout(pn, 5, "loop 2: buf = %s, htype= %d/%s\n", buf, htype, header[htype].tag);
 302  299                          /* The following order is defined in the MTA documents. */
 303  300                          switch (htype) {
 304  301                          case H_CONT:
 305  302                              if (sending) {
 306  303                                  suppress = sav_suppress;
 307  304                              }
 308  305                              continue;
 309  306                          case H_TCOPY:
↓ open down ↓ 93 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX