]> Nishi Git Mirror - libw3.git/commitdiff
w3b
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Fri, 2 Feb 2024 05:33:10 +0000 (05:33 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Fri, 2 Feb 2024 05:33:10 +0000 (05:33 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@160 d27a3e52-49c5-7645-884c-6793ebffc270

Example/w3b/w3b.c
W3Version.h.p

index 7b01c35443b53710807fbbc80d48eb1fe8ce3bb4..9b7c23200942a9a2e0af7f3ba59a3c471cbb3d5b 100644 (file)
@@ -29,6 +29,7 @@ HANDLE winstdout;
 #include <sys/termios.h>
 #endif
 
+char* allurl = NULL;
 int termw, termh;
 
 extern int strcasecmp(const char* s1, const char* s2);
@@ -354,6 +355,7 @@ void render_site() {
                                        write(1, databuf + i, 1);
                                }
                        }
+                       titlebuf = __W3_Concat("Raw: ", allurl);
                }
                char* seq = malloc(1024);
                sprintf(seq, "\x1b[1;%dH", termw - strlen(titlebuf != NULL ? titlebuf : "No title") - 1);
@@ -398,6 +400,7 @@ int main(int argc, char** argv) {
        char c = 0;
        bool acc = false;
        if(url != NULL) {
+               allurl = url;
                access_site(url);
                acc = true;
        }
@@ -434,6 +437,7 @@ int main(int argc, char** argv) {
                        if(url != NULL) free(url);
                        url = malloc(2049);
                        scanf("%s", url);
+                       allurl = url;
                        acc = false;
                        break;
                case 'd':
index 4165329a239bd62c3ec34dfd1791defd9ac941b8..0af40104e52e9cac9b5837c0660474ec26ac14b6 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.2G" \
+#define LIBW3_VERSION "2.2H" \
 SUFFIX
 
 #ifdef __cplusplus