=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.175 retrieving revision 1.176 diff -u -r1.175 -r1.176 --- src/usr.bin/ssh/sftp.c 2016/07/22 03:47:36 1.175 +++ src/usr.bin/ssh/sftp.c 2016/09/12 01:22:38 1.176 @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.175 2016/07/22 03:47:36 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.176 2016/09/12 01:22:38 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -15,7 +15,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include /* MIN MAX */ #include #include #include @@ -780,7 +779,7 @@ /* Count entries for sort and find longest filename */ for (n = 0; d[n] != NULL; n++) { if (d[n]->filename[0] != '.' || (lflag & LS_SHOW_ALL)) - m = MAX(m, strlen(d[n]->filename)); + m = MAXIMUM(m, strlen(d[n]->filename)); } /* Add any subpath that also needs to be counted */ @@ -792,9 +791,9 @@ width = ws.ws_col; columns = width / (m + 2); - columns = MAX(columns, 1); + columns = MAXIMUM(columns, 1); colspace = width / columns; - colspace = MIN(colspace, width); + colspace = MINIMUM(colspace, width); } if (lflag & SORT_FLAGS) { @@ -893,10 +892,10 @@ if (!(lflag & LS_SHORT_VIEW)) { /* Count entries for sort and find longest filename */ for (i = 0; g.gl_pathv[i]; i++) - m = MAX(m, strlen(g.gl_pathv[i])); + m = MAXIMUM(m, strlen(g.gl_pathv[i])); columns = width / (m + 2); - columns = MAX(columns, 1); + columns = MAXIMUM(columns, 1); colspace = width / columns; } @@ -1646,16 +1645,16 @@ /* Count entries for sort and find longest */ for (y = 0; list[y]; y++) - m = MAX(m, strlen(list[y])); + m = MAXIMUM(m, strlen(list[y])); if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1) width = ws.ws_col; m = m > len ? m - len : 0; columns = width / (m + 2); - columns = MAX(columns, 1); + columns = MAXIMUM(columns, 1); colspace = width / columns; - colspace = MIN(colspace, width); + colspace = MINIMUM(colspace, width); printf("\n"); m = 1;