Skip to content

Commit d6d1d90

Browse files
committed
bumb to 1.2.1
1 parent dcd3834 commit d6d1d90

2 files changed

Lines changed: 43 additions & 17 deletions

File tree

src/snap7.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*=============================================================================|
2-
| PROJECT SNAP7 1.1.0 |
2+
| PROJECT SNAP7 1.2.0 |
33
|==============================================================================|
4-
| Copyright (C) 2013, Davide Nardella |
4+
| Copyright (C) 2013, 2014 Davide Nardella |
55
| All rights reserved. |
66
|==============================================================================|
77
| SNAP7 is free software: you can redistribute it and/or modify |
@@ -10,7 +10,7 @@
1010
| (at your option) any later version. |
1111
| |
1212
| It means that you can distribute your commercial software linked with |
13-
| SMART7 without the requirement to distribute the source code of your |
13+
| SNAP7 without the requirement to distribute the source code of your |
1414
| application and without the requirement that your application be itself |
1515
| distributed under LGPL. |
1616
| |

src/snap7.h

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*=============================================================================|
2-
| PROJECT SNAP7 1.1.0 |
2+
| PROJECT SNAP7 1.2.0 |
33
|==============================================================================|
4-
| Copyright (C) 2013, Davide Nardella |
4+
| Copyright (C) 2013, 2014 Davide Nardella |
55
| All rights reserved. |
66
|==============================================================================|
77
| SNAP7 is free software: you can redistribute it and/or modify |
@@ -10,7 +10,7 @@
1010
| (at your option) any later version. |
1111
| |
1212
| It means that you can distribute your commercial software linked with |
13-
| SMART7 without the requirement to distribute the source code of your |
13+
| SNAP7 without the requirement to distribute the source code of your |
1414
| application and without the requirement that your application be itself |
1515
| distributed under LGPL. |
1616
| |
@@ -53,7 +53,11 @@
5353
# define OS_BSD
5454
#endif
5555

56-
#if defined(PLATFORM_UNIX)
56+
#if defined(__APPLE__)
57+
# define OS_OSX
58+
#endif
59+
60+
#if defined(PLATFORM_UNIX) || defined(OS_OSX)
5761
# include <unistd.h>
5862
# if defined(_POSIX_VERSION)
5963
# define POSIX
@@ -96,12 +100,34 @@ extern "C" {
96100
// C exact length types
97101
//---------------------------------------------------------------------------
98102
#ifndef __cplusplus
99-
typedef unsigned char uint8_t; // 8 bit unsigned integer
100-
typedef unsigned short uint16_t; // 16 bit unsigned integer
101-
typedef unsigned int uint32_t; // 32 bit unsigned integer
102-
#if !defined(_UINTPTR_T_DEFINED) && !defined(OS_SOLARIS) && !defined(OS_BSD)
103+
104+
#ifdef OS_BSD
105+
# include <stdint.h>
106+
# include <time.h>
107+
#endif
108+
109+
#ifdef OS_OSX
110+
# include <stdint.h>
111+
# include <time.h>
112+
#endif
113+
114+
#ifdef OS_SOLARIS
115+
# include <stdint.h>
116+
# include <time.h>
117+
#endif
118+
119+
#if defined(_UINTPTR_T_DEFINED)
120+
# include <stdint.h>
121+
# include <time.h>
122+
#endif
123+
124+
#if !defined(_UINTPTR_T_DEFINED) && !defined(OS_SOLARIS) && !defined(OS_BSD) && !defined(OS_OSX)
125+
typedef unsigned char uint8_t; // 8 bit unsigned integer
126+
typedef unsigned short uint16_t; // 16 bit unsigned integer
127+
typedef unsigned int uint32_t; // 32 bit unsigned integer
103128
typedef unsigned long uintptr_t;// 64 bit unsigned integer
104129
#endif
130+
105131
#endif
106132

107133
#ifdef OS_WINDOWS
@@ -831,13 +857,13 @@ class TS7Server
831857
int Stop();
832858
int GetParam(int ParamNumber, void *pValue);
833859
int SetParam(int ParamNumber, void *pValue);
834-
// Events
835-
int SetEventsCallback(pfn_SrvCallBack PCallBack, void *UsrPtr);
836-
int SetReadEventsCallback(pfn_SrvCallBack PCallBack, void *UsrPtr);
837-
bool PickEvent(TSrvEvent *pEvent);
838-
void ClearEvents();
860+
// Events
861+
int SetEventsCallback(pfn_SrvCallBack PCallBack, void *UsrPtr);
862+
int SetReadEventsCallback(pfn_SrvCallBack PCallBack, void *UsrPtr);
863+
bool PickEvent(TSrvEvent *pEvent);
864+
void ClearEvents();
839865
longword GetEventsMask();
840-
longword GetLogMask();
866+
longword GetLogMask();
841867
void SetEventsMask(longword Mask);
842868
void SetLogMask(longword Mask);
843869
// Resources

0 commit comments

Comments
 (0)