diff options
Diffstat (limited to 'ls.c')
-rw-r--r-- | ls.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -156,9 +156,9 @@ struct dnode { /* the basic node */ | |||
156 | }; | 156 | }; |
157 | typedef struct dnode dnode_t; | 157 | typedef struct dnode dnode_t; |
158 | 158 | ||
159 | struct dnode **list_dir(char *); | 159 | static struct dnode **list_dir(char *); |
160 | struct dnode **dnalloc(int); | 160 | static struct dnode **dnalloc(int); |
161 | int list_single(struct dnode *); | 161 | static int list_single(struct dnode *); |
162 | 162 | ||
163 | static unsigned int disp_opts; | 163 | static unsigned int disp_opts; |
164 | static unsigned int style_fmt; | 164 | static unsigned int style_fmt; |
@@ -186,7 +186,7 @@ static unsigned short column_width = COLUMN_WIDTH; | |||
186 | static int status = EXIT_SUCCESS; | 186 | static int status = EXIT_SUCCESS; |
187 | 187 | ||
188 | #ifdef BB_FEATURE_HUMAN_READABLE | 188 | #ifdef BB_FEATURE_HUMAN_READABLE |
189 | unsigned long ls_disp_hr = 0; | 189 | static unsigned long ls_disp_hr = 0; |
190 | #endif | 190 | #endif |
191 | 191 | ||
192 | static int my_stat(struct dnode *cur) | 192 | static 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 | ||
259 | int countdirs(struct dnode **dn, int nfiles) | 259 | static 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 | ||
271 | int countsubdirs(struct dnode **dn, int nfiles) | 271 | static 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 | ||
283 | int countfiles(struct dnode **dnp) | 283 | static 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 */ |
296 | struct dnode **dnalloc(int num) | 296 | static 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 | ||
306 | void dfree(struct dnode **dnp) | 306 | static 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 | ||
322 | struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) | 322 | static 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 |
362 | int sortcmp(struct dnode *d1, struct dnode *d2) | 362 | static 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 | /*----------------------------------------------------------------------*/ |
399 | void shellsort(struct dnode **dn, int size) | 399 | static 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 | /*----------------------------------------------------------------------*/ |
423 | void showfiles(struct dnode **dn, int nfiles) | 423 | static 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 | /*----------------------------------------------------------------------*/ |
484 | void showdirs(struct dnode **dn, int ndirs) | 484 | static 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 | /*----------------------------------------------------------------------*/ |
527 | struct dnode **list_dir(char *path) | 527 | static 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 | /*----------------------------------------------------------------------*/ |
578 | int list_single(struct dnode *dn) | 578 | static 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]; |