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


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*

  23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  28 /*        All Rights Reserved   */
  29 
  30 
  31 #pragma ident   "%Z%%M% %I%     %E% SMI"
  32 
  33 #include        "uucp.h"
  34 
  35 #define MAXLENGTH 256
  36 #define C_MAX     512
  37 
  38 static void insert();
  39 void rproc(), uproc();
  40 
  41 static char  Nnament[MAXLENGTH][NAMESIZE];
  42 static char *Nptr[MAXLENGTH];
  43 static short Nnames = 0;
  44 
  45 int
  46 main(argc, argv)
  47 int argc;
  48 char **argv;
  49 {
  50         int c, i, uopt = 0;
  51         char prev[2 * NAMESIZE];
  52 


 112                 p = strcpy(Nptr[--Nnames], name);
 113         else
 114                 p = strcpy(Nnament[Nnames], name);
 115 
 116         for (j = Nnames; j > i; j--)
 117                 Nptr[j] = Nptr[j-1];
 118 
 119         DEBUG(7, "insert %s ", p);
 120         DEBUG(7, "at %d\n", i);
 121         Nptr[i] = p;
 122         Nnames++;
 123         return;
 124 }
 125 
 126 void
 127 rproc()
 128 {
 129         FILE *cfd;
 130         char line[BUFSIZ];
 131         char *carray[C_MAX];
 132         int na;
 133 
 134         cfd = fopen(GRADES, "r");
 135 
 136         while (rdfulline(cfd, line, BUFSIZ) != 0) {
 137 
 138                 na = getargs(line, carray, C_MAX);
 139                 insert(carray[0]);
 140         }
 141 
 142         (void) fclose(cfd);
 143         return;
 144 }
 145 
 146 void
 147 uproc()
 148 {
 149         FILE *cfd;
 150         char line[BUFSIZ];
 151         char *carray[C_MAX];
 152         int na;
 153 
 154         cfd = fopen(GRADES, "r");
 155 
 156         while (rdfulline(cfd, line, BUFSIZ) != 0) {
 157 
 158                 na = getargs(line, carray, C_MAX);




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License, Version 1.0 only
   6  * (the "License").  You may not use this file except in compliance
   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2017 Gary Mills
  24  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  29 /*        All Rights Reserved   */
  30 
  31 


  32 #include        "uucp.h"
  33 
  34 #define MAXLENGTH 256
  35 #define C_MAX     512
  36 
  37 static void insert();
  38 void rproc(), uproc();
  39 
  40 static char  Nnament[MAXLENGTH][NAMESIZE];
  41 static char *Nptr[MAXLENGTH];
  42 static short Nnames = 0;
  43 
  44 int
  45 main(argc, argv)
  46 int argc;
  47 char **argv;
  48 {
  49         int c, i, uopt = 0;
  50         char prev[2 * NAMESIZE];
  51 


 111                 p = strcpy(Nptr[--Nnames], name);
 112         else
 113                 p = strcpy(Nnament[Nnames], name);
 114 
 115         for (j = Nnames; j > i; j--)
 116                 Nptr[j] = Nptr[j-1];
 117 
 118         DEBUG(7, "insert %s ", p);
 119         DEBUG(7, "at %d\n", i);
 120         Nptr[i] = p;
 121         Nnames++;
 122         return;
 123 }
 124 
 125 void
 126 rproc()
 127 {
 128         FILE *cfd;
 129         char line[BUFSIZ];
 130         char *carray[C_MAX];

 131 
 132         cfd = fopen(GRADES, "r");
 133 
 134         while (rdfulline(cfd, line, BUFSIZ) != 0) {
 135 
 136                 (void) getargs(line, carray, C_MAX);
 137                 insert(carray[0]);
 138         }
 139 
 140         (void) fclose(cfd);
 141         return;
 142 }
 143 
 144 void
 145 uproc()
 146 {
 147         FILE *cfd;
 148         char line[BUFSIZ];
 149         char *carray[C_MAX];
 150         int na;
 151 
 152         cfd = fopen(GRADES, "r");
 153 
 154         while (rdfulline(cfd, line, BUFSIZ) != 0) {
 155 
 156                 na = getargs(line, carray, C_MAX);