-extern int ls_main(int argc, char **argv)
-{
- struct dnode **dnf, **dnd;
- int dnfiles, dndirs;
- struct dnode *dn, *cur, **dnp;
- int i, nfiles;
- int opt;
- int oi, ac;
- char **av;
-
-#ifdef CONFIG_FEATURE_AUTOWIDTH
- struct winsize win = { 0, 0, 0, 0 };
-#endif
-
- disp_opts = DISP_NORMAL;
- style_fmt = STYLE_AUTO;
- list_fmt = LIST_SHORT;
-#ifdef CONFIG_FEATURE_LS_SORTFILES
- sort_opts = SORT_NAME;
- sort_order = SORT_FORWARD;
-#endif
-#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
- time_fmt = TIME_MOD;
-#endif
-#ifdef CONFIG_FEATURE_AUTOWIDTH
- ioctl(fileno(stdout), TIOCGWINSZ, &win);
- if (win.ws_row > 4)
- column_width = win.ws_row - 2;
- if (win.ws_col > 0)
- terminal_width = win.ws_col - 1;
-#endif
- nfiles = 0;