Rev 7925 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7925 | Rev 7948 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #include |
1 | #include |
2 | #include |
2 | #include |
3 | #include |
3 | #include |
Line 4... | Line 4... | ||
4 | 4 | ||
- | 5 | int main() { |
|
5 | int main() { |
6 | con_write_asciiz("Wait, I'll ask you... when I'll done to fetch one site...\n"); |
6 | con_set_title("Dynamicaly linked app"); |
- | |
7 | con_write_asciiz("Wait, I'll ask you... when I'll done to fetch one site"); |
7 | con_set_title("Dynamicaly linked app"); |
8 | http_msg *h = get("http://boppan.org", 0, HTTP_FLAG_BLOCK, ""); |
8 | http_msg *h = get("http://example.com", 0, HTTP_FLAG_BLOCK, ""); |
9 | if (!receive(h)) { |
9 | if (!receive(h)) { |
10 | con_printf("%s\n", h->content_ptr); |
10 | con_printf("%s\n", h->content_ptr); |
11 | } else { |
11 | } else { |
12 | con_write_asciiz("Danmit! Can't access to the page."); |
12 | con_write_asciiz("Oops! Can't access to the page.\n"); |
13 | } |
13 | } |
14 | char buffer[256]; |
14 | char buffer[256]; |
15 | InputBox(buffer, "Hay!", "How do you do?", "Everything sucks", 0, 256, 0); |
15 | InputBox(buffer, "Hay!", "How do you do?", "Hmm?", 0, 256, 0); |
- | 16 | con_printf("Your answer is \"%s\"\n", buffer); |
|
16 | con_write_asciiz(buffer); |
17 | con_write_string("It's surprising, isn't it?", 26); |
17 | con_exit(0); |
18 | con_exit(0); |
18 | return 0; |
19 | return 0; |