diff options
author | Clayton <nrootconauto@gmail.com> | 2023-03-01 19:49:55 -0500 |
---|---|---|
committer | Clayton <nrootconauto@gmail.com> | 2023-03-01 19:49:55 -0500 |
commit | 781f24f34cc46fb5cf89714675d5bff445859064 (patch) | |
tree | d3e1c836260a57e8666a9d394776a30deebce616 | |
parent | f155b7d76cf4f4d85370e1ffb0c1200abb06da60 (diff) |
Fixed clipboard bug.
Was `TD_FREE`ing a pointer from `GetClipboardText`. Server will create a bunch of version history headers on first run.
-rw-r--r-- | README.MD | 1 | ||||
-rw-r--r-- | T/Server/gen_html.HC | 2 | ||||
-rw-r--r-- | T/Server/run.HC | 23 | ||||
-rw-r--r-- | T/Server/touch_all.HC | 3 | ||||
-rw-r--r-- | sdl_window.c | 4 |
5 files changed, 11 insertions, 22 deletions
@@ -13,6 +13,7 @@ To build the compiler binary `HCRT.BIN`,type `Cmp("FULL_PACKAGE.HC","HCRT.DBG.Z" # News + - I added user-login stuff to the server(edit your admin emails at T/Server/run.HC) Default user name is `root` with password `root`. - I added an IRC client that i wrote,use `:JOIN #channel` ![holyirc.png](holyirc.png) diff --git a/T/Server/gen_html.HC b/T/Server/gen_html.HC index 6581928..94c7d94 100644 --- a/T/Server/gen_html.HC +++ b/T/Server/gen_html.HC @@ -586,7 +586,7 @@ U0 Get(CServer *srv,CDyadStream *stream,CURL *url,CHTTPRequest *req) { fin: EndHttpRequest(stream); } -CServer *srv=CreateServer(8080); +CServer *srv=CreateServer(WIKI_SERVER_PORT); srv->get=&Get; srv->post=&Post; Serve(srv); diff --git a/T/Server/run.HC b/T/Server/run.HC index 25c2ed5..f896afc 100644 --- a/T/Server/run.HC +++ b/T/Server/run.HC @@ -1,23 +1,8 @@ -/* -Option(OPTf_BOUNDS_CHECK,1);;; - -I64 StrCpy(U8 *a,U8 *b) { - while(*b) { - *a++=*b++; - } -} -I64 MemCpy(U8 *a,U8 *b,I64 n) { - U8 *o=a; - while(--n>=0) { - *a++=*b++; - } - return o; -} -*/ Cd("T:/");; //We are not serving from RootFS Cd("/Server");; #define WIKI_ADMIN_EMAILS "rnootconauto@gmail.com" +#define WIKI_SERVER_PORT 8080 //This dude will refresh the search index for find.hC extern class CServer; @@ -54,7 +39,7 @@ extern Bool CurrentUserIsAdmin(); #define WIKI_ADMIN "/ADMIN" #define WIKI_SALT "/SALT" #define WIKI_UNSALT "/UNSALT" -#define WIKI_VIEW_FILE "/VIEWFILE" +#define WIKI_VIEW_FILE "/VIEWFILE" #define WIKI_DELETE "/DELETE" if(!FileFind(WIKI_ROOT)) DirMk(WIKI_ROOT); @@ -77,4 +62,8 @@ if(!FileFind(WIKI_BACKUP)) #include "index.HC" #include "cache.HC" #include "users.HC" +#include "touch_all.HC" +RegDft("Server/init","TouchAll;;"); +RegExe("Server/init"); +RegWrite("Server/init",";"); #include "gen_html.HC";
\ No newline at end of file diff --git a/T/Server/touch_all.HC b/T/Server/touch_all.HC index f97ca12..ecadda3 100644 --- a/T/Server/touch_all.HC +++ b/T/Server/touch_all.HC @@ -10,5 +10,4 @@ U0 TouchAll() { Free(ftxt); } DirEntryDel(root); -} -TouchAll; +}
\ No newline at end of file diff --git a/sdl_window.c b/sdl_window.c index 4e4f1a1..5477bd3 100644 --- a/sdl_window.c +++ b/sdl_window.c @@ -22,8 +22,8 @@ void SetClipboard(char *text) { } char *ClipboardText() { char *sdl=SDL_GetClipboardText(),*r; - if(!sdl) return HolyStrDup(""); - r=HolyStrDup(sdl); + if(!sdl) return strdup(""); + r=strdup(sdl); SDL_free(sdl); return r; } |