Skip to content

Commit

Permalink
Docs + fix FIO_FIOBJ miss-inclusion when using single header
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Oct 22, 2023
1 parent 2a87e68 commit 0d010a9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# facil.io 0.8.x for C - now with an integrated C STL

## The Web microFramework and Server Toolbox library for C
# facil.io 0.8.x for C - The C Server Toolbox Library (C STL)

[![POSIX C/C++ CI](https://github.com/facil-io/cstl/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/facil-io/cstl/actions/workflows/c-cpp.yml) [![Windows C/C++ CI](https://github.com/facil-io/cstl/actions/workflows/windows.yml/badge.svg)](https://github.com/facil-io/cstl/actions/workflows/windows.yml)

> **The [facil.io](http://facil.io) C STL aims to provide C developers with easy-to-use tools to write memory safe and performant programs**.
## The C Server Toolbox Library Powers a Web microFramework

The [facil.io library](https://facil.io) is much more than a Web Application Framework and includes core tools and type templates that any C (and C++) project will find useful.

In addition to useful helpers, [facil.io](https://facil.io) allows developers to use MACROS to generate code for different common types, such as Hash Maps, Arrays, Binary-Safe Strings, etc'.
Expand Down Expand Up @@ -49,7 +51,7 @@ There are a number of examples in the [./examples](examples) folder, including:

### Examples for authoring network applications:

* [An HTTP Echo and WebSockets/SSE Chat Server with static file service](examples/server.c).
* [Mix an HTTP/1.1 Server to serve data with a WebSockets/SSE Chat Server](examples/server.c).
* [A simple network client example](examples/client.c).
* [Pub/Sub based text Chat server](examples/chat.c).

Expand Down
22 changes: 11 additions & 11 deletions fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2133,21 +2133,19 @@ Everything Inclusion
#define FIO_SOCK
#define FIO_STATE
#define FIO_THREADS
#elif !defined(H___FIO_EVERYTHING2___H)
#define H___FIO_EVERYTHING2___H

#else
#undef H___FIO_EVERYTHING1___H
#undef FIO_EVERYTHING
#define H___FIO_EVERYTHING___H
#define FIO_FIOBJ
#define FIO_HTTP
#define FIO_MALLOC
#define FIO_MUSTACHE
#define FIO_PUBSUB
#define FIO_SERVER
#else
#define H___FIO_EVERYTHING___H
#undef H___FIO_EVERYTHING1___H
#undef H___FIO_EVERYTHING2___H
#undef FIO_EVERYTHING
#undef FIO_MEMALT
#define FIO_MEMALT

#endif

#define FIO___INCLUDE_AGAIN
Expand All @@ -2174,11 +2172,13 @@ Basics Inclusion
#define FIO_CRYPT
#define FIO_STATE
#define FIO_THREADS

#elif !defined(H___FIO_BASIC_ROUND2___H)
#define H___FIO_BASIC_ROUND2___H
#define FIO_FIOBJ
#define FIO_MUSTACHE
#define FIOBJ_MALLOC

#else
#define H___FIO_BASIC___H
#undef H___FIO_BASIC_ROUND1___H
Expand Down Expand Up @@ -41575,7 +41575,7 @@ typedef struct {
#define FIO_ARRAY_TYPE_CMP(a, b) (a).obj == (b).obj
#define FIO_ARRAY_NAME fiobj___stack
#define FIO_ARRAY_TYPE fiobj___stack_element_s
#define FIO___RECURSIVE_INCLUDE
#define FIO___RECURSIVE_INCLUDE 1
#include FIO_INCLUDE_FILE
#undef FIO___RECURSIVE_INCLUDE

Expand Down Expand Up @@ -42007,7 +42007,7 @@ FIOBJ JSON parsing
***************************************************************************** */

#define FIO_JSON
#define FIO___RECURSIVE_INCLUDE
#define FIO___RECURSIVE_INCLUDE 1
#include FIO_INCLUDE_FILE
#undef FIO___RECURSIVE_INCLUDE

Expand Down Expand Up @@ -42282,8 +42282,8 @@ FIOBJ cleanup
#endif /* FIO_EXTERN_COMPLETE */
#undef FIOBJ_EXTERN_OBJ
#undef FIOBJ_EXTERN_OBJ_IMP
#endif /* FIO_FIOBJ */
#undef FIO_FIOBJ
#endif /* FIO_FIOBJ */
/* ************************************************************************* */
#if !defined(FIO_INCLUDE_FILE) /* Dev test - ignore line */
#define FIO___DEV___ /* Development inclusion - ignore line */
Expand Down
16 changes: 8 additions & 8 deletions fio-stl/000 dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,19 @@ Everything Inclusion
#define FIO_SOCK
#define FIO_STATE
#define FIO_THREADS
#elif !defined(H___FIO_EVERYTHING2___H)
#define H___FIO_EVERYTHING2___H

#else
#undef H___FIO_EVERYTHING1___H
#undef FIO_EVERYTHING
#define H___FIO_EVERYTHING___H
#define FIO_FIOBJ
#define FIO_HTTP
#define FIO_MALLOC
#define FIO_MUSTACHE
#define FIO_PUBSUB
#define FIO_SERVER
#else
#define H___FIO_EVERYTHING___H
#undef H___FIO_EVERYTHING1___H
#undef H___FIO_EVERYTHING2___H
#undef FIO_EVERYTHING
#undef FIO_MEMALT
#define FIO_MEMALT

#endif

#define FIO___INCLUDE_AGAIN
Expand All @@ -110,11 +108,13 @@ Basics Inclusion
#define FIO_CRYPT
#define FIO_STATE
#define FIO_THREADS

#elif !defined(H___FIO_BASIC_ROUND2___H)
#define H___FIO_BASIC_ROUND2___H
#define FIO_FIOBJ
#define FIO_MUSTACHE
#define FIOBJ_MALLOC

#else
#define H___FIO_BASIC___H
#undef H___FIO_BASIC_ROUND1___H
Expand Down
6 changes: 3 additions & 3 deletions fio-stl/500 fiobj.h
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ typedef struct {
#define FIO_ARRAY_TYPE_CMP(a, b) (a).obj == (b).obj
#define FIO_ARRAY_NAME fiobj___stack
#define FIO_ARRAY_TYPE fiobj___stack_element_s
#define FIO___RECURSIVE_INCLUDE
#define FIO___RECURSIVE_INCLUDE 1
#include FIO_INCLUDE_FILE
#undef FIO___RECURSIVE_INCLUDE

Expand Down Expand Up @@ -1918,7 +1918,7 @@ FIOBJ JSON parsing
***************************************************************************** */

#define FIO_JSON
#define FIO___RECURSIVE_INCLUDE
#define FIO___RECURSIVE_INCLUDE 1
#include FIO_INCLUDE_FILE
#undef FIO___RECURSIVE_INCLUDE

Expand Down Expand Up @@ -2193,5 +2193,5 @@ FIOBJ cleanup
#endif /* FIO_EXTERN_COMPLETE */
#undef FIOBJ_EXTERN_OBJ
#undef FIOBJ_EXTERN_OBJ_IMP
#endif /* FIO_FIOBJ */
#undef FIO_FIOBJ
#endif /* FIO_FIOBJ */

0 comments on commit 0d010a9

Please sign in to comment.