.
This commit is contained in:
parent
93b05f3060
commit
79f30bb23b
3 changed files with 76 additions and 10 deletions
9
colla.c
9
colla.c
|
|
@ -518,7 +518,7 @@ char char_lower(char c) {
|
|||
}
|
||||
|
||||
char char_upper(char c) {
|
||||
return c <= 'a' && c >= 'z' ? c - 32 : c;
|
||||
return c >= 'a' && c <= 'z' ? c - 32 : c;
|
||||
}
|
||||
|
||||
// == INPUT STREAM =================================================
|
||||
|
|
@ -1614,7 +1614,6 @@ void os_log_print(const char *file, int line, os_log_level_e level, const char *
|
|||
|
||||
void os_log_printv(const char *file, int line, os_log_level_e level, const char *fmt, va_list args) {
|
||||
time_t t = time(NULL);
|
||||
struct tm log_time = { 0 };
|
||||
#define gettime(src, dst) localtime_s(&dst, &src)
|
||||
log_event_t ev = {
|
||||
.level = level,
|
||||
|
|
@ -1628,6 +1627,7 @@ void os_log_printv(const char *file, int line, os_log_level_e level, const char
|
|||
va_copy(ev.args, args);
|
||||
|
||||
#if COLLA_WIN
|
||||
struct tm log_time = { 0 };
|
||||
localtime_s(&log_time, &t);
|
||||
ev.time = &log_time;
|
||||
#else
|
||||
|
|
@ -1890,7 +1890,7 @@ job_queue_t *jq_init(arena_t *arena, int worker_count) {
|
|||
job_queue_t *q = alloc(arena, job_queue_t);
|
||||
q->mutex = os_mutex_create();
|
||||
q->condvar = os_cond_create();
|
||||
q->thread_count = worker_count ? worker_count : os_get_system_info().processor_count;
|
||||
q->thread_count = worker_count ? (u32)worker_count : os_get_system_info().processor_count;
|
||||
q->threads = alloc(arena, oshandle_t, q->thread_count);
|
||||
|
||||
for (int i = 0; i < q->thread_count; ++i) {
|
||||
|
|
@ -2963,7 +2963,7 @@ strview_t html_closing_p_tags[] = {
|
|||
};
|
||||
|
||||
bool html__closes_p_tag(strview_t tag) {
|
||||
for (int i = 0; i < arrlen(html_closing_p_tags); ++i) {
|
||||
for (u32 i = 0; i < arrlen(html_closing_p_tags); ++i) {
|
||||
if (strv_equals(html_closing_p_tags[i], tag)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3076,6 +3076,7 @@ const char *http_get_method_string(http_method_e method) {
|
|||
case HTTP_HEAD: return "HEAD";
|
||||
case HTTP_PUT: return "PUT";
|
||||
case HTTP_DELETE: return "DELETE";
|
||||
default: break;
|
||||
}
|
||||
return "GET";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue