1
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 0222b75e85
Rename project from slweb to libweb
It was found out there was another project of the same name around
(https://git.sr.ht/~strahinja/slweb/), also related to website
generation.

In order to avoid confusion, a new name has been chosen for this
project. Surprisingly, libweb was not in use by any distributions
(according to https://repology.org and AUR index), and it should
reflect well the intention behind this project i.e., being a library
to build web-related stuff.
2023-10-11 00:07:13 +02:00
Xavier Del Campo Romero d55b84f68b
html.c: Fix wrong encoding for '>' and '<' 2023-08-08 00:34:38 +02:00
Xavier Del Campo Romero 1ce153b9a4
html.c: Make serialize_node static 2023-07-28 01:33:20 +02:00
Xavier Del Campo Romero 8c3ba33ced
Move header files to subdirectory
Since slweb is meant as a library, it is advisable to keep public header
files under their own directory in order to avoid name clashing i.e.,

 #include "something.h"

Now becomes:

 #include "slweb/something.h"
2023-07-21 01:28:38 +02:00
Xavier Del Campo Romero af16aa6702
Define _POSIX_C_SOURCE
This allows using the default compiler defined by make(1) (i.e.,
c99(1)), thus improving POSIX compatibility.
2023-07-20 23:52:53 +02:00
Xavier Del Campo Romero cc714d9006
html.c: Allow empty strings on html_encode 2023-07-20 23:52:52 +02:00
Xavier Del Campo Romero 67ffb772b7
Fix memory leak on failed realloc(3)
According to C99 §7.20.3.4:

If memory for the new object cannot be allocated, the old object is not
deallocated and its value is unchanged.

Therefore, a temporary pointer must be used to ensure the original
object can still be deallocated should realloc(3) return a null pointer.
2023-07-20 23:52:51 +02:00
Xavier Del Campo Romero 2968c5f67d
Initial commit 2023-07-20 23:52:47 +02:00