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
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Oleksandr Zhylin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+1 -1
View File
@@ -3,7 +3,7 @@
## Current: ## Current:
- [ ] PageUp/PageDown key functionality in lists - [ ] PageUp/PageDown key functionality in lists
- [ ] File upload multiline description (window) - [ ] File upload multiline description (window)
- [ ] Permission checkboxes for file upload/edit - [x] Permission checkboxes for file upload/edit
- [ ] Check file upload - [ ] Check file upload
- [ ] More intuitive navigation between nested groups (by pressing left and right buttons) - [ ] More intuitive navigation between nested groups (by pressing left and right buttons)
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#include <stdint.h> #include <stdint.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "main.h" #include "main.h"
#include <widget.h> #include <widget.h>
#include <arpa/inet.h> #include <arpa/inet.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef CONNECTION_H #ifndef CONNECTION_H
#define CONNECTION_H #define CONNECTION_H
#include "main.h" #include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <modals.h> #include <modals.h>
#include <widget.h> #include <widget.h>
#include "main.h" #include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef DRAW_MODAL_H #ifndef DRAW_MODAL_H
#define DRAW_MODAL_H #define DRAW_MODAL_H
#include <widget.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 <arpa/inet.h>
#include <fcntl.h> #include <fcntl.h>
#include <netinet/in.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 #ifndef FILE_PROCESSOR_H
#define FILE_PROCESSOR_H #define FILE_PROCESSOR_H
#include "main.h" #include "main.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef LOC_FS_H #ifndef LOC_FS_H
#define 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 <arpa/inet.h>
#include <ncursesw/ncurses.h> #include <ncursesw/ncurses.h>
#include <netinet/in.h> #include <netinet/in.h>
@@ -9,12 +12,12 @@
#include <termios.h> #include <termios.h>
#include <unistd.h> #include <unistd.h>
#include <widget.h> #include <widget.h>
#include <modals.h>
#include "connection.h" #include "connection.h"
#include "file_list.h" #include "file_list.h"
#include "main.h" #include "main.h"
#include "query.h" #include "query.h"
#include <modals.h>
uint32_t m_id = 0; uint32_t m_id = 0;
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef MAIN_H #ifndef MAIN_H
#define MAIN_H #define MAIN_H
+6 -6
View File
@@ -8,6 +8,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <widget.h> #include <widget.h>
#include <utils.h>
void upload_props_dialogue_modal_cb(callback_args_t *args) { void upload_props_dialogue_modal_cb(callback_args_t *args) {
callback_args_t d_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 *reg_cbx = (checkbox_t *)d->g_content->elements[0].element;
checkbox_t *anon_cbx = (checkbox_t *)d->g_content->elements[1].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; checkbox_t *comp_cbx = (checkbox_t *)d->g_content->elements[2].element;
int32_t privileges = 0; int32_t privileges = 0;
if (anon_cbx->value == true) privileges |= 1; if (anon_cbx->value == true) privileges |= 1;
if (reg_cbx->value == true) privileges |= 2; if (reg_cbx->value == true) privileges |= 2;
if (comp_cbx->value == true) privileges |= 4; if (comp_cbx->value == true) privileges |= 4;
switch (d_args.resp_data.val.val.num) { switch (d_args.resp_data.val.val.num) {
case 1: case 1:
query_len = query_len =
@@ -41,12 +44,9 @@ void upload_props_dialogue_modal_cb(callback_args_t *args) {
write(app->query_args->sd, query, query_len); write(app->query_args->sd, query, query_len);
break; break;
case 2: case 2:
if (app->query_args->file->name != NULL) FREE_MLC(app->query_args->file->name);
free(app->query_args->file->name); FREE_MLC(app->query_args->file->path)
if (app->query_args->file->path != NULL) FREE_MLC(app->query_args->file);
free(app->query_args->file->path);
free(app->query_args->file);
app->query_args->file = NULL;
app->query_args->state = S_WAIT_SERVER; app->query_args->state = S_WAIT_SERVER;
break; break;
} }
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <arpa/inet.h> #include <arpa/inet.h>
#include <fcntl.h> #include <fcntl.h>
#include <ncursesw/ncurses.h> #include <ncursesw/ncurses.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef QUERY_H #ifndef QUERY_H
#define 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 "dialogue.h"
#include "main.h" #include "main.h"
#include <modals.h> #include <modals.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef SERVER_H #ifndef SERVER_H
#define 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 #ifndef D_TYPES_H
#define D_TYPES_H #define D_TYPES_H
+7
View File
@@ -2,4 +2,11 @@
#define D_UTILS_H #define D_UTILS_H
#include "d_array.h" #include "d_array.h"
#include "utf8.h" #include "utf8.h"
/* Free if not null and assign NULL */
#define FREE_MLC(arg) \
if (arg != NULL) { \
free(arg); \
arg = NULL; \
}
#endif #endif
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include "app.h" #include "app.h"
#include <locale.h> #include <locale.h>
#include <ncursesw/ncurses.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 #ifndef N_APP_H
#define 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 <ncursesw/ncurses.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef BUTTON_H #ifndef BUTTON_H
#define 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 <ncursesw/ncurses.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef CHECKBOX_H #ifndef CHECKBOX_H
#define 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 <ncursesw/ncurses.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef DIALOGUE_H #ifndef DIALOGUE_H
#define 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_list.h"
#include "../file_processor.h" #include "../file_processor.h"
#include "../fs.h" #include "../fs.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef FILE_LIST_H #ifndef FILE_LIST_H
#define FILE_LIST_H #define FILE_LIST_H
#include <bstrlib.h> #include <bstrlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <ncursesw/ncurses.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 #ifndef FS_FILE_LIST_H
#define FS_FILE_LIST_H #define FS_FILE_LIST_H
#include <widget_core.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 "group.h"
#include "button.h" #include "button.h"
#include "checkbox.h" #include "checkbox.h"
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef GROUP_H #ifndef GROUP_H
#define 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 <ncursesw/ncurses.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef INPUT_H #ifndef INPUT_H
#define 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 "progress_bar.h"
#include "app.h" #include "app.h"
#include <ncursesw/ncurses.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 #ifndef PROGRESS_BAR_H
#define PROGRESS_BAR_H #define PROGRESS_BAR_H
#include <widget_core.h> #include <widget_core.h>
+3
View File
@@ -1,3 +1,6 @@
/* SPDX-License-Identifier: MIT */
/* Copyright (c) 2026 Oleksandr Zhylin */
#ifndef WIDGET_H #ifndef WIDGET_H
#define WIDGET_H #define WIDGET_H
#include "app.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 "widget_core.h"
#include "../main.h" #include "../main.h"
#include <ncursesw/ncurses.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 #ifndef WIDGET_CORE_H
#define WIDGET_CORE_H #define WIDGET_CORE_H