Skip to content

Commit

Permalink
Add special comments needed for source-code amalgamation.
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Feb 18, 2022
1 parent 3033b6d commit 64ecf49
Show file tree
Hide file tree
Showing 25 changed files with 58 additions and 8 deletions.
2 changes: 2 additions & 0 deletions flsemu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
#include <stdlib.h>
#include <string.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "flsemu.h"
/*!!! END-INCLUDE-SECTION !!!*/

/*
** Local Defines.
Expand Down
2 changes: 2 additions & 0 deletions flsemu/flsemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
#include <stdint.h>
#include <stdbool.h>
#else
/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/
#endif


Expand Down
6 changes: 3 additions & 3 deletions flsemu/posix/flsemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#include <string.h>
#include <unistd.h>


#include <flsemu.h>
#include <flsemu.h>
/*!!! START-INCLUDE-SECTION !!!*/
#include "flsemu.h"
/*!!! END-INCLUDE-SECTION !!!*/

#define handle_error(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)
#define FLSEMU_ERASED_VALUE (0xff) /**< Value of an erased Flash/EEPROM cell. */
Expand Down
3 changes: 3 additions & 0 deletions flsemu/win/flsemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
#include <assert.h>
#include <string.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "flsemu.h"
#include "xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/


#define _WIN32_WINNT 0x601
#include <Windows.h>
Expand Down
2 changes: 2 additions & 0 deletions inc/xcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@

#include <assert.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp_types.h"
#include "xcp_macros.h"
#include "xcp_util.h"
/*!!! END-INCLUDE-SECTION !!!*/

#define XCP_PROTOCOL_VERSION_MAJOR (1)
#define XCP_PROTOCOL_VERSION_RELEASE (0)
Expand Down
3 changes: 3 additions & 0 deletions inc/xcp_ow.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#define XCP_OW_H_INCLUDED

#include <Windows.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/

/*
** Global Types.
Expand Down
2 changes: 2 additions & 0 deletions inc/xcp_terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#if !defined(__TERMINAL_H)
#define __TERMINAL_H

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/


#endif /* __TERMINAL_H */
3 changes: 2 additions & 1 deletion inc/xcp_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ extern "C"
#endif /* __cplusplus */
#endif /* XCP_EXTERN_C_GUARDS */


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp_types.h"
/*!!! END-INCLUDE-SECTION !!!*/

void XcpUtl_MemCopy(void * dst, void const * src, uint32_t len);
void XcpUtl_MemSet(void * dest, uint8_t fill_char, uint32_t len);
Expand Down
2 changes: 2 additions & 0 deletions src/hw/arduino/hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#include <Arduino.h>
#include <stdint.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/

#if 0
typedef struct tagHwStateType {
Expand Down
2 changes: 2 additions & 0 deletions src/hw/linux/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
#include <time.h>
#include <unistd.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/

/*
** Local Types.
Expand Down
2 changes: 2 additions & 0 deletions src/hw/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

#include <stdlib.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/

#if defined(_WIN32)

Expand Down
2 changes: 2 additions & 0 deletions src/hw/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
#include <ctype.h>
#include <pthread.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
#include "xcp_terminal.h"
#include "flsemu.h"
/*!!! END-INCLUDE-SECTION !!!*/

#if defined(_WIN32)
#include <windows.h>
Expand Down
2 changes: 2 additions & 0 deletions src/hw/threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
#include <stdatomic.h>
#endif /* __STDC_NO_ATOMICS__ */

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
#include "xcp_threads.h"
/*!!! END-INCLUDE-SECTION !!!*/

#define XCP_THREAD (0)
#define UI_THREAD (1)
Expand Down
2 changes: 2 additions & 0 deletions src/hw/win/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
#include <stdlib.h>
#include <stdio.h>

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/

/*
** Local Types.
Expand Down
2 changes: 2 additions & 0 deletions src/tl/bt/winbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
* s. FLOSS-EXCEPTION.txt
*/

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
#include "xcp_eth.h"
/*!!! END-INCLUDE-SECTION !!!*/

#include <stdio.h>
#include <stdint.h>
Expand Down
4 changes: 3 additions & 1 deletion src/tl/can/kvaser.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
* s. FLOSS-EXCEPTION.txt
*/


/*!!! START-INCLUDE-SECTION !!!*/
#include "Xcp.h"
#include "Xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/

#include "canlib.h"

#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions src/tl/can/linux_socket_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
#include <unistd.h>


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/


#define err_abort(code,text) do { \
Expand Down
6 changes: 4 additions & 2 deletions src/tl/eth/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
*/

#include <stdlib.h>


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_eth.h"
#include "xcp_eth.h"
/*!!! END-INCLUDE-SECTION !!!*/


void XcpHw_ErrorMsg(char * const function, int errorCode);
Expand Down
2 changes: 2 additions & 0 deletions src/tl/eth/linuxeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
* s. FLOSS-EXCEPTION.txt
*/

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
#include "xcp_eth.h"
/*!!! END-INCLUDE-SECTION !!!*/


socklen_t addrSize = sizeof(struct sockaddr_storage);
Expand Down
4 changes: 3 additions & 1 deletion src/tl/eth/wineth.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
#include <stdlib.h>
#include <memory.h>


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
#include "xcp_eth.h"
/*!!! END-INCLUDE-SECTION !!!*/


#define DEFAULT_FAMILY PF_UNSPEC // Accept either IPv4 or IPv6
#define DEFAULT_SOCKTYPE SOCK_STREAM //
Expand Down
2 changes: 2 additions & 0 deletions src/tl/sxi/xcp_tl.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
#include "Arduino.h"
#endif

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_util.h"
/*!!! END-INCLUDE-SECTION !!!*/


#define XCP_SXI_MAKEWORD(buf, offs) ((*((buf) + (offs))) | (( *((buf) + (offs) + 1) << 8)))
Expand Down
3 changes: 3 additions & 0 deletions src/xcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
* s. FLOSS-EXCEPTION.txt
*/


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_hw.h"
/*!!! END-INCLUDE-SECTION !!!*/

/*
** Private Options.
Expand Down
2 changes: 2 additions & 0 deletions src/xcp_checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
* expressed or implied by its publication or distribution.
**********************************************************************/

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
/*!!! END-INCLUDE-SECTION !!!*/


/*
Expand Down
2 changes: 2 additions & 0 deletions src/xcp_daq.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
#include <stdio.h>
#endif /* _WIN32 */

/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp.h"
#include "xcp_util.h"
/*!!! END-INCLUDE-SECTION !!!*/


/*
Expand Down
2 changes: 2 additions & 0 deletions src/xcp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
*/


/*!!! START-INCLUDE-SECTION !!!*/
#include "xcp_util.h"
#include "xcp_macros.h"
/*!!! END-INCLUDE-SECTION !!!*/

#if defined(_MSC_VER)
#include <stdio.h>
Expand Down

0 comments on commit 64ecf49

Please sign in to comment.