Fix amalgam/unamalgam diffs

This commit is contained in:
Deomid Ryabkov 2021-06-12 00:22:01 +01:00
parent 34d4fb8cf0
commit d6c9d3c181
18 changed files with 27 additions and 4 deletions

View File

@ -1,3 +1,4 @@
/*
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was

View File

@ -1,3 +1,4 @@
/* Copyright(c) By Steve Reid <steve@edmweb.com> */
/* 100% Public Domain */

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORM_H_
#define CS_COMMON_PLATFORM_H_

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
#define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
#if CS_PLATFORM == CS_P_NRF51

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
#define CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
#if CS_PLATFORM == CS_P_NRF52

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
#define CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
#if CS_PLATFORM == CS_P_UNIX

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_
#define CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_

View File

@ -1,3 +1,4 @@
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
#define CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
#if CS_PLATFORM == CS_P_WINDOWS

View File

@ -1,3 +1,4 @@
#if MG_NET_IF == MG_NET_IF_SIMPLELINK && !defined(MG_SIMPLELINK_NO_OSI)
#include "mg_task.h"

View File

@ -1,3 +1,4 @@
/* clang-format off */
/*-
* Copyright (c) 1991, 1993

View File

@ -1,3 +1,4 @@
#ifndef CS_MONGOOSE_SRC_COMMON_H_
#define CS_MONGOOSE_SRC_COMMON_H_

View File

@ -1,3 +1,4 @@
/*
* === Client API reference
*/

View File

@ -1,3 +1,4 @@
/*
* === Server API reference
*/

View File

@ -1,3 +1,4 @@
#include "mg_net_if.h"
#include "mg_internal.h"
#include "mg_net_if_socket.h"

View File

@ -16,9 +16,11 @@ $ tools/unamalgam.py mongoose.c
This produces directories and files under `mongoose/` and `common/` that are easeier to work with.
It also produces `mongoose.c.manifest` which can later be used to reconstruct the file back:
```
$ tools/amalgam.py --prefix=MG --public-header=mongoose.h $(cat mongoose.c.manifest) > mongoose.c
$ tools/amalgam.py --prefix=MG --license=LICENSE --public-header=mongoose.h $(cat src/mongoose.c.manifest) > mongoose.c
```
The same applies to `mongoose.h`, except `--public-header` should be omitted during amalgamation.
The same applies to `mongoose.h`, except `--public-header` should be omitted during amalgamation:
`tools/amalgam.py` can be used to assemble `mongoose.c` and `mongoose.h`.
```
$ tools/amalgam.py --prefix=MG --license=LICENSE $(cat src/mongoose.h.manifest) > mongoose.h
```

View File

@ -3,4 +3,4 @@
set -x -e
tools/amalgam.py --prefix=MG --license=LICENSE $(cat src/mongoose.h.manifest) > mongoose.h
tools/amalgam.py --prefix=MG --public-header=mongoose.h --license=LICENSE $(cat src/mongoose.c.manifest) > mongoose.c
tools/amalgam.py --prefix=MG --license=LICENSE --public-header=mongoose.h $(cat src/mongoose.c.manifest) > mongoose.c

View File

@ -33,6 +33,7 @@ with open(fname) as f:
# open next file for writing
ofile = open(cur_src, "w")
ofile.write('\n')
print('=> %s' % cur_src, file=sys.stderr)
manifest.append(cur_src)
next(f)

6
tools/unamalgam.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -e -x
tools/unamalgam.py mongoose.h
tools/unamalgam.py mongoose.c