+#include <string.h>
+
+#ifndef NAJOR
+#define MAJOR(dev) (((dev)>>8)&0xff)
+#define MINOR(dev) ((dev)&0xff)
+#endif
+
+/* what is the overall style of the listing */
+#define STYLE_AUTO 0
+#define STYLE_LONG 1 /* one record per line, extended info */
+#define STYLE_SINGLE 2 /* one record per line */
+#define STYLE_COLUMNS 3 /* fill columns */
+
+/* 51306 lrwxrwxrwx 1 root root 2 May 11 01:43 /bin/view -> vi* */
+/* what file information will be listed */
+#define LIST_INO (1<<0)
+#define LIST_BLOCKS (1<<1)
+#define LIST_MODEBITS (1<<2)
+#define LIST_NLINKS (1<<3)
+#define LIST_ID_NAME (1<<4)
+#define LIST_ID_NUMERIC (1<<5)
+#define LIST_SIZE (1<<6)
+#define LIST_DEV (1<<7)
+#define LIST_DATE_TIME (1<<8)
+#define LIST_FULLTIME (1<<9)
+#define LIST_FILENAME (1<<10)
+#define LIST_SYMLINK (1<<11)
+#define LIST_FILETYPE (1<<12)
+#define LIST_EXEC (1<<13)
+
+/* what files will be displayed */
+#define DISP_NORMAL (0) /* show normal filenames */
+#define DISP_DIRNAME (1<<0) /* 2 or more items? label directories */
+#define DISP_HIDDEN (1<<1) /* show filenames starting with . */
+#define DISP_DOT (1<<2) /* show . and .. */
+#define DISP_NOLIST (1<<3) /* show directory as itself, not contents */
+#define DISP_RECURSIVE (1<<4) /* show directory and everything below it */
+#define DISP_ROWS (1<<5) /* print across rows */
+
+#ifdef BB_FEATURE_LS_SORTFILES
+/* how will the files be sorted */
+#define SORT_FORWARD 0 /* sort in reverse order */
+#define SORT_REVERSE 1 /* sort in reverse order */
+#define SORT_NAME 2 /* sort by file name */
+#define SORT_SIZE 3 /* sort by file size */
+#define SORT_ATIME 4 /* sort by last access time */
+#define SORT_CTIME 5 /* sort by last change time */
+#define SORT_MTIME 6 /* sort by last modification time */
+#define SORT_VERSION 7 /* sort by version */
+#define SORT_EXT 8 /* sort by file name extension */
+#define SORT_DIR 9 /* sort by file or directory */
+#endif