summaryrefslogtreecommitdiff
path: root/support/dktools/test-dk4dir08.c
blob: 8f901786efc050d20eca7a0b8db9871bb71b7127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
	WARNING: This file was generated by dkct.
	Changes you make here will be lost if dkct is run again!
	You should modify the original source and run dkct on it.
	Original source: test-dk4dir08.ctr
*/

/**	@file test-dk4dir08.c The test-dk4dir08 module.
*/


#line 1 "test-dk4dir08.ctr"


#include <stdio.h>

#include "dk4dir.h"
#include "dk4dir08.h"


int main(int argc, char *argv[])
{
  dk4_dir_c8_t	*dir;
  const char	*fn;
  int		 i;
  

#line 15 "test-dk4dir08.ctr"
  

#line 16 "test-dk4dir08.ctr"
  for (i = 1; i < argc; i++) {
    printf("argv[%02d] = \"%s\"\n", i, argv[i]);
    dir = dk4dir_c8_open(argv[i], DK4_DIR_OPEN_SORTED, NULL);
    if (NULL != dir) {
      while (NULL != (fn = dk4dir_c8_next_dir(dir))) {
        printf("D %s\n", fn);
      }
      while (NULL != (fn = dk4dir_c8_next_file(dir))) {
        printf("F %s\n", fn);
      }
      dk4dir_c8_close(dir);
    }
  }
  

#line 30 "test-dk4dir08.ctr"
  

#line 31 "test-dk4dir08.ctr"
  return 0;
}