58 lines
1.6 KiB
C
58 lines
1.6 KiB
C
/* utils.h - This file is a part of NutsOS
|
|
*
|
|
* NutsOS
|
|
* Copyright (C) 2013 Free Software Foundation, Inc.
|
|
*
|
|
* NutsOS is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* NutsOS 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with NutsOS; If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Valentin Verdier <valentin.verdier03@gmail.com>
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef UTILS_H
|
|
#define UTILS_H
|
|
|
|
#include "types.h"
|
|
|
|
void memcopy(char*, char*, unsigned int);
|
|
int strcmp(char*, char*);
|
|
void IntToChar(bits32, char*, int);
|
|
unsigned int expo(unsigned int, unsigned int);
|
|
|
|
struct List
|
|
{
|
|
unsigned int entryCount;
|
|
struct ElementModel *firstEntry;
|
|
struct ElementModel *lastEntry;
|
|
};
|
|
|
|
typedef struct List T_LinkedList;
|
|
|
|
struct ElementModel
|
|
{
|
|
struct ElementModel *next;
|
|
struct ElementModel *prev;
|
|
}__attribute__((packed));
|
|
|
|
void LinkedListPushFront(void*, T_LinkedList*);
|
|
void LinkedListPopFront(T_LinkedList*);
|
|
void LinkedListPushBack(void*, T_LinkedList*);
|
|
void LinkedListPopBack(T_LinkedList*);
|
|
void LinkedListInsert(void*, void*, void*, T_LinkedList*);
|
|
void LinkedListRemove(void*, T_LinkedList*);
|
|
|
|
void InsertElement(void*, void*, void*);
|
|
void RemoveElement(void*);
|
|
#endif
|