From cc705ed0d4720caf5ac80abdd376e8a67cdfe413 Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Sun, 26 Jun 2022 07:42:44 +0100 Subject: [PATCH] Fix libpcp headers --- src/micetools/lib/libpcp/pcp.h | 6 ------ src/micetools/lib/libpcp/pcpa.h | 4 ++++ src/micetools/lib/libpcp/pcpp.h | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/micetools/lib/libpcp/pcp.h b/src/micetools/lib/libpcp/pcp.h index bca1ded..2e5c75a 100644 --- a/src/micetools/lib/libpcp/pcp.h +++ b/src/micetools/lib/libpcp/pcp.h @@ -47,12 +47,6 @@ typedef struct pcp_send_data { size_t length; } pcp_send_data_t; -// Error helpers -int _pcpaGetErrorFromPcpp(int err); -int _pcppGetErrorFromPcpt(int err); -#define _errP2A(err) _pcpaGetErrorFromPcpp(err) -#define _errT2P(err) _pcppGetErrorFromPcpt(err) - // Errors #define OPEN_MODE_GLOBAL 0 #define OPEN_MODE_1 1 diff --git a/src/micetools/lib/libpcp/pcpa.h b/src/micetools/lib/libpcp/pcpa.h index a898716..6aceab4 100644 --- a/src/micetools/lib/libpcp/pcpa.h +++ b/src/micetools/lib/libpcp/pcpa.h @@ -20,6 +20,9 @@ typedef enum e_pcpa { e_pcpa_unknown = -21, } e_pcpa_t; +e_pcpa_t _pcpaGetErrorFromPcpp(e_pcpp_t err); +#define _errP2A(err) _pcpaGetErrorFromPcpp(err) + struct pcpa; typedef void(pcpa_callback)(struct pcpa* stream, void* data); @@ -66,4 +69,5 @@ e_pcpa_t pcpaSetCallbackFuncBuffer(pcpa_t* stream, pcpa_cb_table_t* callback_tab e_pcpa_t pcpaSetRecvBinaryBuffer(pcpa_t* stream, byte* recv_buffer, size_t len); e_pcpa_t pcpaSetSendBinaryBuffer(pcpa_t* stream, byte* send_buffer, size_t len); pcp_send_data_t* pcpaSetSendPacket(pcpa_t* stream, char* keyword, char* value); +pcp_send_data_t *pcpaAddSendPacket(pcpa_t *stream, char *keyword, char *value); char* pcpaGetCommand(pcpa_t* pcpa, char* command); diff --git a/src/micetools/lib/libpcp/pcpp.h b/src/micetools/lib/libpcp/pcpp.h index 05c84ba..6794e18 100644 --- a/src/micetools/lib/libpcp/pcpp.h +++ b/src/micetools/lib/libpcp/pcpp.h @@ -21,7 +21,7 @@ typedef enum e_pcpp { e_pcpp_unknown = -17, } e_pcpp_t; -e_pcpp_t _pcppGetErrorFromPcpt(int err); +e_pcpp_t _pcppGetErrorFromPcpt(e_pcpt_t err); #define _errT2P(err) _pcppGetErrorFromPcpt(err) typedef struct pcpp {