Skip to content

Commit

Permalink
Merge pull request camgunz#53 from fperrad/20200907_include
Browse files Browse the repository at this point in the history
cmp.h self sufficient
  • Loading branch information
camgunz authored Aug 8, 2021
2 parents f99d08f + a946ee4 commit 9cbddb3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ The following examples use a file as the backend, and are modeled after the
examples included with the msgpack-c project.

```C
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

Expand Down
4 changes: 0 additions & 4 deletions cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

#include "cmp.h"

static const uint32_t version = 19;
Expand Down
4 changes: 4 additions & 0 deletions cmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ THE SOFTWARE.
#ifndef CMP_H__
#define CMP_H__

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

struct cmp_ctx_s;

typedef bool (*cmp_reader)(struct cmp_ctx_s *ctx, void *data, size_t limit);
Expand Down
2 changes: 0 additions & 2 deletions examples/example1.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 0 additions & 2 deletions examples/example2.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ THE SOFTWARE.

#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down

0 comments on commit 9cbddb3

Please sign in to comment.