| 19 |
#include "user_list.h" |
#include "user_list.h" |
| 20 |
#include <errno.h> |
#include <errno.h> |
| 21 |
#include <libgen.h> |
#include <libgen.h> |
| 22 |
|
#include <locale.h> |
| 23 |
#include <signal.h> |
#include <signal.h> |
| 24 |
#include <stdio.h> |
#include <stdio.h> |
| 25 |
#include <stdlib.h> |
#include <stdlib.h> |
| 134 |
return -1; |
return -1; |
| 135 |
} |
} |
| 136 |
|
|
| 137 |
|
// Apply the specified locale |
| 138 |
|
if (setlocale(LC_ALL, "en_US.UTF-8") == NULL) |
| 139 |
|
{ |
| 140 |
|
fprintf(stderr, "setlocale(LC_ALL, en_US.UTF-8) error\n"); |
| 141 |
|
return -1; |
| 142 |
|
} |
| 143 |
|
|
| 144 |
// Initialize log |
// Initialize log |
| 145 |
if (log_begin(LOG_FILE_INFO, LOG_FILE_ERROR) < 0) |
if (log_begin(LOG_FILE_INFO, LOG_FILE_ERROR) < 0) |
| 146 |
{ |
{ |