- Fix Makefiles,
- Comment out all functions exept DS_Library_Open , DS_Library_Close & DS_DataStruct_Open_I, and start to work on it!
This commit is contained in:
12
lib/Makefile
12
lib/Makefile
@@ -1,6 +1,6 @@
|
||||
SRC := libdatatstr.c
|
||||
TARGETS := libdatatstr.a libdatatstr.so
|
||||
FILE_LIB := libdatatstr.a libdatatstr.so
|
||||
SRC := libdatastr.c
|
||||
TARGETS := libdatastr.a libdatastr.so
|
||||
FILE_LIB := libdatastr.a libdatastr.so
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ include ../Makefile.rule
|
||||
|
||||
|
||||
|
||||
DEP += libdatatstr.h ../include/datatstr.h ../../liblog/include/log.h Makefile
|
||||
INCLUDE += -I . -I ../include -I ../../liblog/include
|
||||
DEP += libdatastr.h ../include/datastr.h ../../liblog/include/log.h ../../libnode/include/node.h ../../libshmem/include/shmem.h Makefile
|
||||
INCLUDE += -I . -I ../include -I ../../liblog/include -I ../../libnode/include -I ../../libshmem/include
|
||||
|
||||
ifdef _LIBVER_SUPPORT
|
||||
DEP += ../../libver/ver.h
|
||||
@@ -19,4 +19,4 @@ endif
|
||||
|
||||
|
||||
|
||||
libdatatstr.o : libdatatstr.c $(DEP)
|
||||
libdatastr.o : libdatastr.c $(DEP)
|
||||
|
||||
1492
lib/libdatastr.c
1492
lib/libdatastr.c
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,31 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* libdatastr.h */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* This file is part of LibDataStr. */
|
||||
/* */
|
||||
/* LibDataStr 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 3 of the License, or */
|
||||
/* (at your option) any later version. */
|
||||
/* */
|
||||
/* LibDataStr 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 LibDataStr. If not, see */
|
||||
/* <https://www.gnu.org/licenses/>. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Includes */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -7,7 +35,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <ver.h>
|
||||
|
||||
//#include <ver.h>
|
||||
|
||||
#include <node.h>
|
||||
#include <datastr.h>
|
||||
|
||||
@@ -50,48 +80,48 @@ typedef struct {
|
||||
char * Name;
|
||||
} DST_DataStruct;
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Fonctions privées de la librairie */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Fonctions privées de la librairie */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Création d'un sémaphore pour gérer l'ouverture d'une data structure */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Création d'un sémaphore pour gérer l'ouverture d'une data structure */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
DST_Status DS_Semaphore_Create (NDT_Root * Root);
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Opération sur un sémaphore */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Opération sur un sémaphore */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
DST_Status DS_Semaphore_Operate (int, struct sembuf *, unsigned int);
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Fonction d'allocation attachée à une structure de données : */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Fonction d'allocation attachée à une structure de données : */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
DST_Status DS_DataStruct_Alloc ( size_t Size, void ** Ptr, void * Data );
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Fonction de désallocation attachée à une structure de données : */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Fonction de désallocation attachée à une structure de données : */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
DST_Status DS_DataStruct_Free ( void * Ptr, void * Data );
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Routine d'affichage d'un message d'erreur */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Routine d'affichage d'un message d'erreur */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
void DS_Error_Print ( void );
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Pour préfixer les noms de heap avec l'identifiant de la librairie */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Pour préfixer les noms de heap avec l'identifiant de la librairie */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
static char * DS_Name_Prefix (const char * Name);
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Teste si une data structure a déjà été ouverte par le processus courant */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Teste si une data structure a déjà été ouverte par le processus courant */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
DST_Status DS_DataStruct_IsOpen (const char * DS_Name, NDT_Root ** Root);
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/* Fonction manager de la liste des DS ouvertes */
|
||||
/*------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Fonction manager de la liste des DS ouvertes */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
NDT_Status DS_OpenedDS_List_Manager (va_list Args);
|
||||
|
||||
Reference in New Issue
Block a user