Back to index

glibc  2.9
Functions
dir2.c File Reference
#include <stdio.h>
#include <dirent.h>

Go to the source code of this file.

Functions

static int one (const struct dirent *unused)
int main (void)

Function Documentation

int main ( void  )

Definition at line 13 of file dir2.c.

{
  struct dirent **eps;
  int n;

  n = scandir ("./", &eps, one, alphasort);
  if (n >= 0)
    {
      int cnt;
      for (cnt = 0; cnt < n; ++cnt)
       puts (eps[cnt]->d_name);
    }
  else
    perror ("Couldn't open the directory");

  return 0;
}

Here is the call graph for this function:

static int one ( const struct dirent unused) [static]

Definition at line 7 of file dir2.c.

{
  return 1;
}