if (!(lflag & LONG_VIEW) && (c != 1))
if (!(lflag & LS_LONG_VIEW) && (c != 1))
do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag){	int n, c = 1, colspace = 0, columns = 1;	SFTP_DIRENT **d;	if ((n = do_readdir(conn, path, &d)) != 0)		return (n);	if (!(lflag & SHORT_VIEW)) {		int m = 0, width = 80;		struct winsize ws;		char *tmp;		/* Count entries for sort and find longest filename */		for (n = 0; d[n] != NULL; n++)			m = MAX(m, strlen(d[n]->filename));		/* Add any subpath that also needs to be counted */		tmp = path_strip(path, strip_path);		m += strlen(tmp);		xfree(tmp);		if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)			width = ws.ws_col;		columns = width / (m + 2);		columns = MAX(columns, 1);		colspace = width / columns;		colspace = MIN(colspace, width);	}	if (lflag & SORT_FLAGS) {		sort_flag = lflag & (SORT_FLAGS|REVERSE_SORT);		qsort(d, n, sizeof(*d), sdirent_comp);	}	for (n = 0; d[n] != NULL && !interrupted; n++) {		char *tmp, *fname;		tmp = path_append(path, d[n]->filename);		fname = path_strip(tmp, strip_path);		xfree(tmp);		if (lflag & LONG_VIEW) {			if (lflag & NUMERIC_VIEW) {				char *lname;				struct stat sb;				memset(&sb, 0, sizeof(sb));				attrib_to_stat(&d[n]->a, &sb);				lname = ls_file(fname, &sb, 1);				printf("%s\n", lname);				xfree(lname);			} else				printf("%s\n", d[n]->longname);		} else {			printf("%-*s", colspace, fname);			if (c >= columns) {				printf("\n");				c = 1;			} else				c++;		}		xfree(fname);	}	if (!(lflag & LONG_VIEW) && (c != 1))		printf("\n");	free_sftp_dirents(d);	return (0);}