]> Nishi Git Mirror - libw3.git/commitdiff
forgot to add
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Tue, 13 Feb 2024 15:37:05 +0000 (15:37 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Tue, 13 Feb 2024 15:37:05 +0000 (15:37 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@210 d27a3e52-49c5-7645-884c-6793ebffc270

Library/Nex.c [new file with mode: 0644]
Library/W3Nex.h [new file with mode: 0644]
W3Version.h.p

diff --git a/Library/Nex.c b/Library/Nex.c
new file mode 100644 (file)
index 0000000..e28c8db
--- /dev/null
@@ -0,0 +1,25 @@
+/* $Id$ */
+#include "W3Nex.h"
+
+#include "W3Core.h"
+#include "W3Util.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+void __W3_Nex_Request(struct W3* w3) {
+       __W3_Debug("LibW3-Nex", "Sending the request");
+       __W3_Auto_Write(w3, w3->path, strlen(w3->path));
+       __W3_Auto_Write(w3, "\r\n", 2);
+       char* buf = malloc(w3->readsize);
+       while(true) {
+               int len = __W3_Auto_Read(w3, buf, w3->readsize);
+               if(len <= 0) break;
+               void* funcptr = __W3_Get_Event(w3, "data");
+               if(funcptr != NULL) {
+                       void (*func)(struct W3*, char*, size_t) = (void (*)(struct W3*, char*, size_t))funcptr;
+                       func(w3, buf, len);
+               }
+       }
+       free(buf);
+}
diff --git a/Library/W3Nex.h b/Library/W3Nex.h
new file mode 100644 (file)
index 0000000..99c38d5
--- /dev/null
@@ -0,0 +1,17 @@
+/* $Id$ */
+#ifndef __W3NEX_H__
+#define __W3NEX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "W3Core.h"
+
+void __W3_Nex_Request(struct W3* w3);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 184456facd5538d506430380678005efb4c2fd44..be27e135016712790fa7157d57f8db77cff736ee 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.10" \
+#define LIBW3_VERSION "2.10A" \
 SUFFIX
 
 #ifdef __cplusplus