X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Furllib.qc;h=fd8b16d881d7177db5a8f623cb2051f9260ca8ea;hb=fdbfb6f9364d8aeae67e108400a6bd1dd37dc0b7;hp=8c8bcd16bc0d70ed0160dc4fd10ce35ab6ef4ed1;hpb=5e813f65d212e2cfc5c32eae682c0a1b0c0f73da;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/urllib.qc b/qcsrc/lib/urllib.qc index 8c8bcd16b..fd8b16d88 100644 --- a/qcsrc/lib/urllib.qc +++ b/qcsrc/lib/urllib.qc @@ -24,6 +24,7 @@ const float URL_FH_STDOUT = -2; entity url_fromid[NUM_URL_ID]; int autocvar__urllib_nextslot; +ERASEABLE float url_URI_Get_Callback(int id, float status, string data) { if (id < MIN_URL_ID) return 0; @@ -82,6 +83,7 @@ float url_URI_Get_Callback(int id, float status, string data) } } +ERASEABLE void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass) { entity e; @@ -201,6 +203,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass) } // close a file +ERASEABLE void url_fclose(entity e) { int i; @@ -280,6 +283,7 @@ void url_fclose(entity e) } // with \n (blame FRIK_FILE) +ERASEABLE string url_fgets(entity e) { if (e.url_fh == URL_FH_CURL) @@ -304,6 +308,7 @@ string url_fgets(entity e) } // without \n (blame FRIK_FILE) +ERASEABLE void url_fputs(entity e, string s) { if (e.url_fh == URL_FH_CURL) @@ -316,7 +321,7 @@ void url_fputs(entity e, string s) else if (e.url_fh == URL_FH_STDOUT) { // stdout - LOG_INFO(s); + print(s); } else { @@ -326,6 +331,7 @@ void url_fputs(entity e, string s) } // multi URL object, tries URLs separated by space in sequence +ERASEABLE void url_multi_ready(entity fh, entity me, float status) { float n; @@ -353,6 +359,8 @@ void url_multi_ready(entity fh, entity me, float status) } me.url_ready(fh, me.url_ready_pass, status); } + +ERASEABLE void url_multi_fopen(string url, int mode, url_ready_func rdy, entity pass) { float n;