mirror of
https://github.com/eddyem/snippets_library.git
synced 2026-11-24 23:00:19 +03:00
-> 3.6 (added common sorting functions; comments in help messages over socket)
This commit is contained in:
@@ -451,6 +451,8 @@ typedef struct sl_sock_hitem{
|
||||
void *data; // user data (e.g. struct key-varptr-limits)
|
||||
} sl_sock_hitem_t;
|
||||
|
||||
sl_sock_hresult_e sl_comment(struct sl_sock *s, struct sl_sock_hitem *item, const char *val);
|
||||
|
||||
// socket type
|
||||
typedef enum{
|
||||
SOCKT_UNIX, // UNIX socket
|
||||
@@ -531,3 +533,12 @@ int sl_sock_sendall(sl_sock_t *sock, uint8_t *data, size_t len);
|
||||
sl_sock_hresult_e sl_sock_inthandler(sl_sock_t *client, sl_sock_hitem_t *hitem, const char *str);
|
||||
sl_sock_hresult_e sl_sock_dblhandler(sl_sock_t *client, sl_sock_hitem_t *hitem, const char *str);
|
||||
sl_sock_hresult_e sl_sock_strhandler(sl_sock_t *client, sl_sock_hitem_t *hitem, const char *str);
|
||||
|
||||
/******************************************************************************\
|
||||
Sorting functions
|
||||
\******************************************************************************/
|
||||
int sl_cmpchar(const void *p1, const void *p2);
|
||||
int sl_cmpint(const void *p1, const void *p2);
|
||||
int sl_cmpdouble(const void *p1, const void *p2);
|
||||
int sl_cmpstring(const void *p1, const void *p2);
|
||||
int sl_cmpstringp(const void *p1, const void *p2);
|
||||
|
||||
Reference in New Issue
Block a user