forked from metin2/server
Added support for CLion, removed a lot of unused code in preparation of the rewriting of the network stack
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TEA is a 64-bit symmetric block cipher with a 128-bit key, developed
|
||||
by David J. Wheeler and Roger M. Needham, and described in their
|
||||
paper at <URL:http://www.cl.cam.ac.uk/ftp/users/djw3/tea.ps>.
|
||||
|
||||
This implementation is based on their code in
|
||||
<URL:http://www.cl.cam.ac.uk/ftp/users/djw3/xtea.ps> */
|
||||
|
||||
extern int TEA_Encrypt(DWORD *dest, const DWORD *src, const DWORD *key, int size);
|
||||
extern int TEA_Decrypt(DWORD *dest, const DWORD *src, const DWORD *key, int size);
|
||||
|
||||
extern int GOST_Encrypt(DWORD * DstBuffer, const DWORD * SrcBuffer, const DWORD * KeyAddress, DWORD Length, DWORD *IVector);
|
||||
extern int GOST_Decrypt(DWORD * DstBuffer, const DWORD * SrcBuffer, const DWORD * KeyAddress, DWORD Length, DWORD *IVector);
|
||||
|
||||
extern int DES_Encrypt(DWORD *DstBuffer, const DWORD * SrcBuffer, const DWORD *KeyAddress, DWORD Length, DWORD *IVector);
|
||||
extern int DES_Decrypt(DWORD *DstBuffer, const DWORD * SrcBuffer, const DWORD *KeyAddress, DWORD Length, DWORD *IVector);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
@ -1,31 +0,0 @@
|
||||
#ifndef __INC_LIBTHECORE_HANGUL_H__
|
||||
#define __INC_LIBTHECORE_HANGUL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __WIN32__
|
||||
#define isdigit iswdigit
|
||||
#define isspace iswspace
|
||||
#endif
|
||||
|
||||
#define ishan(ch) (((ch) & 0xE0) > 0x90)
|
||||
#define ishanasc(ch) (isascii(ch) || ishan(ch))
|
||||
#define ishanalp(ch) (isalpha(ch) || ishan(ch))
|
||||
#define isnhdigit(ch) (!ishan(ch) && isdigit(ch))
|
||||
#define isnhspace(ch) (!ishan(ch) && isspace(ch))
|
||||
|
||||
extern const char * first_han(const BYTE * str); // ù<><C3B9>° <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><> <20>̾<EFBFBD> <20><>/<2F><>/<2F><>/..<2E><> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
extern int check_han(const char * str); // <20>ѱ<EFBFBD><D1B1≯<EFBFBD> true <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> üũ
|
||||
extern int is_hangul(const BYTE * str); // <20>ѱ<EFBFBD><D1B1≯<EFBFBD> true (2<><32><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> üũ)
|
||||
extern int under_han(const void * orig); // <20><>ħ<EFBFBD><C4A7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> true
|
||||
|
||||
#define UNDER(str) under_han(str)
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Filename: kstbl.h
|
||||
* Description: KS <20>ϼ<EFBFBD><CFBC><EFBFBD> 2350<35><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
||||
*
|
||||
* Author: <20><><EFBFBD><EFBFBD> (server), myevan (Client)
|
||||
*/
|
||||
#ifndef __KSTBL_H__
|
||||
#define __KSTBL_H__
|
||||
extern unsigned KStbl[2350];
|
||||
#endif
|
@ -1,23 +0,0 @@
|
||||
#ifndef __INC_LIBTHECORE_MEMCPY_H__
|
||||
#define __INC_LIBTHECORE_MEMCPY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#ifdef __LIBTHECORE__
|
||||
void thecore_find_best_memcpy();
|
||||
#endif
|
||||
|
||||
#ifndef __WIN32__
|
||||
extern void *(*thecore_memcpy) (void * to, const void * from, size_t len);
|
||||
#else
|
||||
#include <cstring>
|
||||
#define thecore_memcpy memcpy
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
@ -132,14 +132,10 @@ inline double rint(double x)
|
||||
#include "heart.h"
|
||||
#include "fdwatch.h"
|
||||
#include "socket.h"
|
||||
#include "kstbl.h"
|
||||
#include "hangul.h"
|
||||
#include "buffer.h"
|
||||
#include "signal.h"
|
||||
#include "log.h"
|
||||
#include "main.h"
|
||||
#include "utils.h"
|
||||
#include "crypt.h"
|
||||
#include "memcpy.h"
|
||||
|
||||
#endif // __INC_LIBTHECORE_STDAFX_H__
|
||||
|
@ -1,82 +0,0 @@
|
||||
#ifndef __FreeBSD__
|
||||
|
||||
/*
|
||||
* luau (Lib Update/Auto-Update): Simple Update Library
|
||||
* Copyright (C) 2003 David Eklund
|
||||
*
|
||||
* - This library is free software; you can redistribute it and/or -
|
||||
* - modify it under the terms of the GNU Lesser General Public -
|
||||
* - License as published by the Free Software Foundation; either -
|
||||
* - version 2.1 of the License, or (at your option) any later version. -
|
||||
* - -
|
||||
* - This library is distributed in the hope that it will be useful, -
|
||||
* - but WITHOUT ANY WARRANTY; without even the implied warranty of -
|
||||
* - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -
|
||||
* - Lesser General Public License for more details. -
|
||||
* - -
|
||||
* - You should have received a copy of the GNU Lesser General Public -
|
||||
* - License along with this library; if not, write to the Free Software -
|
||||
* - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -
|
||||
*/
|
||||
|
||||
/*
|
||||
* md5.h and md5.c are based off of md5hl.c, md5c.c, and md5.h from libmd, which in turn are
|
||||
* based off the FreeBSD libmd library. Their respective copyright notices follow:
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code implements the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
* written by Colin Plumb in 1993, no copyright is claimed.
|
||||
* This code is in the public domain; do with it what you wish.
|
||||
*
|
||||
* Equivalent code is available from RSA Data Security, Inc.
|
||||
* This code has been tested against that, and is equivalent,
|
||||
* except that you don't need to include two pages of legalese
|
||||
* with every copy.
|
||||
*/
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* "THE BEER-WARE LICENSE" (Revision 42):
|
||||
* <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
|
||||
* can do whatever you want with this stuff. If we meet some day, and you think
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: md5.h,v 1.1.1.1 2004/04/02 05:11:38 deklund2 Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MD5_H
|
||||
#define MD5_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MD5_HASHBYTES 16
|
||||
|
||||
typedef struct MD5Context {
|
||||
uint32_t buf[4];
|
||||
uint32_t bits[2];
|
||||
unsigned char in[64];
|
||||
} MD5_CTX;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void MD5Init(MD5_CTX *context);
|
||||
void MD5Update(MD5_CTX *context, unsigned char const *buf, unsigned len);
|
||||
void MD5Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context);
|
||||
void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
|
||||
char* MD5End(MD5_CTX *, char *);
|
||||
|
||||
char* lutil_md5_file(const char *filename, char *buf);
|
||||
char* lutil_md5_data(const unsigned char *data, unsigned int len, char *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MD5_H */
|
||||
|
||||
#endif // #ifndef __FreeBSD__
|
Reference in New Issue
Block a user