11 #include "../config.h"
18 # define true (!false)
26 # define my_sleep(x) Sleep(((x) < 1000) ? 1 : ((x) / 1000))
28 # define my_sleep(x) usleep(x)
32 #define MAX(a,b) ((a)>(b)?(a):(b))
34 #define MIN(a,b) ((a)<(b)?(a):(b))
36 /* ------------------------------------------------------------------------- */
40 int GetLine(FILE *File
, char *Line
, int count
);
43 int numbers
[MAX_LINES
*2];
46 void SplitLines(unsigned char *message
, int messagesize
, GSM_Lines
*lines
, unsigned char *whitespaces
, int spaceslen
, bool eot
);
47 char *GetLineString(unsigned char *message
, GSM_Lines lines
, int start
);
48 void CopyLineString(unsigned char *dest
, unsigned char *src
, GSM_Lines lines
, int start
);
50 /* ------------------------------------------------------------------------- */
53 DL_BINARY
= 1, /* Binary transmission dump */
54 DL_TEXT
, /* Text transmission dump */
55 DL_TEXTALL
, /* Everything */
56 DL_TEXTERROR
, /* Only errors */
57 DL_TEXTDATE
, /* Text transmission dump */
58 DL_TEXTALLDATE
, /* Everything */
59 DL_TEXTERRORDATE
/* Only errors */
72 int dbgprintf(const char *format
, ...);
75 # define dbgprintf(a...) do { } while (0)
81 int smfprintf(FILE *f
, const char *format
, ...);
83 void DumpMessage(FILE *df
, const unsigned char *message
, int messagesize
);
85 bool GSM_SetDebugLevel(char *info
, Debug_Info
*di
);
87 /* ------------------------------------------------------------------------- */
90 * Structure used for saving date and time
93 /* Complete year number */
101 /* The difference between local time and GMT */
105 void GSM_GetCurrentDateTime (GSM_DateTime
*Date
);
106 char *OSDateTime (GSM_DateTime dt
, bool TimeZone
);
107 char *OSDate (GSM_DateTime dt
);
108 char *DayOfWeek (int year
, int month
, int day
);
109 time_t Fill_Time_T (GSM_DateTime DT
, int TZ
);
110 void GetTimeDifference (unsigned long diff
, GSM_DateTime
*DT
, bool Plus
, int multi
);
111 void Fill_GSM_DateTime (GSM_DateTime
*Date
, time_t timet
);
112 bool CheckDate (GSM_DateTime
*date
);
113 bool CheckTime (GSM_DateTime
*date
);
117 /* How should editor hadle tabs in this file? Add editor commands here.
118 * vim: noexpandtab sw=8 ts=8 sts=8: