From 13550e9e3e09273278950435abb392781a98bb06 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 11 May 2017 17:14:01 +0200 Subject: Tidy up some things. --- frontends/kolibrios/fb/gui.c | 8 +++++++- frontends/kolibrios/loadhttp.asm | 19 ++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'frontends') diff --git a/frontends/kolibrios/fb/gui.c b/frontends/kolibrios/fb/gui.c index d12bdfcf0..ebd3a3d3b 100644 --- a/frontends/kolibrios/fb/gui.c +++ b/frontends/kolibrios/fb/gui.c @@ -30,6 +30,8 @@ #include #include +#include + #include "utils/utils.h" #include "utils/nsoption.h" #include "utils/filepath.h" @@ -491,7 +493,7 @@ process_cmdline(int argc, char** argv) } /* Remove me! */ - feurl = "http://www.kolibrios.org"; + feurl = "http://board.kolibrios.org"; /* NS on KolibriOS does not support option parsing (yet) */ @@ -2124,6 +2126,10 @@ int main(int argc, char** argv) .layout = framebuffer_layout_table, }; + /* Initialize heap so that we can do memory allocations */ + unsigned int heapsize = heap_init(); + debug_board_printf("[SYSTEM] Initialized heap (Size = %u bytes)\n", heapsize); + assert(heapsize != 0); /* fix args */ #define MKARGV(i,opt) argv[i] = (char *) malloc(strlen(opt) + 1); strcpy(argv[i], opt); diff --git a/frontends/kolibrios/loadhttp.asm b/frontends/kolibrios/loadhttp.asm index 859f56db1..3aa7b27a1 100644 --- a/frontends/kolibrios/loadhttp.asm +++ b/frontends/kolibrios/loadhttp.asm @@ -21,27 +21,24 @@ public init_network as '_init_network_asm' ;;; Returns 0 on success. -1 on failure. proc init_network - - mcall 68,11 - stdcall dll.Load, @IMPORT - test eax, eax - jnz error + test eax, eax + jnz error mov eax, 0 ret - -error: + +error: mov eax, -1 ret -endp - +endp + @IMPORT: library lib_http, 'http.obj' import lib_http, \ - HTTP_get , 'get' , \ + HTTP_get , 'get' , \ HTTP_head , 'head' , \ HTTP_post , 'post' , \ HTTP_find_header_field , 'find_header_field' , \ @@ -51,7 +48,7 @@ import lib_http, \ HTTP_free , 'free' , \ HTTP_escape , 'escape' , \ HTTP_unescape , 'unescape' - + public HTTP_get as '_http_get_asm' public HTTP_head as '_http_head_asm' public HTTP_post as '_http_post_asm' -- cgit v1.2.3