LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
cli_log_path_win32.c
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-3.0-or-later
2 * Copyright (C) 2026 Sylvain Labopin
3 */
4
6
8
10
11bool cli_resolve_default_log_path(char *buf, size_t buf_size)
12{
13 if (!buf || buf_size == 0)
14 return false;
15
16 const char *base = getenv("LOCALAPPDATA");
17 if (!base || !*base) {
18 base = getenv("APPDATA");
19 }
20 if (!base || !*base)
21 return false;
22
23 int ret =
25 buf,
26 buf_size,
27 "%s\\lexleo\\lexleo.log",
28 base
29 );
30
31 if (ret < 0 || (size_t)ret >= buf_size)
32 return false;
33
34 return true;
35}
bool cli_resolve_default_log_path(char *buf, size_t buf_size)
int osal_snprintf(char *str, size_t size, const char *fmt,...)
Definition osal_stdio.c:95