mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-27 20:59:00 +08:00
Fix amalgam/unamalgam diffs
This commit is contained in:
parent
34d4fb8cf0
commit
d6c9d3c181
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
* This code implements the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
/* Copyright(c) By Steve Reid <steve@edmweb.com> */
|
||||
/* 100% Public Domain */
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORM_H_
|
||||
#define CS_COMMON_PLATFORM_H_
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#if CS_PLATFORM == CS_P_NRF51
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
|
||||
#if CS_PLATFORM == CS_P_NRF52
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
|
||||
#if CS_PLATFORM == CS_P_UNIX
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_WINCE_H_
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_
|
||||
#if CS_PLATFORM == CS_P_WINDOWS
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#if MG_NET_IF == MG_NET_IF_SIMPLELINK && !defined(MG_SIMPLELINK_NO_OSI)
|
||||
|
||||
#include "mg_task.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
/* clang-format off */
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_COMMON_H_
|
||||
#define CS_MONGOOSE_SRC_COMMON_H_
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
* === Client API reference
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
* === Server API reference
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
#include "mg_net_if.h"
|
||||
#include "mg_internal.h"
|
||||
#include "mg_net_if_socket.h"
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
|
@ -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
6
tools/unamalgam.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -x
|
||||
|
||||
tools/unamalgam.py mongoose.h
|
||||
tools/unamalgam.py mongoose.c
|
Loading…
Reference in New Issue
Block a user