summaryrefslogtreecommitdiff
path: root/usr/src/lib/libmp/common/mout.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-18 15:08:29 +0000
committerDan McDonald <danmcd@joyent.com>2019-01-23 21:44:51 -0500
commit981fe1b1a6ca86e9c41a706462f976f947e6f465 (patch)
treef531ec78c2e2cd9135a21aeb116898d612d79d1c /usr/src/lib/libmp/common/mout.c
parenta923e7f4befb22c1dcef53db9008f4a97ad15c3c (diff)
downloadillumos-gate-981fe1b1a6ca86e9c41a706462f976f947e6f465.tar.gz
10097 indenting fixes in usr/src/{lib,common}
Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libmp/common/mout.c')
-rw-r--r--usr/src/lib/libmp/common/mout.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/usr/src/lib/libmp/common/mout.c b/usr/src/lib/libmp/common/mout.c
index 74261d4e76..652c508385 100644
--- a/usr/src/lib/libmp/common/mout.c
+++ b/usr/src/lib/libmp/common/mout.c
@@ -15,7 +15,9 @@
* All rights reserved.
*/
-#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
/* LINTLIBRARY */
@@ -40,35 +42,37 @@ m_in(MINT *a, short b, FILE *f)
x.len = 0;
y.len = 1;
y.val = &qy;
- while ((c = getc(f)) != EOF)
- switch (c) {
-
- case '\\':
- (void) getc(f);
- continue;
- case '\t':
- case '\n':
- a->len *= sign;
- _mp_xfree(&x);
- return (0);
- case ' ':
- continue;
- case '-':
- sign = -sign;
- continue;
- default:
- if (c >= '0' && c <= '9') {
- qy = c - '0';
- mp_mult(&x, &ten, a);
- mp_madd(a, &y, a);
- _mp_move(a, &x);
+ while ((c = getc(f)) != EOF) {
+ switch (c) {
+
+ case '\\':
+ (void) getc(f);
continue;
- } else {
- (void) ungetc(c, stdin);
+ case '\t':
+ case '\n':
a->len *= sign;
+ _mp_xfree(&x);
return (0);
+ case ' ':
+ continue;
+ case '-':
+ sign = -sign;
+ continue;
+ default:
+ if (c >= '0' && c <= '9') {
+ qy = c - '0';
+ mp_mult(&x, &ten, a);
+ mp_madd(a, &y, a);
+ _mp_move(a, &x);
+ continue;
+ } else {
+ (void) ungetc(c, stdin);
+ a->len *= sign;
+ return (0);
+ }
}
}
+
return (EOF);
}