Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R2 #8

Merged
merged 3 commits into from
Aug 26, 2024
Merged

R2 #8

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/ce/ceconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#ifndef CECONFIG_H
#define CECONFIG_H

#define CE_JSON 1 // include JSON

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_JSON 1 // include JSON

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
4 changes: 2 additions & 2 deletions include/ce/cedt.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#ifndef CEDATETIME_H
#define CEDATETIME_H

#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_DBG_PRINT 0 // print dbg mes

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
46 changes: 23 additions & 23 deletions include/ce/cei2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@
// Reference : http://elinux.org/Interfacing_with_I2C_Devices
/////////////////////////////////////////////////////////////////////////////

#ifndef CE_MACROS_H
#define CE_MACROS_H
#ifndef CEI2C_H
#define CEI2C_H

#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
#endif
#ifndef CE_WINDOWS
#define CE_WINDOWS
#endif
#elif defined(__linux__) || defined(unix) || defined(__unix) || defined(__unix__)
#ifndef CE_LINUX
#define CE_LINUX
#endif
#ifndef CE_LINUX
#define CE_LINUX
#endif
#else
#ifndef CE_NOS
#define CE_NOS
#endif
#ifndef CE_NOS
#define CE_NOS
#endif
#endif

#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64)
#ifndef CE_x86_64
#define CE_x86_64
#endif
#ifndef CE_x86_64
#define CE_x86_64
#endif
#elif defined(__arm__) || defined(_M_ARM)
#ifndef CE_ARM
#define CE_ARM
#endif
#ifndef CE_ARM
#define CE_ARM
#endif
#else
#ifndef CE_NARCH
#define CE_NARCH
#endif
#ifndef CE_NARCH
#define CE_NARCH
#endif
#endif

#endif // CE_MACROS_H

#ifndef CEI2C_H
#define CEI2C_H

#ifdef CE_LINUX
#include <unistd.h>
#include <linux/i2c-dev.h>
Expand Down
4 changes: 2 additions & 2 deletions include/ce/celog.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#ifndef ceLog_H
#define ceLog_H

#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_DBG_PRINT 0 // print dbg mes

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
6 changes: 3 additions & 3 deletions include/ce/cemisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#ifndef CEMISC_H
#define CEMISC_H

#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_DBG_PRINT 0 // print dbg mes

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down Expand Up @@ -240,7 +240,7 @@ inline std::string ceMisc::exepath()
{
#ifdef CE_WINDOWS
char result[MAX_PATH];
return std::string(result, GetModuleFileName(NULL, result, MAX_PATH));
return std::string(result, GetModuleFileNameA(NULL, result, MAX_PATH));
#else
char result[PATH_MAX];
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
Expand Down
6 changes: 3 additions & 3 deletions include/ce/cetcpcli.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#ifndef CETCPCLIENT_H
#define CETCPCLIENT_H

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_WX 1 // include WX
#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
7 changes: 5 additions & 2 deletions include/ce/cetcpsvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

#ifndef CETCPSVR_H
#define CETCPSVR_H

#define CE_WX 1 // include WX
#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H
#define CE_WX 1 // include WX
#define CE_DBG_PRINT 0 // print dbg mes


#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
Expand Down
6 changes: 3 additions & 3 deletions include/ce/ceudp.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#ifndef CEUDP_H
#define CEUDP_H

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_WX 1 // include WX
#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
6 changes: 3 additions & 3 deletions include/ce/cewxcvmisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
#ifndef CEWXCVMISC_H
#define CEWXCVMISC_H

#ifndef CE_MACROS_H
#define CE_MACROS_H

#define CE_WX 1 // include WX
#define CE_CV 1 // include CV
#define CE_DBG_PRINT 0 // print dbg mes

#ifndef CE_MACROS_H
#define CE_MACROS_H

#if defined(_WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS__) || defined(__TOS_WIN__) || defined(__CYGWIN__)
#ifndef CE_WINDOWS
#define CE_WINDOWS
Expand Down
1 change: 0 additions & 1 deletion vcprj/ceutil.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<ClInclude Include="..\include\ce\ceframe.h" />
<ClInclude Include="..\include\ce\cei2c.h" />
<ClInclude Include="..\include\ce\celog.h" />
<ClInclude Include="..\include\ce\ceMacros.h" />
<ClInclude Include="..\include\ce\cemisc.h" />
<ClInclude Include="..\include\ce\cemodbus.h" />
<ClInclude Include="..\include\ce\cepca9535.h" />
Expand Down
3 changes: 0 additions & 3 deletions vcprj/ceutil.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
<ClInclude Include="..\include\ce\ceconf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ce\ceMacros.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\ce\cetcpsvr.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
Loading