adds MIT license

This commit is contained in:
2026-03-16 15:43:07 +02:00
parent c91edaadda
commit 5b4a923f56
41 changed files with 147 additions and 8 deletions
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef COMMON_H
#define COMMON_H
#include <stdint.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "main.h"
#include <widget.h>
#include <arpa/inet.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef CONNECTION_H
#define CONNECTION_H
#include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <modals.h>
#include <widget.h>
#include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef DRAW_MODAL_H
#define DRAW_MODAL_H
#include <widget.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <arpa/inet.h>
#include <fcntl.h>
#include <netinet/in.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef FILE_PROCESSOR_H
#define FILE_PROCESSOR_H
#include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef LOC_FS_H
#define LOC_FS_H
+4 -1
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <arpa/inet.h>
#include <ncursesw/ncurses.h>
#include <netinet/in.h>
@@ -9,12 +12,12 @@
#include <termios.h>
#include <unistd.h>
#include <widget.h>
#include <modals.h>
#include "connection.h"
#include "file_list.h"
#include "main.h"
#include "query.h"
#include <modals.h>
uint32_t m_id = 0;
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef MAIN_H
#define MAIN_H
+6 -6
View File
@@ -8,6 +8,7 @@
#include <string.h>
#include <unistd.h>
#include <widget.h>
#include <utils.h>
void upload_props_dialogue_modal_cb(callback_args_t *args) {
callback_args_t d_args;
@@ -23,10 +24,12 @@ void upload_props_dialogue_modal_cb(callback_args_t *args) {
checkbox_t *reg_cbx = (checkbox_t *)d->g_content->elements[0].element;
checkbox_t *anon_cbx = (checkbox_t *)d->g_content->elements[1].element;
checkbox_t *comp_cbx = (checkbox_t *)d->g_content->elements[2].element;
int32_t privileges = 0;
if (anon_cbx->value == true) privileges |= 1;
if (reg_cbx->value == true) privileges |= 2;
if (comp_cbx->value == true) privileges |= 4;
switch (d_args.resp_data.val.val.num) {
case 1:
query_len =
@@ -41,12 +44,9 @@ void upload_props_dialogue_modal_cb(callback_args_t *args) {
write(app->query_args->sd, query, query_len);
break;
case 2:
if (app->query_args->file->name != NULL)
free(app->query_args->file->name);
if (app->query_args->file->path != NULL)
free(app->query_args->file->path);
free(app->query_args->file);
app->query_args->file = NULL;
FREE_MLC(app->query_args->file->name);
FREE_MLC(app->query_args->file->path)
FREE_MLC(app->query_args->file);
app->query_args->state = S_WAIT_SERVER;
break;
}
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <arpa/inet.h>
#include <fcntl.h>
#include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef QUERY_H
#define QUERY_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "dialogue.h"
#include "main.h"
#include <modals.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef SERVER_H
#define SERVER_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef D_TYPES_H
#define D_TYPES_H
+7
View File
@@ -2,4 +2,11 @@
#define D_UTILS_H
#include "d_array.h"
#include "utf8.h"
/* Free if not null and assign NULL */
#define FREE_MLC(arg) \
if (arg != NULL) { \
free(arg); \
arg = NULL; \
}
#endif
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "app.h"
#include <locale.h>
#include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef N_APP_H
#define N_APP_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <ncursesw/ncurses.h>
#include <stdint.h>
#include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef BUTTON_H
#define BUTTON_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <ncursesw/ncurses.h>
#include <stdint.h>
#include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef CHECKBOX_H
#define CHECKBOX_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <ncursesw/ncurses.h>
#include <stdint.h>
#include <string.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef DIALOGUE_H
#define DIALOGUE_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "file_list.h"
#include "../file_processor.h"
#include "../fs.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef FILE_LIST_H
#define FILE_LIST_H
#include <bstrlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <dirent.h>
#include <errno.h>
#include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef FS_FILE_LIST_H
#define FS_FILE_LIST_H
#include <widget_core.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "group.h"
#include "button.h"
#include "checkbox.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef GROUP_H
#define GROUP_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <ncursesw/ncurses.h>
#include <stdint.h>
#include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef INPUT_H
#define INPUT_H
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "progress_bar.h"
#include "app.h"
#include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef PROGRESS_BAR_H
#define PROGRESS_BAR_H
#include <widget_core.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef WIDGET_H
#define WIDGET_H
#include "app.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "widget_core.h"
#include "../main.h"
#include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef WIDGET_CORE_H
#define WIDGET_CORE_H