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
|
/*
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-home.ctr
*/
/** @file test-home.c The test-home module.
*/
#line 1 "test-home.ctr"
#include "dk4conf.h"
#include <stdio.h>
#include "dk4mem.h"
#include "dk4user.h"
#include "dk4fput.h"
#include "dk4mpl.h"
static const dkChar *test_home_kw[] = {
/* 0 */
dkT("LOGNAME: "),
/* 1 */
dkT("HOME: "),
NULL
#line 16 "test-home.ctr"
};
int main(void)
{
dkChar buf[DK4_MAX_PATH];
size_t szbuf = DK4_SIZEOF(buf,dkChar);
int exval = 1;
if (0 != dk4user_get_logname(buf, szbuf, 1, NULL)) {
dk4fput_initialize_stdout();
dk4fputs(test_home_kw[0], stdout, NULL);
dk4fputs(buf, stdout, NULL);
dk4fputc(dkT('\n'), stdout, NULL);
if (0 != dk4user_get_homedir(buf, szbuf, 1, NULL)) {
dk4fputs(test_home_kw[1], stdout, NULL);
dk4fputs(buf, stdout, NULL);
dk4fputc(dkT('\n'), stdout, NULL);
exval = 0;
}
dk4fput_cleanup_stdout();
}
return exval;
}
|