This repository was archived by the owner on Feb 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFichier.h
71 lines (58 loc) · 1.55 KB
/
Fichier.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// MODULE: fichier.h
//
#include<string.h>
#ifndef _FICHIER_H
#define _FICHIER_H
#ifdef __cplusplus
extern "C" {
#endif
#define DEBUG_OFF 0
#define DEBUG_INFO 1
#define DEBUG_VERBOSE 2
#define DEBUG_DEBUG 3
#define DEBUG_TXRX 4
extern g_debuglevel;
//////////////////////////////////////////////////////////////////////////////
typedef struct _Param {
struct _Param *Suivant;
char Cle[128];
char Valeur[1024];
} PARAM;
//////////////////////////////////////////////////////////////////////////////
#ifndef FALSE
#define FALSE 0
#define TRUE 1
typedef int BOOL;
#endif
#ifdef WIN32
#define STRICMP _stricmp
#define STRNICMP _strnicmp
#endif
#ifdef LINUX
#define STRICMP strcasecmp
#define STRNICMP strncasecmp
#endif
//////////////////////////////////////////////////////////////////////////////
char g_FichierChemin[256];
char g_FichierNom[256];
char g_FichierLog[256];
//////////////////////////////////////////////////////////////////////////////
#define TYPFIC_LOC 1
#define TYPFIC_CNF 2
#define TYPFIC_LOG 4
#define TYPFIC_DATA 6
//////////////////////////////////////////////////////////////////////////////
void FichierInit(char *Chemin, char *Nom);
void FichierExt(char *Fichier, char *Ext);
void FichierStd(char *Fichier, int Type);
void CheminStd(char *Rep, int Lng, int Type);
int Fcnf_Lire(char *Fichier, PARAM **LstParam);
int Fcnf_Valeur(PARAM *LstParam, char *Cle, char *Valeur);
int Fcnf_Section(PARAM *LstParam, int No, char *Section);
void Flog_Init(char *Fichier);
int Flog_Ecrire(char *Format, ...);
#ifdef __cplusplus
}
#endif
#endif