Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap
Commits
58eedfe0
Commit
58eedfe0
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'support-2719' into 'master'
For future use: unicode paths See merge request
!30
parents
9c1afb9e
227aca87
No related branches found
No related tags found
1 merge request
!30
For future use: unicode paths
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/dap_common.h
+1
-0
1 addition, 0 deletions
include/dap_common.h
src/dap_common.c
+22
-0
22 additions, 0 deletions
src/dap_common.c
with
23 additions
and
0 deletions
include/dap_common.h
+
1
−
0
View file @
58eedfe0
...
@@ -335,6 +335,7 @@ extern size_t g_sys_dir_path_len;
...
@@ -335,6 +335,7 @@ extern size_t g_sys_dir_path_len;
//int dap_common_init( const char * a_log_file );
//int dap_common_init( const char * a_log_file );
int
dap_common_init
(
const
char
*
console_title
,
const
char
*
a_log_file
);
int
dap_common_init
(
const
char
*
console_title
,
const
char
*
a_log_file
);
int
wdap_common_init
(
const
char
*
console_title
,
const
wchar_t
*
a_wlog_file
);
void
dap_common_deinit
(
void
);
void
dap_common_deinit
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/dap_common.c
+
22
−
0
View file @
58eedfe0
...
@@ -243,6 +243,28 @@ int dap_common_init( const char *a_console_title, const char *a_log_filename ) {
...
@@ -243,6 +243,28 @@ int dap_common_init( const char *a_console_title, const char *a_log_filename ) {
return
0
;
return
0
;
}
}
int
wdap_common_init
(
const
char
*
a_console_title
,
const
wchar_t
*
a_log_filename
)
{
// init randomer
srand
(
(
unsigned
int
)
time
(
NULL
)
);
(
void
)
a_console_title
;
strncpy
(
s_log_tag_fmt_str
,
"[%s]
\t
"
,
sizeof
(
s_log_tag_fmt_str
));
for
(
int
i
=
0
;
i
<
16
;
++
i
)
s_ansi_seq_color_len
[
i
]
=
(
unsigned
int
)
strlen
(
s_ansi_seq_color
[
i
]);
if
(
a_log_filename
)
{
s_log_file
=
_wfopen
(
a_log_filename
,
L"a"
);
if
(
s_log_file
==
NULL
)
s_log_file
=
_wfopen
(
a_log_filename
,
L"w"
);
if
(
s_log_file
==
NULL
)
{
dap_fprintf
(
stderr
,
"Can't open log file %s to append
\n
"
,
a_log_filename
);
return
-
1
;
}
//dap_stpcpy(s_log_file_path, a_log_filename);
}
pthread_create
(
&
s_log_thread
,
NULL
,
s_log_thread_proc
,
NULL
);
return
0
;
}
/**
/**
* @brief dap_common_deinit Deinitialise
* @brief dap_common_deinit Deinitialise
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment