summaryrefslogtreecommitdiff
path: root/support/dktools/test-dk4enc.c
blob: 160a8a6c5a6423def5a61e245beca3385f2a2e77 (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
/*
	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-dk4enc.ctr
*/

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


#line 1 "test-dk4enc.ctr"


#include "dk4conf.h"
#include "dk4types.h"
#include "dk4error.h"
#include "dk4enc.h"



#if DK4_CHAR_SIZE > 1
int wmain(int argc, wchar_t *argv[])
#else
int main(int argc, char *argv[])
#endif
{
  dk4_er_t	er;
  int		enc = 0;
  int		bom = 0;
  if (argc > 1) {
    dk4error_init(&er);
    if (0 != dk4enc_find(&enc, &bom, argv[1], &er)) {
      printf("Encoding: %d\nBOM: %d\n", enc, bom);
    } else {
      printf("Fehlgeschlagen, Grund: %d\n", er.ec);
    }
  }
  return 0;
}