commit 4bb66d279b0ece9db166f953c5da09f04067815f
parent beb6534db668aa2d9c620eb9c2914269fc10c4d3
Author: Mario Rosell R. Martinez <mario@mariorosell.es>
Date: Sat, 21 Mar 2026 14:28:02 +0100
Add docs
Diffstat:
| A | CONTRIBUTORS | | | 19 | +++++++++++++++++++ |
| A | NEWS | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
| M | README | | | 94 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- |
3 files changed, 152 insertions(+), 5 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
@@ -0,0 +1,19 @@
+CONTRIBUTORS
+************
+
+Lists
+=====
+
+* Users list: anntp-users at lists dot sr dot ht
+* Development list (PATCHES ONLY!!!): anntp-devel at lists dot sr dot ht
+
+Format
+======
+
+* Your Name [tab] <your email in angle brackets> [tab]Your work
+
+List
+====
+
+none right now :(.
+
diff --git a/NEWS b/NEWS
@@ -0,0 +1,44 @@
+NEWS
+****
+
+Sorted newest to oldest. Unreleased is what is being done for the next release and always on the top.
+
+Unreleased
+----------
+
+* First DEVELOPMENT releae
+* Entirely by Mario Rosell
+* Features:
+ - connections in TLS and unsecure
+ - fetch newsgroups and group info
+ - auth
+ - initialization/destruction (lifecycle)
+ - error handling
+* Commits (taken from `git log`):
+ - Add wrappers over some things
+ - Format
+ - lol
+ - Import
+ - Add example
+ - oops
+ - Add ANNTP_STRDUP
+ - Make error handling clearer.
+ - Made a new struct, AnntpErrCode, and added some error codes
+ - Improve gitgnore
+ - Buffer reads
+ - Add anntp_readdot_cb
+ - buf,sec: Fix buffer overflow and dot-stuffing.
+ - Interface fixes
+ - oopsie whoopsie
+ - thing
+ - Add readline_dot
+ - Add write.
+ - Add anntp_write and TSLing...
+ - Add some stuff
+ - Initial commit
+* Limitations:
+ - No windows support
+ - Blocking IO
+ - Fixed buffer sizes
+ - Few headers parsed
+ - Limited API
diff --git a/README b/README
@@ -1,6 +1,90 @@
- ▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄ ▄▄▄▄
-██▀██ ███▄██ ███▄██ ██ ██▄█▀
-██▀██ ██ ▀██ ██ ▀██ ██ ██
-================================
+*****************************
+ __
+ ___ ____ ___ / /____
+/ _ `/ _ \/ _ \/ __/ _ \
+\_,_/_//_/_//_/\__/ .__/
+ /_/
+ v0.1.0
+*****************************
+
+anntp minimalist, light, and hackable single-header NNTP (Network News Transfer Protocol) client library implemented in
+semi-portable C99. It is low-level, but still usable, minimalist, and portable enough between UNIX systems.
+
+Right now, it supports:
+
+* multiple connection,
+* low-level server/client I/O, with a billion variation of the same two functions,
+* auth,
+* TLS (just TLS, no STARTTLS, sorry),
+* error-handling,
+* "idiomatic" C
+
+---
+
+Requirements
+============
+
+* A C compiler
+* OpenSSL/LibreSSL (optional) for TLS support
+* An UNIX like system
+
+Usage
+=====
+
+0) Copy anntp.h to your project
+1) Include the library in as many places as you want, but in one, add:
+
+ #define ANNTP_IMPLEMENTATION
+
+ *before* including anntp.h
+2) Optionally, define any of these to configure anntp:
+ + ANNTP_BUFSIZE [0x1000]: Default buffer size
+ + ANNTP_MALLOC [malloc]: Memory allocator function
+ + ANNTP_FREE [free]: Memory freeing function
+ + ANNTP_STRDUP [stdup or custom]: strdup() function
+ + ANNTP_API [extern]: Extra function declaration type for API functions
+
+3) ENJOY!
+
+Memory management
+-----------------
+
+`anntp_free_*` functions free stuff, see their arguments to what they free, it should be obvious when looking at them
+
+> NOTE: all strings returned by the library are dynamically allocated
+
+Error handling
+--------------
+
+There is an AnntpErrCode enum with the types of errors:
+
+* ANE_OK - success
+* ANE_PARAMS - wrong parameters
+* ANE_IO - I/O error (OOM, sending, receiving, ..., pretty broad of a variant)
+* ANE_TLS - tLS error
+* ANE_PROTO - protocol exception; server sent something unexpected
+* ANE_AUTH - authentication failure
+
+EXAMPLES
+========
+
+See examples/ for a couple examples.
+
+LICENSE
+=======
+
+Under the CC0. Public domain! Use at your own risk.
+
+See more information at the LICENSE file.
+
+CONTACT
+=======
+
+* Mario Rosell <mario@mariorosell.es (broken right now)
+* Contributors: See CONTRIBUTORS file for more.
+
+TODOS
+=====
+
+See the NEWS file for a changelog and info.
-A simple nntp implementation in C99.