From e5c11a5137d538b7713dd8708ca767c208824c06 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Dec 2016 01:17:01 -0800 Subject: 3709 - line numbers in html Each line number also gets an anchor name, but I'm not hyperlinking them for now because I don't want to encourage bookmarking these links just yet. They aren't permalinks because every revision may change what's at any given line number. --- html/http-client.mu.html | 72 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 24 deletions(-) (limited to 'html/http-client.mu.html') diff --git a/html/http-client.mu.html b/html/http-client.mu.html index 8421fc60..cd8e1e91 100644 --- a/html/http-client.mu.html +++ b/html/http-client.mu.html @@ -6,7 +6,7 @@ - + @@ -25,32 +26,55 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color - +
-# example program: reading a URL over HTTP
-
-def main [
-  local-scope
-  google:&:source:char <- start-reading-from-network 0/real-resources, [google.com/]
-  n:num <- copy 0
-  buf:&:buffer <- new-buffer 30
-  {
-    c:char, done?:bool <- read google
-    break-if done?
-    n <- add n, 1
-    buf <- append buf, c
-    loop
-  }
-  result:text <- buffer-to-array buf
-  open-console
-  len:num <- length *result
-  print 0/real-screen, result
-  wait-for-some-interaction
-  close-console
-]
+ 1 # example program: reading a URL over HTTP
+ 2 
+ 3 def main [
+ 4   local-scope
+ 5   google:&:source:char <- start-reading-from-network 0/real-resources, [google.com/]
+ 6   n:num <- copy 0
+ 7   buf:&:buffer <- new-buffer 30
+ 8   {
+ 9     c:char, done?:bool <- read google
+10     break-if done?
+11     n <- add n, 1
+12     buf <- append buf, c
+13     loop
+14   }
+15   result:text <- buffer-to-array buf
+16   open-console
+17   len:num <- length *result
+18   print 0/real-screen, result
+19   wait-for-some-interaction
+20   close-console
+21 ]
 
-- cgit 1.4.1-2-gfad0 span class='oid'>5beb25b5 ^
b96af395 ^


5beb25b5 ^
6e1eeeeb ^



b3cdcdd4 ^
a9817844 ^
a9817844 ^
6e1eeeeb ^
a9817844 ^
b96af395 ^






6e1eeeeb ^





































a56d969e ^
6e1eeeeb ^































1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106