3dview_cst.h
3.11 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef _3DVIEW_CST_H
#define _3DVIEW_CST_H "_3dview_cst"
/* RCS $Id: 3dview_cst.h 14 2013-11-28 16:02:03Z lbeigbeder $ */
/*--------------------------------------------------------------------------
* NAME : 3dview_cst.h
* FUNCTION : contains some general constants
* ORIGIN : GFI INFORMATIQUE
* PROJECT : 3DView multi-missions
* -------------------------------------------------------------------------
* HISTORY
* VERSION : 25/05/2009 : LBE
* Creation
* END-HISTORY
* ------------------------------------------------------------------------*/
/* allocation macros */
#define ALLOUE(type,nb) (type *) malloc(sizeof(type) * (nb + 1))
#define REALLOUE(var,type,nb) (type *) realloc(var,sizeof(type) * (nb + 1))
#define LIBERE(type,pt) free ((type*)pt)
/* time manipulation macro */
#define DIFF_TIME(u,v) ((u>=v?u-v:v-u))
/* mathematical MACROS */
#define MAX(i1,i2) (i1>i2)?i1:i2
#define MIN(i1,i2) (i1>i2)?i2:i1
/*------ constants ------*/
#define LONG_SIZE 2001 /* size max for a long string */
#define MIDDLE_SIZE 501 /* size max for a middle string */
#define SHORT_SIZE 51 /* size max for a short string */
#define DATE_SIZE 30 /* size max for a date string */
#define CGI_NAME_LEN 25 /* Max CGI names length*/
#ifdef M3DV_PLATFORM_WIN
#define SEPARATOR "\\" /* Separator caracter for a path*/
#else
#define SEPARATOR "/" /* Separator caracter for a path*/
#endif
#define MAX_PATH_LEN 128 /* max length for FS pathes */
#define OK_LABEL "OK" /* Label OK */
#define NOK_LABEL "NOK" /* Label NOK */
#define MODE_SERVER 1 /* 1 if server, 2 if standalone */
#define CQUOT (unsigned char)215 /* character used to replace ' */
/* Jours juliens au 01/01/1970 minuit */
#define DATE_DAYS_19700101 2440587.5
#define DATE_SEC_19700101 ((ULLONG)210866760000)
/* Jours juliens au 01/01/2003 minuit */
#define DATE_DAYS_20030101 2452640.5
#define DATE_SEC_20030101 ((ULLONG)211908139200)
/* Jours juliens modifies 17/11/1858 minuit */
#define DATE_DAYS_MJD 2400000.5
#define DATE_SEC_MJD ((ULLONG)207360043200)
/* Jours juliens CNES 01/01/1950 minuit */
#define DATE_DAYS_CJD 2433282.5
#define DATE_SEC_CJD ((ULLONG)210235564800)
/* Jours TAI au 01/01/1958 minuit */
#define DATE_DAYS_TAI 2436204.5
#define DATE_SEC_TAI ((ULLONG) 210488068800)
/*----- HTML environnement variables -----*/
#define POST "POST"
#define GET "GET"
#define SCRIPT_NAME "SCRIPT_NAME"
#define REMOTE_USER "REMOTE_USER"
#define REMOTE_HOST "REMOTE_HOST"
#define REMOTE_ADDR "REMOTE_ADDR"
#define QUERY_STRING "QUERY_STRING"
#define REQUEST_METHOD "REQUEST_METHOD"
#define CONTENT_TYPE "CONTENT_TYPE"
#define CONTENT_LENGTH "CONTENT_LENGTH"
#define PATH_INFO "PATH_INFO"
#define SERVER_NAME "SERVER_NAME"
#define SERVER_PORT "SERVER_PORT"
#define HTTP_PASSWD_FILE "HTTP_PASSWD_FILE"
#define MM3DVIEW_LOG_FILE "M3DV_LOG_FILE"
/*----- other environnement variables -----*/
/*----- Entry Structure variables -----*/
#define NB_MAX_PARAM 2500
#endif