Print this page
10097 indenting fixes in usr/src/{lib,common}

Split Close
Expand all
Collapse all
          --- old/usr/src/common/cmdparse/cmdparse.c
          +++ new/usr/src/common/cmdparse/cmdparse.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
       26 +/*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
  26   30  #include <stdlib.h>
  27   31  #include <stdio.h>
  28   32  #include <sys/types.h>
  29   33  #include <unistd.h>
  30   34  #include <libintl.h>
  31   35  #include <errno.h>
  32   36  #include <string.h>
  33   37  #include <assert.h>
  34   38  #include <getopt.h>
  35   39  #include <cmdparse.h>
↓ open down ↓ 565 lines elided ↑ open up ↑
 601  605                          /* increment required options entered */
 602  606                          } else if (subcommand->required &&
 603  607                              (strchr(subcommand->required,
 604  608                              cmdOptions[i].optval))) {
 605  609                                  requiredOptionEntered++;
 606  610                          /* Check for exclusive options */
 607  611                          } else if (cmdOptions[1].optval != 0 &&
 608  612                              subcommand->exclusive &&
 609  613                              strchr(subcommand->exclusive,
 610  614                              cmdOptions[i].optval)) {
 611      -                                        (void) printf("%s: '-%c': %s\n",
 612      -                                            commandName, cmdOptions[i].optval,
 613      -                                            gettext("is an exclusive option"));
      615 +                                (void) printf("%s: '-%c': %s\n",
      616 +                                    commandName, cmdOptions[i].optval,
      617 +                                    gettext("is an exclusive option"));
 614  618                                  subUsage(DETAIL_USAGE, subcommand);
 615      -                                        return (1);
      619 +                                return (1);
 616  620                          }
 617  621                  }
 618  622          } else { /* no options were input */
 619  623                  if (availOptions != NULL && subcommand->required) {
 620  624                          (void) printf("%s: %s\n", commandName,
 621  625                              gettext("at least one option required"));
 622  626                          subUsage(DETAIL_USAGE, subcommand);
 623  627                          return (1);
 624  628                  }
 625  629          }
↓ open down ↓ 56 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX