add MIT license
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "client.h"
|
||||
#include "file_p.h"
|
||||
#include "main.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef CLIENT_H
|
||||
#define CLIENT_H
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "db.h"
|
||||
#include "main.h"
|
||||
#include <endian.h>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef DB_H
|
||||
#define DB_H
|
||||
#include "main.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "file_p.h"
|
||||
#include "db.h"
|
||||
#include "main.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef FILEP_H
|
||||
#define FILEP_H
|
||||
#include "main.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "main.h"
|
||||
#include "server.h"
|
||||
#include "db.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
#include <stddef.h>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "main.h"
|
||||
#include "session.h"
|
||||
#include "user.h"
|
||||
|
||||
+5
-2
@@ -1,8 +1,11 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef SERVER_H
|
||||
#define SERVER_H
|
||||
#include "main.h"
|
||||
int start_server();
|
||||
char *get_welcome_mes();
|
||||
int start_server(void);
|
||||
char *get_welcome_mes(void);
|
||||
void server_main_loop(server_data_t *);
|
||||
void prepare_start(int argc, char *argv[]);
|
||||
#endif
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "session.h"
|
||||
#include "client.h"
|
||||
#include "db.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef SESSION_H
|
||||
#define SESSION_H
|
||||
#include "main.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef D_TYPES_H
|
||||
#define D_TYPES_H
|
||||
|
||||
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#include "db.h"
|
||||
#include "main.h"
|
||||
#include "session.h"
|
||||
@@ -8,7 +11,7 @@
|
||||
|
||||
int32_t create_user(session *sess, char *line) {
|
||||
i_db_user_create p;
|
||||
uint32_t privileges;
|
||||
int32_t privileges;
|
||||
int32_t res;
|
||||
if (sscanf(line, "register %s %s %s", p.uname, p.pass, p.email) == 3) {
|
||||
res = db_user_create(&p);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/* Copyright (c) 2026 Oleksandr Zhylin */
|
||||
|
||||
#ifndef USER_H
|
||||
#define USER_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user