Skip to content

Commit

Permalink
Merge remote-tracking branch 'illumos/master' into illumos-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zettabot committed Aug 6, 2017
2 parents 3876efa + b7daf79 commit 493b6ee
Show file tree
Hide file tree
Showing 36 changed files with 1,884 additions and 1,518 deletions.
14 changes: 6 additions & 8 deletions usr/src/cmd/captoinfo/captoinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */

#pragma ident "%Z%%M% %I% %E% SMI"

/*
* NAME
* captoinfo - convert a termcap description to a terminfo description
Expand Down Expand Up @@ -229,7 +227,7 @@ checktermcap()
"%s: TERM=%s: wrong type given for the "
"boolean termcap code '%.2s'.\n", progname,
term_name, tbuf);
continue;
continue;
}

/* look for the name in nums */
Expand All @@ -239,7 +237,7 @@ checktermcap()
"%s: TERM=%s: wrong type given for the "
"numeric termcap code '%.2s'.\n", progname,
term_name, tbuf);
continue;
continue;
}

/* look for the name in strs */
Expand All @@ -249,7 +247,7 @@ checktermcap()
"%s: TERM=%s: wrong type given for the "
"string termcap code '%.2s'.\n", progname,
term_name, tbuf);
continue;
continue;
}

(void) fprintf(stderr,
Expand Down Expand Up @@ -469,7 +467,7 @@ search(char *names[], int max, char *infoname)
for (i = 0; names [i] != NULL; i++)
if (strcmp(names [i], infoname) == 0)
return (i);
return (-1);
return (-1);
#else /* this doesn't work for some reason */
char **bret;

Expand Down Expand Up @@ -1037,7 +1035,7 @@ fancycap(char *string)
}
string++;
}
return (0);
return (0);
}

/*
Expand Down Expand Up @@ -1367,7 +1365,7 @@ initdirname(void)
#endif /* SYSV || USG */
if (verbose)
(void) fprintf(trace, "current directory name=%s.\n", dirname);
environ = newenviron;
environ = newenviron;
}

static void
Expand Down
1 change: 1 addition & 0 deletions usr/src/cmd/zonecfg/zonecfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ static const char *net_res_scope_cmds[] = {
"help",
"info",
"set address=",
"set allowed-address=",
"set physical=",
"set defrouter=",
NULL
Expand Down
1 change: 1 addition & 0 deletions usr/src/common/ficl/emu/loader_emu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,7 @@ command_help(int argc, char *argv[])
switch (argc) {
case 3:
subtopic = strdup(argv[2]);
/* FALLTHROUGH */
case 2:
topic = strdup(argv[1]);
break;
Expand Down
4 changes: 2 additions & 2 deletions usr/src/common/ficl/float.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ ficlVmParseFloatNumber(ficlVm *vm, ficlString s)
if (c == '+') {
break;
}
/* Note! Drop through to FPS_ININT */
/* FALLTHROUGH */
/*
* Converting integer part of number.
* Only allow digits, decimal and 'E'.
Expand Down Expand Up @@ -339,7 +339,7 @@ ficlVmParseFloatNumber(ficlVm *vm, ficlString s)
} else if (c == '+') {
break;
}
/* Note! Drop through to FPS_INEXP */
/* FALLTHROUGH */
/*
* Processing the exponent part of number.
* Only allow digits.
Expand Down
3 changes: 3 additions & 0 deletions usr/src/common/ficl/primitives.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,11 @@ ficlPrimitiveSprintf(ficlVm *vm)
case 'x':
case 'X':
base = 16;
/* FALLTHROUGH */
case 'u':
case 'U':
unsignedInteger = 1; /* true */
/* FALLTHROUGH */
case 'd':
case 'D': {
int integer;
Expand All @@ -437,6 +439,7 @@ ficlPrimitiveSprintf(ficlVm *vm)
case '%':
source = format;
actualLength = 1;
/* FALLTHROUGH */
default:
continue;
}
Expand Down
1 change: 1 addition & 0 deletions usr/src/common/ficl/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ ficlVmOptimizeJumpToJump(ficlVm *vm, ficlIp ip)
case ficlInstructionBranchParenWithCheck:
/* preoptimize where we're jumping to */
ficlVmOptimizeJumpToJump(vm, destination);
/* FALLTHROUGH */
case ficlInstructionBranchParen:
destination++;
destination += *(ficlInteger *)destination;
Expand Down
25 changes: 12 additions & 13 deletions usr/src/lib/libcurses/screen/termcap.ed
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ H
* contributors.
*/

#pragma ident "%Z%%M% %I% %E% SMI"

/*
* Simulation of termcap using terminfo.
* This file is created from termcap.ed. DO NOT EDIT ME!
Expand Down Expand Up @@ -60,17 +58,18 @@ _stripdelays(char *inbuf, char *outbuf, int size)

if (inbuf == NULL)
return (0);
else
while (size && *inbuf)
if (*inbuf == '$' && *(inbuf+1) == '<')
/* LINTED */
while (*inbuf && *inbuf++ != '>');
else {
size--;
*outbuf++ = *inbuf++;
*outbuf = 0;
}
return (saveoutbuf);

while (size && *inbuf) {
if (*inbuf == '$' && *(inbuf+1) == '<') {
/* LINTED */
while (*inbuf && *inbuf++ != '>');
} else {
size--;
*outbuf++ = *inbuf++;
*outbuf = 0;
}
}
return (saveoutbuf);
}

/* generated by sort on caps */
Expand Down
84 changes: 42 additions & 42 deletions usr/src/lib/libcurses/screen/tparm.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ pop(STACK *st)
return (st->stack[st->top--]);
}

/* The following routine was added to make lint shut up about converting from
/*
* The following routine was added to make lint shut up about converting from
* a long to a char *. It is identical to the pop routine, except for the
* cast on the return statement.
*/
Expand Down Expand Up @@ -165,27 +166,27 @@ free_stack(STACK *st)
}


char *
char *
tparm_p0(char *instring)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

char *
char *
tparm_p1(char *instring, long l1)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};

p[0] = l1;

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

char *
char *
tparm_p2(char *instring, long l1, long l2)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
Expand All @@ -194,10 +195,10 @@ tparm_p2(char *instring, long l1, long l2)
p[1] = l2;

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

char *
char *
tparm_p3(char *instring, long l1, long l2, long l3)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
Expand All @@ -207,10 +208,10 @@ tparm_p3(char *instring, long l1, long l2, long l3)
p[2] = l3;

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

char *
char *
tparm_p4(char *instring, long l1, long l2, long l3, long l4)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
Expand All @@ -221,12 +222,12 @@ tparm_p4(char *instring, long l1, long l2, long l3, long l4)
p[3] = l4;

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

char *
char *
tparm_p7(char *instring, long l1, long l2, long l3, long l4, long l5, long l6,
long l7)
long l7)
{
long p[] = {0, 0, 0, 0, 0, 0, 0, 0, 0};

Expand All @@ -239,13 +240,13 @@ tparm_p7(char *instring, long l1, long l2, long l3, long l4, long l5, long l6,
p[6] = l7;

return (tparm(instring, p[0], p[1], p[2], p[3], p[4], p[5], p[6],
p[7], p[8]));
p[7], p[8]));
}

/* VARARGS */
char *
char *
tparm(char *instring, long fp1, long fp2, long p3, long p4,
long p5, long p6, long p7, long p8, long p9)
long p5, long p6, long p7, long p8, long p9)
{
static char result[512];
static char added[100];
Expand All @@ -257,7 +258,7 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
long op;
long op2;
int sign;
int onrow = 0;
volatile int onrow = 0;
volatile long p1 = fp1, p2 = fp2; /* copy in case < 2 actual parms */
char *xp;
char formatbuffer[100];
Expand Down Expand Up @@ -386,8 +387,7 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
* now.
*/
if (c == 's')
(void) sprintf(outp, formatbuffer,
(char *) op);
(void) sprintf(outp, formatbuffer, (char *)op);
else
(void) sprintf(outp, formatbuffer, op);
/*
Expand All @@ -398,7 +398,7 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
* BSD emulations are particularly confusing.
*/
while (*outp)
outp++;
outp++;
(void) pop(&stk);

continue;
Expand All @@ -425,24 +425,24 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
*/
switch (op) {
/*
* Null. Problem is that our
* output is, by convention, null terminated.
*/
* Null. Problem is that our
* output is, by convention, null terminated.
*/
case 0:
op = 0200; /* Parity should */
/* be ignored. */
break;
/*
* Control D. Problem is that certain very
* ancient hardware hangs up on this, so the
* current(!) UNIX tty driver doesn't xmit
* control D's.
*/
* Control D. Problem is that certain very
* ancient hardware hangs up on this, so the
* current(!) UNIX tty driver doesn't xmit
* control D's.
*/
case _CHCTRL('d'):
/*
* Newline. Problem is that UNIX will expand
* this to CRLF.
*/
* Newline. Problem is that UNIX will expand
* this to CRLF.
*/
case '\n':
xp = (onrow ? cursor_down :
cursor_right);
Expand Down Expand Up @@ -486,10 +486,10 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
break;

/*
* %i: shorthand for increment first two parms.
* Useful for terminals that start numbering from
* one instead of zero(like ANSI terminals).
*/
* %i: shorthand for increment first two parms.
* Useful for terminals that start numbering from
* one instead of zero(like ANSI terminals).
*/
case 'i':
p1++;
p2++;
Expand Down Expand Up @@ -545,8 +545,8 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
} else {
if (*cp >= 'A' && *cp <= 'Z') {
regs[*cp++ - 'A'] =
/* LINTED */
(short) pop(&stk);
/* LINTED */
(short)pop(&stk);
}
#ifdef DEBUG
else if (outf) {
Expand Down Expand Up @@ -692,17 +692,17 @@ tparm(char *instring, long fp1, long fp2, long p3, long p4,
/* Sorry, no unary minus, because minus is binary. */

/*
* If-then-else. Implemented by a low level hack of
* skipping forward until the match is found, counting
* nested if-then-elses.
*/
* If-then-else. Implemented by a low level hack of
* skipping forward until the match is found, counting
* nested if-then-elses.
*/
case '?': /* IF - just a marker */
break;

case 't': /* THEN - branch if false */
if (!pop(&stk))
cp = _branchto(cp, 'e');
break;
break;

case 'e': /* ELSE - branch to ENDIF */
cp = _branchto(cp, ';');
Expand Down
Loading

0 comments on commit 493b6ee

Please sign in to comment.