author | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
commit | 50ab40e1e02ad7c65c17a78d08116a808b1257aa (patch) (unidiff) | |
tree | 0d1939e2297fa7bbd8e1f2030f154463854164c6 /gammu/emb/common/misc/misc.h | |
parent | cf8616f64f20e5448d4ff644f7cc15750cf3f85f (diff) | |
download | kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.zip kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.gz kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.bz2 |
updated to latest gammu version
-rw-r--r-- | gammu/emb/common/misc/misc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gammu/emb/common/misc/misc.h b/gammu/emb/common/misc/misc.h index 8b46170..c461001 100644 --- a/gammu/emb/common/misc/misc.h +++ b/gammu/emb/common/misc/misc.h | |||
@@ -1,29 +1,33 @@ | |||
1 | /* (c) 2002-2004 by Marcin Wiacek */ | 1 | /* (c) 2002-2004 by Marcin Wiacek */ |
2 | 2 | ||
3 | #ifndef __misc_h | 3 | #ifndef __misc_h |
4 | #define __misc_h | 4 | #define __misc_h |
5 | 5 | ||
6 | #if defined(_MSC_VER) && defined(__cplusplus) | ||
7 | extern "C" { | ||
8 | #endif | ||
9 | |||
6 | #include <stdio.h> | 10 | #include <stdio.h> |
7 | #include <time.h> | 11 | #include <time.h> |
8 | #ifdef WIN32 | 12 | #ifdef WIN32 |
9 | # include <windows.h> | 13 | # include <windows.h> |
10 | #endif | 14 | #endif |
11 | 15 | ||
12 | #include "../config.h" | 16 | #include "../config.h" |
13 | 17 | ||
14 | #ifndef __cplusplus | 18 | #ifndef __cplusplus |
15 | #ifndef false | 19 | #ifndef false |
16 | # define false 0 | 20 | # define false 0 |
17 | #endif | 21 | #endif |
18 | #ifndef true | 22 | #ifndef true |
19 | # define true !0 | 23 | # define true !0 |
20 | #endif | 24 | #endif |
21 | #ifndef bool | 25 | #ifndef bool |
22 | # define boolchar | 26 | # define boolchar |
23 | #endif | 27 | #endif |
24 | #endif /* __cplusplus */ | 28 | #endif /* __cplusplus */ |
25 | 29 | ||
26 | #ifdef WIN32 | 30 | #ifdef WIN32 |
27 | # define my_sleep(x) ((x)<1000 ? Sleep(1) : Sleep((x)/1000)) | 31 | # define my_sleep(x) ((x)<1000 ? Sleep(1) : Sleep((x)/1000)) |
28 | #else | 32 | #else |
29 | # define my_sleep(x) usleep(x) | 33 | # define my_sleep(x) usleep(x) |
@@ -109,29 +113,33 @@ typedef struct { | |||
109 | unsigned int Day; | 113 | unsigned int Day; |
110 | /** | 114 | /** |
111 | * January = 1, February = 2, etc. | 115 | * January = 1, February = 2, etc. |
112 | */ | 116 | */ |
113 | unsigned int Month; | 117 | unsigned int Month; |
114 | /** | 118 | /** |
115 | * Complete year number. Not 03, but 2003 | 119 | * Complete year number. Not 03, but 2003 |
116 | */ | 120 | */ |
117 | unsigned int Year; | 121 | unsigned int Year; |
118 | } GSM_DateTime; | 122 | } GSM_DateTime; |
119 | 123 | ||
120 | void GSM_GetCurrentDateTime (GSM_DateTime *Date); | 124 | void GSM_GetCurrentDateTime (GSM_DateTime *Date); |
121 | char *OSDateTime (GSM_DateTime dt, bool TimeZone); | 125 | char *OSDateTime (GSM_DateTime dt, bool TimeZone); |
122 | char *OSDate (GSM_DateTime dt); | 126 | char *OSDate (GSM_DateTime dt); |
123 | char *DayOfWeek (int year, int month, int day); | 127 | char *DayOfWeek (int year, int month, int day); |
124 | time_t Fill_Time_T (GSM_DateTime DT, int TZ); | 128 | time_t Fill_Time_T (GSM_DateTime DT, int TZ); |
125 | void GetTimeDifference (unsigned long diff, GSM_DateTime *DT, bool Plus, int multi); | 129 | void GetTimeDifference (unsigned long diff, GSM_DateTime *DT, bool Plus, int multi); |
126 | void Fill_GSM_DateTime (GSM_DateTime *Date, time_t timet); | 130 | void Fill_GSM_DateTime (GSM_DateTime *Date, time_t timet); |
127 | bool CheckDate (GSM_DateTime *date); | 131 | bool CheckDate (GSM_DateTime *date); |
128 | bool CheckTime (GSM_DateTime *date); | 132 | bool CheckTime (GSM_DateTime *date); |
129 | 133 | ||
130 | char *GetCompiler(void); | 134 | char *GetCompiler(void); |
131 | char *GetOS(void); | 135 | char *GetOS(void); |
132 | 136 | ||
137 | #if defined(_MSC_VER) && defined(__cplusplus) | ||
138 | } | ||
139 | #endif | ||
140 | |||
133 | #endif | 141 | #endif |
134 | 142 | ||
135 | /* How should editor hadle tabs in this file? Add editor commands here. | 143 | /* How should editor hadle tabs in this file? Add editor commands here. |
136 | * vim: noexpandtab sw=8 ts=8 sts=8: | 144 | * vim: noexpandtab sw=8 ts=8 sts=8: |
137 | */ | 145 | */ |