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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libmp/common/mout.c
          +++ new/usr/src/lib/libmp/common/mout.c
↓ open down ↓ 7 lines elided ↑ open up ↑
   8    8   * specifies the terms and conditions for redistribution.
   9    9   */
  10   10  /*      Portions Copyright(c) 1988, Sun Microsystems Inc.       */
  11   11  /*      All Rights Reserved                                     */
  12   12  
  13   13  /*
  14   14   * Copyright (c) 1997, by Sun Microsystems, Inc.
  15   15   * All rights reserved.
  16   16   */
  17   17  
  18      -#ident  "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.1   */
       18 +/*
       19 + * Copyright (c) 2018, Joyent, Inc.
       20 + */
  19   21  
  20   22  /* LINTLIBRARY */
  21   23  
  22   24  #include <stdio.h>
  23   25  #include <mp.h>
  24   26  #include <sys/types.h>
  25   27  #include "libmp.h"
  26   28  #include <stdlib.h>
  27   29  
  28   30  static int
↓ open down ↓ 4 lines elided ↑ open up ↑
  33   35          short qten, qy;
  34   36  
  35   37          _mp_xfree(a);
  36   38          sign = 1;
  37   39          ten.len = 1;
  38   40          ten.val = &qten;
  39   41          qten = b;
  40   42          x.len = 0;
  41   43          y.len = 1;
  42   44          y.val = &qy;
  43      -        while ((c = getc(f)) != EOF)
  44      -        switch (c) {
       45 +        while ((c = getc(f)) != EOF) {
       46 +                switch (c) {
  45   47  
  46      -        case '\\':
  47      -                (void) getc(f);
  48      -                continue;
  49      -        case '\t':
  50      -        case '\n':
  51      -                a->len *= sign;
  52      -                _mp_xfree(&x);
  53      -                return (0);
  54      -        case ' ':
  55      -                continue;
  56      -        case '-':
  57      -                sign = -sign;
  58      -                continue;
  59      -        default:
  60      -                if (c >= '0' && c <= '9') {
  61      -                        qy = c - '0';
  62      -                        mp_mult(&x, &ten, a);
  63      -                        mp_madd(a, &y, a);
  64      -                        _mp_move(a, &x);
       48 +                case '\\':
       49 +                        (void) getc(f);
  65   50                          continue;
  66      -                } else {
  67      -                        (void) ungetc(c, stdin);
       51 +                case '\t':
       52 +                case '\n':
  68   53                          a->len *= sign;
       54 +                        _mp_xfree(&x);
  69   55                          return (0);
       56 +                case ' ':
       57 +                        continue;
       58 +                case '-':
       59 +                        sign = -sign;
       60 +                        continue;
       61 +                default:
       62 +                        if (c >= '0' && c <= '9') {
       63 +                                qy = c - '0';
       64 +                                mp_mult(&x, &ten, a);
       65 +                                mp_madd(a, &y, a);
       66 +                                _mp_move(a, &x);
       67 +                                continue;
       68 +                        } else {
       69 +                                (void) ungetc(c, stdin);
       70 +                                a->len *= sign;
       71 +                                return (0);
       72 +                        }
  70   73                  }
  71   74          }
       75 +
  72   76          return (EOF);
  73   77  }
  74   78  
  75   79  static void
  76   80  m_out(MINT *a, short b, FILE *f)
  77   81  {
  78   82          int sign, xlen, i;
  79   83          short r;
  80   84          MINT x;
  81   85  
↓ open down ↓ 125 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX