aboutsummaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ls.c b/ls.c
index a8d7b182f..77de93a0c 100644
--- a/ls.c
+++ b/ls.c
@@ -156,9 +156,9 @@ struct dnode { /* the basic node */
156}; 156};
157typedef struct dnode dnode_t; 157typedef struct dnode dnode_t;
158 158
159struct dnode **list_dir(char *); 159static struct dnode **list_dir(char *);
160struct dnode **dnalloc(int); 160static struct dnode **dnalloc(int);
161int list_single(struct dnode *); 161static int list_single(struct dnode *);
162 162
163static unsigned int disp_opts; 163static unsigned int disp_opts;
164static unsigned int style_fmt; 164static unsigned int style_fmt;
@@ -186,7 +186,7 @@ static unsigned short column_width = COLUMN_WIDTH;
186static int status = EXIT_SUCCESS; 186static int status = EXIT_SUCCESS;
187 187
188#ifdef BB_FEATURE_HUMAN_READABLE 188#ifdef BB_FEATURE_HUMAN_READABLE
189unsigned long ls_disp_hr = 0; 189static unsigned long ls_disp_hr = 0;
190#endif 190#endif
191 191
192static int my_stat(struct dnode *cur) 192static int my_stat(struct dnode *cur)
@@ -256,7 +256,7 @@ static int is_subdir(struct dnode *dn)
256 strcmp(dn->name, "..") != 0); 256 strcmp(dn->name, "..") != 0);
257} 257}
258 258
259int countdirs(struct dnode **dn, int nfiles) 259static int countdirs(struct dnode **dn, int nfiles)
260{ 260{
261 int i, dirs; 261 int i, dirs;
262 262
@@ -268,7 +268,7 @@ int countdirs(struct dnode **dn, int nfiles)
268 return(dirs); 268 return(dirs);
269} 269}
270 270
271int countsubdirs(struct dnode **dn, int nfiles) 271static int countsubdirs(struct dnode **dn, int nfiles)
272{ 272{
273 int i, subdirs; 273 int i, subdirs;
274 274
@@ -280,7 +280,7 @@ int countsubdirs(struct dnode **dn, int nfiles)
280 return subdirs; 280 return subdirs;
281} 281}
282 282
283int countfiles(struct dnode **dnp) 283static int countfiles(struct dnode **dnp)
284{ 284{
285 int nfiles; 285 int nfiles;
286 struct dnode *cur; 286 struct dnode *cur;
@@ -293,7 +293,7 @@ int countfiles(struct dnode **dnp)
293} 293}
294 294
295/* get memory to hold an array of pointers */ 295/* get memory to hold an array of pointers */
296struct dnode **dnalloc(int num) 296static struct dnode **dnalloc(int num)
297{ 297{
298 struct dnode **p; 298 struct dnode **p;
299 299
@@ -303,7 +303,7 @@ struct dnode **dnalloc(int num)
303 return(p); 303 return(p);
304} 304}
305 305
306void dfree(struct dnode **dnp) 306static void dfree(struct dnode **dnp)
307{ 307{
308 struct dnode *cur, *next; 308 struct dnode *cur, *next;
309 309
@@ -319,7 +319,7 @@ void dfree(struct dnode **dnp)
319 free(dnp); /* free the array holding the dnode pointers */ 319 free(dnp); /* free the array holding the dnode pointers */
320} 320}
321 321
322struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) 322static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
323{ 323{
324 int dncnt, i, d; 324 int dncnt, i, d;
325 struct dnode **dnp; 325 struct dnode **dnp;
@@ -359,7 +359,7 @@ struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
359 359
360/*----------------------------------------------------------------------*/ 360/*----------------------------------------------------------------------*/
361#ifdef BB_FEATURE_LS_SORTFILES 361#ifdef BB_FEATURE_LS_SORTFILES
362int sortcmp(struct dnode *d1, struct dnode *d2) 362static int sortcmp(struct dnode *d1, struct dnode *d2)
363{ 363{
364 int cmp, dif; 364 int cmp, dif;
365 365
@@ -396,7 +396,7 @@ int sortcmp(struct dnode *d1, struct dnode *d2)
396} 396}
397 397
398/*----------------------------------------------------------------------*/ 398/*----------------------------------------------------------------------*/
399void shellsort(struct dnode **dn, int size) 399static void shellsort(struct dnode **dn, int size)
400{ 400{
401 struct dnode *temp; 401 struct dnode *temp;
402 int gap, i, j; 402 int gap, i, j;
@@ -420,7 +420,7 @@ void shellsort(struct dnode **dn, int size)
420#endif 420#endif
421 421
422/*----------------------------------------------------------------------*/ 422/*----------------------------------------------------------------------*/
423void showfiles(struct dnode **dn, int nfiles) 423static void showfiles(struct dnode **dn, int nfiles)
424{ 424{
425 int i, ncols, nrows, row, nc; 425 int i, ncols, nrows, row, nc;
426#ifdef BB_FEATURE_AUTOWIDTH 426#ifdef BB_FEATURE_AUTOWIDTH
@@ -481,7 +481,7 @@ void showfiles(struct dnode **dn, int nfiles)
481} 481}
482 482
483/*----------------------------------------------------------------------*/ 483/*----------------------------------------------------------------------*/
484void showdirs(struct dnode **dn, int ndirs) 484static void showdirs(struct dnode **dn, int ndirs)
485{ 485{
486 int i, nfiles; 486 int i, nfiles;
487 struct dnode **subdnp; 487 struct dnode **subdnp;
@@ -524,7 +524,7 @@ void showdirs(struct dnode **dn, int ndirs)
524} 524}
525 525
526/*----------------------------------------------------------------------*/ 526/*----------------------------------------------------------------------*/
527struct dnode **list_dir(char *path) 527static struct dnode **list_dir(char *path)
528{ 528{
529 struct dnode *dn, *cur, **dnp; 529 struct dnode *dn, *cur, **dnp;
530 struct dirent *entry; 530 struct dirent *entry;
@@ -575,7 +575,7 @@ struct dnode **list_dir(char *path)
575} 575}
576 576
577/*----------------------------------------------------------------------*/ 577/*----------------------------------------------------------------------*/
578int list_single(struct dnode *dn) 578static int list_single(struct dnode *dn)
579{ 579{
580 int i, len; 580 int i, len;
581 char scratch[BUFSIZ + 1]; 581 char scratch[BUFSIZ + 1];