summaryrefslogtreecommitdiff
path: root/support/dktools/test-dk4user.c
blob: 8798f6783588bbe421acba0f3e0c8d4b0bfcdd1a (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
	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-dk4user.ctr
*/

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


#line 1 "test-dk4user.ctr"


#include "dk4conf.h"
#include "dk4types.h"
#include "dk4mem.h"
#include <stdio.h>
#include "dk4user.h"
#include "dk4mpl.h"
#include "dk4fput.h"

#if DK4_HAVE_STDLIB_H
#include <stdlib.h>
#endif

#if DK4_HAVE_UNISTD_H
#include <unistd.h>
#endif

#if DK4_HAVE_PROCESS_H
#include <process.h>
#endif





#line 26 "test-dk4user.ctr"



int main(void)
{
  dkChar	logname[128];
  dkChar	homedir[DK4_MAX_PATH];
  dk4_er_t	er;

  

#line 36 "test-dk4user.ctr"
  

#line 37 "test-dk4user.ctr"
  dk4error_init(&er);
  dk4fput_initialize_stdout();
  if (dk4user_get_logname(logname, DK4_SIZEOF(logname,dkChar), 0, &er)) {
    dk4fputs(dkT("LOGNAME: "), stdout, &er);
    dk4fputs(logname, stdout, &er);
    dk4fputc(dkT('\n'), stdout, &er);
  }
  if (dk4user_get_homedir(homedir, DK4_SIZEOF(homedir,dkChar), 0, &er)) {
    dk4fputs(dkT("HOMEDIR: "), stdout, &er);
    dk4fputs(homedir, stdout, &er);
    dk4fputc(dkT('\n'), stdout, &er);
  }
  

#line 50 "test-dk4user.ctr"
  

#line 51 "test-dk4user.ctr"
  exit(0); return 0;
}