mirror of
https://github.com/0Nera/BMOSP.git
synced 2025-03-30 13:13:22 +03:00
Создание библиотеки модулей
This commit is contained in:
parent
8a32d4070e
commit
25b77bb8bb
18
modlib/lib/modstd.c
Normal file
18
modlib/lib/modstd.c
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* modstd.c
|
||||
* Стандартная библиотека модулей
|
||||
*
|
||||
* Вспомогательные функции для работы с модулями
|
||||
*
|
||||
*/
|
||||
|
||||
#include <modstd.h>
|
||||
|
||||
int m_strcmp(const char *s1, const char *s2) {
|
||||
while (*s1 == *s2) {
|
||||
if (*s1 == '\0') { return 0; }
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
return *s1 - *s2;
|
||||
}
|
22
modlib/modstd.h
Normal file
22
modlib/modstd.h
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* modstd.h
|
||||
* Стандартная библиотека для модулей
|
||||
*
|
||||
* Заголовочный файл содержащий определения стандартной библиотеки модулей
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MODSTD_H
|
||||
#define MODSTD_H
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int64_t;
|
||||
|
||||
#endif // modstd.h
|
Loading…
x
Reference in New Issue
Block a user