Commit 74af23777806dd696c5ed3ba365b7b3db3fa693e

Authored by Cédric RICARD
1 parent 27c7ece0

Migrating to Anubis 1.9 which biggest change is the migration from Int32 to Int or Word32.

calexium_lib/CXM_errors.anubis
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 9
10 public type GeneralError: 10 public type GeneralError:
11 ok, 11 ok,
12 - unknown(Int32 val), 12 + unknown(Word32 val),
13 bad_type, 13 bad_type,
14 bad_value, 14 bad_value,
15 bad_parameters, 15 bad_parameters,
@@ -20,8 +20,8 @@ public type GeneralError: @@ -20,8 +20,8 @@ public type GeneralError:
20 io_error, // general error on reading or writing from/to IO (file, socket, etc...) 20 io_error, // general error on reading or writing from/to IO (file, socket, etc...)
21 cant_start_process. // A execute to an external process has failed 21 cant_start_process. // A execute to an external process has failed
22 22
23 -public define Int32  
24 - to_Int32 23 +public define Word32
  24 + to_Word32
25 ( 25 (
26 GeneralError e 26 GeneralError e
27 ) = 27 ) =
calexium_lib/CXM_message_constants.anubis
@@ -10,66 +10,66 @@ @@ -10,66 +10,66 @@
10 10
11 // **************** PACKAGE BUILDER *************** 11 // **************** PACKAGE BUILDER ***************
12 12
13 -public define Int32 _CXM_PKG_MSG_BASIS = 0x33770400. //  
14 -public define Int32 _CXM_PKG_CONTAINER = 0x33770401.  
15 -public define Int32 _CXM_PKG_HEADER_PART = 0x33770402. // Header Message for Script  
16 -public define Int32 _CXM_PKG_SCRIPT_PART = 0x33770403. // Main Message for Script  
17 -public define Int32 _CXM_PKG_S_ADD_FILE = 0x33770404. // script action to add file in the destination  
18 -public define Int32 _CXM_PKG_INDEX_PART = 0x33770440. // ID of package Index part  
19 -public define Int32 _CXM_PKG_IDX_ENTRY = 0x33770441. // Index entry information 13 +public define Word32 _CXM_PKG_MSG_BASIS = 0x33770400. //
  14 +public define Word32 _CXM_PKG_CONTAINER = 0x33770401.
  15 +public define Word32 _CXM_PKG_HEADER_PART = 0x33770402. // Header Message for Script
  16 +public define Word32 _CXM_PKG_SCRIPT_PART = 0x33770403. // Main Message for Script
  17 +public define Word32 _CXM_PKG_S_ADD_FILE = 0x33770404. // script action to add file in the destination
  18 +public define Word32 _CXM_PKG_INDEX_PART = 0x33770440. // ID of package Index part
  19 +public define Word32 _CXM_PKG_IDX_ENTRY = 0x33770441. // Index entry information
20 20
21 // **************** UPDATE SERVICE *************** 21 // **************** UPDATE SERVICE ***************
22 22
23 -public define Int32 _CXM_UPDATE_SERVICE_MSG_BASIS = 0x33770800. //  
24 -public define Int32 _CXM_UPD_SERVICE_ID = 0x33770801.  
25 -public define Int32 _CXM_UPD_HAS_UPDATE = 0x33770802. // 23 +public define Word32 _CXM_UPDATE_SERVICE_MSG_BASIS = 0x33770800. //
  24 +public define Word32 _CXM_UPD_SERVICE_ID = 0x33770801.
  25 +public define Word32 _CXM_UPD_HAS_UPDATE = 0x33770802. //
26 26
27 // **************** SERVICE NEGOCIATION *************** 27 // **************** SERVICE NEGOCIATION ***************
28 28
29 -public define Int32 _CXM_SERVICE_NEGOCIATION_BASIS = 0x33770C00. //  
30 -public define Int32 _CXM_REQUEST_FOR_SERVICE = 0x33770C01. // 29 +public define Word32 _CXM_SERVICE_NEGOCIATION_BASIS = 0x33770C00. //
  30 +public define Word32 _CXM_REQUEST_FOR_SERVICE = 0x33770C01. //
31 31
32 // **************** GENERIC PROTOCOL *************** 32 // **************** GENERIC PROTOCOL ***************
33 33
34 -public define Int32 _CXM_GENERIC_PROTOCOL_BASIS = 0x33771000. //  
35 -public define Int32 _CXM_ACK = 0x33771001. //  
36 -public define Int32 _CXM_ACK_RESULT_MSG = 0x33771002. // 34 +public define Word32 _CXM_GENERIC_PROTOCOL_BASIS = 0x33771000. //
  35 +public define Word32 _CXM_ACK = 0x33771001. //
  36 +public define Word32 _CXM_ACK_RESULT_MSG = 0x33771002. //
37 37
38 // **************** FTP SERVICE *************** 38 // **************** FTP SERVICE ***************
39 39
40 -public define Int32 _CXM_FTP_SERVICE_MSG_BASIS = 0x33771400. //  
41 -public define Int32 _CXM_FTP_SERVICE_ID = 0x33771401.  
42 -public define Int32 _CXM_FTP_GET_FILE = 0x33771402.  
43 -public define Int32 _CXM_FTP_START_TRANSFERT = 0x33771403.  
44 -public define Int32 _CXM_FTP_DATA = 0x33771404. 40 +public define Word32 _CXM_FTP_SERVICE_MSG_BASIS = 0x33771400. //
  41 +public define Word32 _CXM_FTP_SERVICE_ID = 0x33771401.
  42 +public define Word32 _CXM_FTP_GET_FILE = 0x33771402.
  43 +public define Word32 _CXM_FTP_START_TRANSFERT = 0x33771403.
  44 +public define Word32 _CXM_FTP_DATA = 0x33771404.
45 45
46 // ************** LOGGER SERVICE ************** 46 // ************** LOGGER SERVICE **************
47 47
48 -public define Int32 _CXM_LOGGER_SERVICE_MSG_BASIS = 0x33771800. //  
49 -public define Int32 _CXM_LOGGER_SERVICE_ID = 0x33771801.  
50 -public define Int32 _CXM_LOGGER_LOG = 0x33771802. 48 +public define Word32 _CXM_LOGGER_SERVICE_MSG_BASIS = 0x33771800. //
  49 +public define Word32 _CXM_LOGGER_SERVICE_ID = 0x33771801.
  50 +public define Word32 _CXM_LOGGER_LOG = 0x33771802.
51 51
52 // ************** DOMAIN SERVICE ************** 52 // ************** DOMAIN SERVICE **************
53 53
54 // MF <-> DomainManager 54 // MF <-> DomainManager
55 -public define Int32 _CXM_DOMAIN_SERVICE_MSG_BASIS = 0x33771C00. //  
56 -public define Int32 _CXM_DOMAIN_SERVICE_ID = 0x33771C01.  
57 -public define Int32 _CXM_DOMAIN_PUBLISH_MF_CONFIG = 0x33771C02.  
58 -public define Int32 _CXM_DOMAIN_GET_NAME = 0x33771C03.  
59 -public define Int32 _CXM_DOMAIN_GET_MY_IP = 0x33771C04.  
60 -public define Int32 _CXM_DOMAIN_PUBLISH_MY_IP = 0x33771C05.  
61 -public define Int32 _CXM_DOMAIN_PUBLISH_DYN_TEST = 0x33771C06.  
62 -public define Int32 _CXM_DOMAIN_GET_STATUS = 0x33771C07.  
63 -public define Int32 _CXM_DOMAIN_GET_DOMAIN_INFO = 0x33771C08. 55 +public define Word32 _CXM_DOMAIN_SERVICE_MSG_BASIS = 0x33771C00. //
  56 +public define Word32 _CXM_DOMAIN_SERVICE_ID = 0x33771C01.
  57 +public define Word32 _CXM_DOMAIN_PUBLISH_MF_CONFIG = 0x33771C02.
  58 +public define Word32 _CXM_DOMAIN_GET_NAME = 0x33771C03.
  59 +public define Word32 _CXM_DOMAIN_GET_MY_IP = 0x33771C04.
  60 +public define Word32 _CXM_DOMAIN_PUBLISH_MY_IP = 0x33771C05.
  61 +public define Word32 _CXM_DOMAIN_PUBLISH_DYN_TEST = 0x33771C06.
  62 +public define Word32 _CXM_DOMAIN_GET_STATUS = 0x33771C07.
  63 +public define Word32 _CXM_DOMAIN_GET_DOMAIN_INFO = 0x33771C08.
64 64
65 65
66 // DomainManager <-> Gandi 66 // DomainManager <-> Gandi
67 -public define Int32 _CXM_GANDI_SERVICE_ID = 0x33771D00.  
68 -public define Int32 _CXM_GANDI_CHECK_AVAILABILITY = 0x33771D01. // 'NAME' (String): Base names (without extension) of the wanted domains 67 +public define Word32 _CXM_GANDI_SERVICE_ID = 0x33771D00.
  68 +public define Word32 _CXM_GANDI_CHECK_AVAILABILITY = 0x33771D01. // 'NAME' (String): Base names (without extension) of the wanted domains
69 // --> CXM_ACK with 'DOMAINS' (String): Array of avaiblable domains 69 // --> CXM_ACK with 'DOMAINS' (String): Array of avaiblable domains
70 -public define Int32 _CXM_GANDI_CREATE_CONTACT = 0x33771D02. // 'CLASS' (String): 70 +public define Word32 _CXM_GANDI_CREATE_CONTACT = 0x33771D02. // 'CLASS' (String):
71 // 'FIRSTNAME', 'LASTNAME', 'ADDRESS', 'ZIPCODE', 'CITY', 'COUNTRY', 'PHONE', 'EMAIL' (String) 71 // 'FIRSTNAME', 'LASTNAME', 'ADDRESS', 'ZIPCODE', 'CITY', 'COUNTRY', 'PHONE', 'EMAIL' (String)
72 // --> CXM_ACK with 'CONTACT_HANDLE' (String): Created handle for this contact 72 // --> CXM_ACK with 'CONTACT_HANDLE' (String): Created handle for this contact
73 -public define Int32 _CXM_GANDI_CREATE_DOMAIN = 0x33771D03. // 'DOMAIN' (String): Domain full name 73 +public define Word32 _CXM_GANDI_CREATE_DOMAIN = 0x33771D03. // 'DOMAIN' (String): Domain full name
74 // 'OWNER' (String): Owner handle 74 // 'OWNER' (String): Owner handle
75 // --> CXM_ACK with 'DOMAIN_HANDLE' (String): Created handle for this domain 75 // --> CXM_ACK with 'DOMAIN_HANDLE' (String): Created handle for this domain
calexium_lib/database/db_utils.anubis
@@ -19,7 +19,7 @@ define Result(SQLite3Error, SQLite3HeadersOrRow -&gt; SQLite3Row) @@ -19,7 +19,7 @@ define Result(SQLite3Error, SQLite3HeadersOrRow -&gt; SQLite3Row)
19 ( 19 (
20 SQLite3DataBase db, 20 SQLite3DataBase db,
21 String sql_command, 21 String sql_command,
22 - Int32 timeout 22 + Int timeout
23 ) = 23 ) =
24 24
25 if sql_query(db, sql_command) is 25 if sql_query(db, sql_command) is
@@ -101,17 +101,17 @@ public define List(String) @@ -101,17 +101,17 @@ public define List(String)
101 db_get_string_list(table_cursor, [s . so_far]) 101 db_get_string_list(table_cursor, [s . so_far])
102 }. 102 }.
103 103
104 -public define List(Int32) 104 +public define List(Int)
105 db_get_integer_list 105 db_get_integer_list
106 ( 106 (
107 SQLite3HeadersOrRow -> SQLite3Row table_cursor, 107 SQLite3HeadersOrRow -> SQLite3Row table_cursor,
108 - List(Int32) so_far 108 + List(Int) so_far
109 ) = 109 ) =
110 if table_cursor(next_row) is 110 if table_cursor(next_row) is
111 { 111 {
112 error(sql_error) then logError("DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far), 112 error(sql_error) then logError("DB", db_error(sql_error, "db_get_integer_list")); reverse(so_far),
113 no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty 113 no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty
114 row(explorer) then 114 row(explorer) then
115 - with s = (Int32)db_integer(explorer)(0), 115 + with s = (Int)db_integer(explorer)(0),
116 db_get_integer_list(table_cursor, [s . so_far]) 116 db_get_integer_list(table_cursor, [s . so_far])
117 }. 117 }.
calexium_lib/net_services/CXM_generic_client.anubis
@@ -22,10 +22,10 @@ read calexium_lib/net_services/CXM_generic_protocol.anubis @@ -22,10 +22,10 @@ read calexium_lib/net_services/CXM_generic_protocol.anubis
22 22
23 // --Generic types--------------------------------------------------------------------- 23 // --Generic types---------------------------------------------------------------------
24 public type NetServiceAnswer: 24 public type NetServiceAnswer:
25 - netservice_error (Int32 cmd,  
26 - Int32 result_code, 25 + netservice_error (Word32 cmd,
  26 + Word32 result_code,
27 String result_string), 27 String result_string),
28 - netservice_ok (Int32 cmd, 28 + netservice_ok (Word32 cmd,
29 Maybe(Message) result_msg). 29 Maybe(Message) result_msg).
30 30
31 // --Generic functions--------------------------------------------------------------------- 31 // --Generic functions---------------------------------------------------------------------
@@ -36,7 +36,7 @@ public define Maybe(NetServiceAnswer) @@ -36,7 +36,7 @@ public define Maybe(NetServiceAnswer)
36 ( 36 (
37 MessageQueue queue, 37 MessageQueue queue,
38 Message msg_to_send, 38 Message msg_to_send,
39 - Int32 timeout, 39 + Int timeout,
40 (String) -> One logger 40 (String) -> One logger
41 )= 41 )=
42 queue.add_Message_to_send(msg_to_send); 42 queue.add_Message_to_send(msg_to_send);
@@ -66,7 +66,7 @@ public define Maybe($T) @@ -66,7 +66,7 @@ public define Maybe($T)
66 generic_handler 66 generic_handler
67 ( 67 (
68 MessageQueue queue, 68 MessageQueue queue,
69 - Int32 timeout, 69 + Int timeout,
70 Message msg_to_send, 70 Message msg_to_send,
71 (Message) -> Maybe($T) handler, 71 (Message) -> Maybe($T) handler,
72 (String) -> One logger 72 (String) -> One logger
@@ -96,7 +96,7 @@ public define Maybe($T) @@ -96,7 +96,7 @@ public define Maybe($T)
96 public define (MessageQueue, String) -> Maybe($T) 96 public define (MessageQueue, String) -> Maybe($T)
97 make_generic_handler 97 make_generic_handler
98 ( 98 (
99 - Int32 timeout, 99 + Int timeout,
100 Message msg_to_send, 100 Message msg_to_send,
101 (Message) -> Maybe($T) handler, 101 (Message) -> Maybe($T) handler,
102 (String) -> One logger 102 (String) -> One logger
@@ -108,8 +108,8 @@ define Maybe($T) @@ -108,8 +108,8 @@ define Maybe($T)
108 generic_request_for_service 108 generic_request_for_service
109 ( 109 (
110 MessageQueue queue, 110 MessageQueue queue,
111 - Int32 service_id,  
112 - Int32 service_version, 111 + Word32 service_id,
  112 + Word32 service_version,
113 (MessageQueue, String) -> Maybe($T) handler, 113 (MessageQueue, String) -> Maybe($T) handler,
114 (String) -> One logger 114 (String) -> One logger
115 )= 115 )=
@@ -147,10 +147,10 @@ public define Maybe($T) @@ -147,10 +147,10 @@ public define Maybe($T)
147 generic_connect_to_net_service 147 generic_connect_to_net_service
148 ( 148 (
149 String queue_name, 149 String queue_name,
150 - Int32 server,  
151 - Int32 port,  
152 - Int32 service_id,  
153 - Int32 service_version, 150 + Word32 server,
  151 + Word32 port,
  152 + Word32 service_id,
  153 + Word32 service_version,
154 (MessageQueue, String) -> Maybe($T) handler, 154 (MessageQueue, String) -> Maybe($T) handler,
155 (String) -> One logger 155 (String) -> One logger
156 ) 156 )
calexium_lib/net_services/CXM_generic_protocol.anubis
@@ -14,10 +14,10 @@ read tools/basis.anubis @@ -14,10 +14,10 @@ read tools/basis.anubis
14 read system/message_queue.anubis 14 read system/message_queue.anubis
15 read calexium_lib/CXM_message_constants.anubis 15 read calexium_lib/CXM_message_constants.anubis
16 16
17 -public define Int32 _CXM_OK = 0.  
18 -public define Int32 _CXM_ERROR = 1.  
19 -public define Int32 _CXM_UNKNOW_CMD = 2.  
20 -public define Int32 _CXM_UNKNOW_SERVICE = 3. 17 +public define Word32 _CXM_OK = 0.
  18 +public define Word32 _CXM_ERROR = 1.
  19 +public define Word32 _CXM_UNKNOW_CMD = 2.
  20 +public define Word32 _CXM_UNKNOW_SERVICE = 3.
21 21
22 public type ProtocolResult: 22 public type ProtocolResult:
23 failure, 23 failure,
@@ -31,8 +31,8 @@ public define One @@ -31,8 +31,8 @@ public define One
31 send_ACK_error 31 send_ACK_error
32 ( 32 (
33 MessageQueue queue, 33 MessageQueue queue,
34 - Int32 cmd_id,  
35 - Int32 error_code, 34 + Word32 cmd_id,
  35 + Word32 error_code,
36 String error_string, 36 String error_string,
37 )= 37 )=
38 with err_msg = message(_CXM_ACK), 38 with err_msg = message(_CXM_ACK),
@@ -46,7 +46,7 @@ public define One @@ -46,7 +46,7 @@ public define One
46 send_ACK_error 46 send_ACK_error
47 ( 47 (
48 MessageQueue queue, 48 MessageQueue queue,
49 - Int32 cmd_id 49 + Word32 cmd_id
50 )= 50 )=
51 send_ACK_error(queue, cmd_id, _CXM_ERROR, ""). 51 send_ACK_error(queue, cmd_id, _CXM_ERROR, "").
52 52
@@ -54,7 +54,7 @@ public define One @@ -54,7 +54,7 @@ public define One
54 send_ACK_ok 54 send_ACK_ok
55 ( 55 (
56 MessageQueue queue, 56 MessageQueue queue,
57 - Int32 cmd_id 57 + Word32 cmd_id
58 )= 58 )=
59 with ok_msg = message(_CXM_ACK), 59 with ok_msg = message(_CXM_ACK),
60 forget(add_int32(ok_msg, "CMD", cmd_id)); 60 forget(add_int32(ok_msg, "CMD", cmd_id));
@@ -66,7 +66,7 @@ public define One @@ -66,7 +66,7 @@ public define One
66 send_ACK_ok 66 send_ACK_ok
67 ( 67 (
68 MessageQueue queue, 68 MessageQueue queue,
69 - Int32 cmd_id, 69 + Word32 cmd_id,
70 Message result 70 Message result
71 )= 71 )=
72 with ok_msg = message(_CXM_ACK), 72 with ok_msg = message(_CXM_ACK),
@@ -80,7 +80,7 @@ public define One @@ -80,7 +80,7 @@ public define One
80 send_result 80 send_result
81 ( 81 (
82 MessageQueue queue, 82 MessageQueue queue,
83 - Int32 cmd_id, 83 + Word32 cmd_id,
84 Maybe(Message) mb_msg 84 Maybe(Message) mb_msg
85 )= 85 )=
86 if mb_msg is 86 if mb_msg is
@@ -93,7 +93,7 @@ public define One @@ -93,7 +93,7 @@ public define One
93 send_result 93 send_result
94 ( 94 (
95 MessageQueue queue, 95 MessageQueue queue,
96 - Int32 cmd_id, 96 + Word32 cmd_id,
97 Bool result 97 Bool result
98 )= 98 )=
99 if result then 99 if result then
@@ -105,8 +105,8 @@ public define ProtocolResult @@ -105,8 +105,8 @@ public define ProtocolResult
105 wait_for_reply 105 wait_for_reply
106 ( 106 (
107 MessageQueue mQ, 107 MessageQueue mQ,
108 - Int32 wait_cmd,  
109 - Int32 t_out 108 + Word32 wait_cmd,
  109 + Int t_out
110 ) = 110 ) =
111 if mQ.get_next_received_Message(t_out) is 111 if mQ.get_next_received_Message(t_out) is
112 { 112 {
calexium_lib/net_services/CXM_net_services.anubis
@@ -18,8 +18,8 @@ read calexium_lib/CXM_message_constants.anubis @@ -18,8 +18,8 @@ read calexium_lib/CXM_message_constants.anubis
18 18
19 public type NetService: 19 public type NetService:
20 net_service( 20 net_service(
21 - Int32 version,  
22 - Int32 id, 21 + Word32 version,
  22 + Word32 id,
23 String name, 23 String name,
24 (MessageQueue, String, String) -> One handler // Parameters are MessageQueue, peer IP and timestamp string 24 (MessageQueue, String, String) -> One handler // Parameters are MessageQueue, peer IP and timestamp string
25 ). 25 ).
@@ -43,14 +43,14 @@ define Maybe(NetService) @@ -43,14 +43,14 @@ define Maybe(NetService)
43 find_service 43 find_service
44 ( 44 (
45 List(NetService) services_list, 45 List(NetService) services_list,
46 - Int32 service_id,  
47 - Int32 service_version 46 + Word32 service_id,
  47 + Word32 service_version
48 )= 48 )=
49 if services_list is 49 if services_list is
50 { 50 {
51 [] then failure, 51 [] then failure,
52 [h.t] then 52 [h.t] then
53 - if h.id = service_id & h.version >= service_version then 53 + if h.id = service_id & h.version >=+ service_version then
54 success(h) 54 success(h)
55 else 55 else
56 find_service(t, service_id, service_version) 56 find_service(t, service_id, service_version)
@@ -93,7 +93,7 @@ define Maybe(NetService) @@ -93,7 +93,7 @@ define Maybe(NetService)
93 define String 93 define String
94 get_time_stamp 94 get_time_stamp
95 = 95 =
96 - with time = (UTime) now, 96 + with time = (UTime) unow,
97 "<"+virtual_machine_id+"@"+time.seconds+">". 97 "<"+virtual_machine_id+"@"+time.seconds+">".
98 98
99 /** This message_received function just handle the negociation process the available net_services. 99 /** This message_received function just handle the negociation process the available net_services.
@@ -173,7 +173,7 @@ public define Maybe(Server) @@ -173,7 +173,7 @@ public define Maybe(Server)
173 start_net_services 173 start_net_services
174 ( 174 (
175 List(NetService) net_services, 175 List(NetService) net_services,
176 - Int32 network_port, 176 + Word32 network_port,
177 Var(Bool) shutdown_required 177 Var(Bool) shutdown_required
178 )= 178 )=
179 if start_server(0, 179 if start_server(0,
calexium_lib/net_services_protocols/ftp_client.anubis
@@ -21,8 +21,8 @@ define Maybe(One) @@ -21,8 +21,8 @@ define Maybe(One)
21 ( 21 (
22 MessageQueue mQ, 22 MessageQueue mQ,
23 WStream fd, 23 WStream fd,
24 - Int32 so_far,  
25 - Int32 left_read 24 + Int so_far,
  25 + Int left_read
26 )= 26 )=
27 //println("receive_data "); 27 //println("receive_data ");
28 if mQ.get_next_received_Message(30) is 28 if mQ.get_next_received_Message(30) is
@@ -58,7 +58,7 @@ define Maybe(One) @@ -58,7 +58,7 @@ define Maybe(One)
58 ( 58 (
59 MessageQueue mQ, 59 MessageQueue mQ,
60 String local_file, 60 String local_file,
61 - Int32 size 61 + Int size
62 )= 62 )=
63 make_directories(local_file); 63 make_directories(local_file);
64 if file(local_file, new) is 64 if file(local_file, new) is
@@ -96,7 +96,7 @@ define Maybe(One) @@ -96,7 +96,7 @@ define Maybe(One)
96 { 96 {
97 failure then println("file size not found"); failure, 97 failure then println("file size not found"); failure,
98 success(size) then println("file size "+size); 98 success(size) then println("file size "+size);
99 - start_get_file_transtert(mQ, local_file, size) 99 + start_get_file_transtert(mQ, local_file, to_Int(size))
100 } 100 }
101 } 101 }
102 }. 102 }.
@@ -131,7 +131,7 @@ public define Maybe(One) @@ -131,7 +131,7 @@ public define Maybe(One)
131 ftp_get_file 131 ftp_get_file
132 ( 132 (
133 String server, 133 String server,
134 - Int32 ip_port, 134 + Word32 ip_port,
135 String remote_file, 135 String remote_file,
136 String local_file 136 String local_file
137 )= 137 )=
calexium_lib/net_services_protocols/logger_service.anubis
@@ -23,12 +23,12 @@ read calexium_lib/net_services/CXM_generic_protocol.anubis @@ -23,12 +23,12 @@ read calexium_lib/net_services/CXM_generic_protocol.anubis
23 // Special non-existing file. This is a work arround for a impossibility to define global configuration in anubis. 23 // Special non-existing file. This is a work arround for a impossibility to define global configuration in anubis.
24 // So this file allows you to specify on which UDP port the logger server is listening. 24 // So this file allows you to specify on which UDP port the logger server is listening.
25 // You have to provide this file in your base source directory (or any other folder which is scanned by the compilater, 25 // You have to provide this file in your base source directory (or any other folder which is scanned by the compilater,
26 -// and you define a function named 'logger_port' which simply return the port number as an Int32. 26 +// and you define a function named 'logger_port' which simply return the port number as an Word32.
27 // Example: 27 // Example:
28 -// public define Int32 logger_port = 33610. 28 +// public define Word32 logger_port = 33610.
29 read logger_config.anubis 29 read logger_config.anubis
30 30
31 -public define Int32 logger_srv_version = 1. 31 +public define Word32 logger_srv_version = 1.
32 32
33 /** 33 /**
34 * has_update scan the given message for finding corresponding available update 34 * has_update scan the given message for finding corresponding available update
@@ -75,7 +75,7 @@ define Bool @@ -75,7 +75,7 @@ define Bool
75 { 75 {
76 failure then logError(log, "process_log can't find Level");false, 76 failure then logError(log, "process_log can't find Level");false,
77 success(thread_id) then 77 success(thread_id) then
78 - with level = get_LogLevel_from_value(int_level), 78 + with level = get_LogLevel_from_value(to_Int(int_level)),
79 if level is logTrace then 79 if level is logTrace then
80 if find_string(msg, "LogMask") is 80 if find_string(msg, "LogMask") is
81 { 81 {
@@ -174,14 +174,14 @@ public define String @@ -174,14 +174,14 @@ public define String
174 data_preview 174 data_preview
175 ( 175 (
176 ByteArray data, 176 ByteArray data,
177 - Int32 max 177 + Int max
178 ) = 178 ) =
179 with l = length(data), 179 with l = length(data),
180 firsts_bytes = extract(data, 0, max), 180 firsts_bytes = extract(data, 0, max),
181 "Length=" + l + "; String='"+to_string(firsts_bytes)+"' Buffer=[" + to_ascii(firsts_bytes) + (if l > max then "...]" else "]"). 181 "Length=" + l + "; String='"+to_string(firsts_bytes)+"' Buffer=[" + to_ascii(firsts_bytes) + (if l > max then "...]" else "]").
182 182
183 183
184 -define (UDP_Socket, ByteArray, Truncation, Int32, Int32) -> One 184 +define (UDP_Socket, ByteArray, Truncation, Word32, Word32) -> One
185 make_udp_handler 185 make_udp_handler
186 ( 186 (
187 List(Logger) logs, 187 List(Logger) logs,
@@ -191,8 +191,8 @@ define (UDP_Socket, ByteArray, Truncation, Int32, Int32) -&gt; One @@ -191,8 +191,8 @@ define (UDP_Socket, ByteArray, Truncation, Int32, Int32) -&gt; One
191 UDP_Socket socket, 191 UDP_Socket socket,
192 ByteArray data, 192 ByteArray data,
193 Truncation truncation, 193 Truncation truncation,
194 - Int32 ip_address,  
195 - Int32 ip_port 194 + Word32 ip_address,
  195 + Word32 ip_port
196 ) |-> 196 ) |->
197 with ip = ip_addr_to_string(ip_address), 197 with ip = ip_addr_to_string(ip_address),
198 logTrace(debug_logger, logMask("Logger"), "LoggerServer: data received (" + length(data) + " bytes) from IP " + ip + "... "); 198 logTrace(debug_logger, logMask("Logger"), "LoggerServer: data received (" + length(data) + " bytes) from IP " + ip + "... ");
@@ -292,14 +292,14 @@ define Message @@ -292,14 +292,14 @@ define Message
292 ( 292 (
293 String logger_name, 293 String logger_name,
294 String log_string, 294 String log_string,
295 - Int32 level 295 + Int level
296 )= 296 )=
297 with string = if length(log_string) > 1024 then (if sub_string(log_string, 0, 1024) is success(s) then s else "?") + "..." 297 with string = if length(log_string) > 1024 then (if sub_string(log_string, 0, 1024) is success(s) then s else "?") + "..."
298 else log_string, 298 else log_string,
299 with log_msg = message(_CXM_LOGGER_LOG), 299 with log_msg = message(_CXM_LOGGER_LOG),
300 forget(add_string(log_msg, "LogName", logger_name)); 300 forget(add_string(log_msg, "LogName", logger_name));
301 forget(add_string(log_msg, "LogString", string)); 301 forget(add_string(log_msg, "LogString", string));
302 - forget(add_int32(log_msg, "Level", level)); 302 + forget(add_int32(log_msg, "Level", truncate_to_Word32(level)));
303 forget(add_int32(log_msg, "Thread", virtual_machine_id)); 303 forget(add_int32(log_msg, "Thread", virtual_machine_id));
304 log_msg 304 log_msg
305 . 305 .
calexium_lib/net_services_protocols/pkg_updater_protocol.anubis
@@ -8,5 +8,5 @@ @@ -8,5 +8,5 @@
8 */ 8 */
9 9
10 10
11 -public define Int32 no_update = 0.  
12 -public define Int32 update_available = 1. 11 +public define Word32 no_update = 0.
  12 +public define Word32 update_available = 1.
calexium_lib/web/CXM_cookies.anubis
@@ -12,9 +12,10 @@ @@ -12,9 +12,10 @@
12 12
13 13
14 read tools/basis.anubis 14 read tools/basis.anubis
15 -read web/CXM_common.anubis  
16 -read web/CXM_html.anubis  
17 -read web/CXM_http_get_common.anubis 15 +read system/string.anubis
  16 +read CXM_common.anubis
  17 +read CXM_html.anubis
  18 +read CXM_http_get_common.anubis
18 19
19 20
20 *Overview* 21 *Overview*
@@ -30,10 +31,10 @@ public type Cookie: @@ -30,10 +31,10 @@ public type Cookie:
30 // attributes: 31 // attributes:
31 Maybe(String) comment, // cookies may have human readable comments 32 Maybe(String) comment, // cookies may have human readable comments
32 Maybe(String) domain, // domain name as sent by the server 33 Maybe(String) domain, // domain name as sent by the server
33 - Int32 validity, // cookie still valid if this is > now 34 + Int validity, // cookie still valid if this is > now
34 Maybe(String) path, // server path for which the cookie is valid 35 Maybe(String) path, // server path for which the cookie is valid
35 Bool secure, // if true, do not send this cookie over an insecure link 36 Bool secure, // if true, do not send this cookie over an insecure link
36 - Int32 version). // Cookie version (normally 1: rfc 2109) 37 + Int version). // Cookie version (normally 1: rfc 2109)
37 38
38 39
39 Cookies are sent by servers through 'Set-Cookie' HTTP headers. The function 40 Cookies are sent by servers through 'Set-Cookie' HTTP headers. The function
@@ -123,24 +124,23 @@ define Bool @@ -123,24 +124,23 @@ define Bool
123 ( 124 (
124 Word8 c 125 Word8 c
125 ) = 126 ) =
126 - with n = word8_to_int32(c),  
127 - if n < 33 then false else  
128 - if n < 34 then true else  
129 - if n < 35 then false else  
130 - if n < 40 then true else  
131 - if n < 42 then false else  
132 - if n < 44 then true else  
133 - if n < 45 then false else  
134 - if n < 47 then true else  
135 - if n < 48 then false else  
136 - if n < 58 then true else  
137 - if n < 65 then false else  
138 - if n < 91 then true else  
139 - if n < 94 then false else  
140 - if n < 123 then true else  
141 - if n < 124 then false else  
142 - if n = 124 then true else  
143 - n = 126. 127 + if c +< 33 then false else
  128 + if c +< 34 then true else
  129 + if c +< 35 then false else
  130 + if c +< 40 then true else
  131 + if c +< 42 then false else
  132 + if c +< 44 then true else
  133 + if c +< 45 then false else
  134 + if c +< 47 then true else
  135 + if c +< 48 then false else
  136 + if c +< 58 then true else
  137 + if c +< 65 then false else
  138 + if c +< 91 then true else
  139 + if c +< 94 then false else
  140 + if c +< 123 then true else
  141 + if c +< 124 then false else
  142 + if c = 124 then true else
  143 + c = 126.
144 144
145 145
146 From the grammar, it is clear that atomic entities (called 'tokens' by YACC) are: 146 From the grammar, it is clear that atomic entities (called 'tokens' by YACC) are:
@@ -194,7 +194,7 @@ define Atom @@ -194,7 +194,7 @@ define Atom
194 194
195 195
196 variable String input = "". From which cookies will be read. 196 variable String input = "". From which cookies will be read.
197 -variable Int32 index = 0. Current position within 'input'. 197 +variable Int index = 0. Current position within 'input'.
198 198
199 define Maybe(Word8) 199 define Maybe(Word8)
200 next_char 200 next_char
@@ -245,8 +245,7 @@ define Bool @@ -245,8 +245,7 @@ define Bool
245 ( 245 (
246 Word8 c 246 Word8 c
247 ) = 247 ) =
248 - with n = word8_to_int32(c),  
249 - n =< ' '. 248 + c +=< ' '.
250 249
251 Reading an atom from the input: 250 Reading an atom from the input:
252 251
@@ -349,7 +348,7 @@ define Maybe(String) @@ -349,7 +348,7 @@ define Maybe(String)
349 else get_domain(t) 348 else get_domain(t)
350 }. 349 }.
351 350
352 -define Int32 351 +define Int
353 get_validity 352 get_validity
354 ( 353 (
355 List(AttrVal) l 354 List(AttrVal) l
@@ -358,7 +357,7 @@ define Int32 @@ -358,7 +357,7 @@ define Int32
358 { 357 {
359 [ ] then 0, 358 [ ] then 0,
360 [h . t] then if h is max_age(a) 359 [h . t] then if h is max_age(a)
361 - then if string_to_integer(a) is 360 + then if decimal_scan(a) is
362 { 361 {
363 failure then 0, 362 failure then 0,
364 success(n) then n+now 363 success(n) then n+now
@@ -392,7 +391,7 @@ define Bool @@ -392,7 +391,7 @@ define Bool
392 else get_secure(t) 391 else get_secure(t)
393 }. 392 }.
394 393
395 -define Int32 394 +define Int
396 get_version 395 get_version
397 ( 396 (
398 List(AttrVal) l 397 List(AttrVal) l
@@ -401,7 +400,7 @@ define Int32 @@ -401,7 +400,7 @@ define Int32
401 { 400 {
402 [ ] then 0, 401 [ ] then 0,
403 [h . t] then if h is version(v) 402 [h . t] then if h is version(v)
404 - then if string_to_integer(v) is 403 + then if decimal_scan(v) is
405 { 404 {
406 failure then 0, 405 failure then 0,
407 success(n) then n 406 success(n) then n
@@ -562,7 +561,7 @@ define HTTP_header @@ -562,7 +561,7 @@ define HTTP_header
562 ) = 561 ) =
563 if c is cookie(sn,n,v,mbc,mbd,vld,mbp,sec,ver) then 562 if c is cookie(sn,n,v,mbc,mbd,vld,mbp,sec,ver) then
564 http_header("Cookie", 563 http_header("Cookie",
565 - "$Version=" + integer_to_string(ver) + 564 + "$Version=" + to_decimal(ver) +
566 ";" + n + "=\"" + v + "\"" + 565 ";" + n + "=\"" + v + "\"" +
567 if mbp is 566 if mbp is
568 { 567 {
calexium_lib/web/CXM_generic_form.anubis
@@ -28,11 +28,11 @@ public type Width: @@ -28,11 +28,11 @@ public type Width:
28 small, 28 small,
29 narrow, 29 narrow,
30 wide, 30 wide,
31 - custom(Int32). 31 + custom(Int).
32 32
33 public type FormFieldWidth: 33 public type FormFieldWidth:
34 auto, 34 auto,
35 - custom(Int32). 35 + custom(Int).
36 36
37 37
38 38
@@ -42,7 +42,7 @@ public type FormField: @@ -42,7 +42,7 @@ public type FormField:
42 42
43 //--- title field --------------------------------------------------------------------- 43 //--- title field ---------------------------------------------------------------------
44 title (String text), 44 title (String text),
45 - title (Int32 text_size, 45 + title (Int text_size,
46 String text), 46 String text),
47 title_f (List(Text_Option) -> HTML_In_Form), 47 title_f (List(Text_Option) -> HTML_In_Form),
48 48
@@ -135,8 +135,8 @@ public type FormField: @@ -135,8 +135,8 @@ public type FormField:
135 text_area (WebArgName web_arg_name, 135 text_area (WebArgName web_arg_name,
136 String tag, 136 String tag,
137 InitialValue initial_text, 137 InitialValue initial_text,
138 - Int32 width,  
139 - Int32 height), 138 + Int width,
  139 + Int height),
140 140
141 //--- fields table -------------------------------------------------------------------- 141 //--- fields table --------------------------------------------------------------------
142 fields_table (String tag, 142 fields_table (String tag,
@@ -192,7 +192,7 @@ public define HTML_Off_Form @@ -192,7 +192,7 @@ public define HTML_Off_Form
192 ( 192 (
193 String form_name, 193 String form_name,
194 RGB background_color, 194 RGB background_color,
195 - Int32 width, 195 + Int width,
196 List(FormField) fields 196 List(FormField) fields
197 ). 197 ).
198 198
@@ -414,7 +414,7 @@ define HTML_Row(HTML_In_Form) @@ -414,7 +414,7 @@ define HTML_Row(HTML_In_Form)
414 [ 414 [
415 cell([right,top], text([size(10)],tag)), 415 cell([right,top], text([size(10)],tag)),
416 cell([width(7)], text([],"")), 416 cell([width(7)], text([],"")),
417 - cell([left,top], table([],map((FormField ff) |-> format_form_field(ff),fields))) 417 + cell([left,top], table([],map((FormField ff2) |-> format_form_field(ff2),fields)))
418 ], 418 ],
419 419
420 fields_line(tag,fields) then (List(HTML_Cell(HTML_In_Form))) 420 fields_line(tag,fields) then (List(HTML_Cell(HTML_In_Form)))
@@ -422,13 +422,13 @@ define HTML_Row(HTML_In_Form) @@ -422,13 +422,13 @@ define HTML_Row(HTML_In_Form)
422 cell([right,top], text([size(10)],tag)), 422 cell([right,top], text([size(10)],tag)),
423 cell([width(7)], text([],"")), 423 cell([width(7)], text([],"")),
424 cell([left,top], table([nude],[row([], //border(0,0,3,rgb(0,0,0)) 424 cell([left,top], table([nude],[row([], //border(0,0,3,rgb(0,0,0))
425 - map((FormField ff) |-> cell([top],table([nude],[format_form_field(ff)])),fields))])) 425 + map((FormField ff2) |-> cell([top],table([nude],[format_form_field(ff2)])),fields))]))
426 ], 426 ],
427 427
428 fields_line(fields) then (List(HTML_Cell(HTML_In_Form))) 428 fields_line(fields) then (List(HTML_Cell(HTML_In_Form)))
429 [ 429 [
430 cell([left,top,columns(3)], table([nude],[row([], 430 cell([left,top,columns(3)], table([nude],[row([],
431 - map((FormField ff) |-> cell([top],table([nude],[format_form_field(ff)])),fields))])) 431 + map((FormField ff2) |-> cell([top],table([nude],[format_form_field(ff2)])),fields))]))
432 ], 432 ],
433 433
434 preview(html_text) then (List(HTML_Cell(HTML_In_Form))) 434 preview(html_text) then (List(HTML_Cell(HTML_In_Form)))
@@ -460,7 +460,7 @@ public define HTML_Off_Form @@ -460,7 +460,7 @@ public define HTML_Off_Form
460 ( 460 (
461 String form_name, 461 String form_name,
462 RGB bg_color, 462 RGB bg_color,
463 - Int32 w, 463 + Int w,
464 List(FormField) fields 464 List(FormField) fields
465 ) = 465 ) =
466 table([border(0,0,5,bg_color),percentage_width(100), 466 table([border(0,0,5,bg_color),percentage_width(100),
calexium_lib/web/CXM_generic_table.anubis
@@ -48,7 +48,7 @@ read CXM_making_a_web_site.anubis @@ -48,7 +48,7 @@ read CXM_making_a_web_site.anubis
48 +-----+----------+--------+-----------+-----------+ ............... 48 +-----+----------+--------+-----------+-----------+ ...............
49 49
50 For the total-line, assuming that datax1 to dataxn and datax32 to datan32 are numbers 50 For the total-line, assuming that datax1 to dataxn and datax32 to datan32 are numbers
51 - (Int32, Float or Maybe(Float)). 51 + (Int, Float or Maybe(Float)).
52 52
53 53
54 The columns name are just a List(Item_Row). 54 The columns name are just a List(Item_Row).
@@ -56,18 +56,18 @@ read CXM_making_a_web_site.anubis @@ -56,18 +56,18 @@ read CXM_making_a_web_site.anubis
56 The column 'num' is in the case you want to enumerate your data. The existence of this 56 The column 'num' is in the case you want to enumerate your data. The existence of this
57 column depends on the line function. 57 column depends on the line function.
58 58
59 - Lines are given by the function : (RGB color,Int32 num,$Data d) -> Item_Row 59 + Lines are given by the function : (RGB color,Int num,$Data d) -> Item_Row
60 60
61 where : - (RGB)color is the color of the background of the row (the 'a color' or 'b 61 where : - (RGB)color is the color of the background of the row (the 'a color' or 'b
62 color'); 62 color');
63 - - (Int32)num the number of the data (to enumerate). 63 + - (Int)num the number of the data (to enumerate).
64 64
65 So, this function must be written something like : 65 So, this function must be written something like :
66 66
67 - (RGB color, Int32 num,$Data d) |-> 67 + (RGB color, Int num,$Data d) |->
68 row([background_color(color)], // and of course possibly other row-options 68 row([background_color(color)], // and of course possibly other row-options
69 [ 69 [
70 - cell([], (Int32 -> $HTML)(num) ) 70 + cell([], (Int -> $HTML)(num) )
71 . ($Data -> List(Cell))d // how data is printed in cells 71 . ($Data -> List(Cell))d // how data is printed in cells
72 ]). 72 ]).
73 73
@@ -125,7 +125,7 @@ public type Total_Line($Data,$Upplet,$Row): @@ -125,7 +125,7 @@ public type Total_Line($Data,$Upplet,$Row):
125 scheme as a column), you must specify the number of columns. You will obtain : 125 scheme as a column), you must specify the number of columns. You will obtain :
126 126
127 Here is a List($Data) : l = [a,b,c,d,e,f,g,h,i,j,k,l,m]; 127 Here is a List($Data) : l = [a,b,c,d,e,f,g,h,i,j,k,l,m];
128 - and f : (RGB,Int32,$Data) -> Item_Row 128 + and f : (RGB,Int,$Data) -> Item_Row
129 You want to print this list on 3 columns. 129 You want to print this list on 3 columns.
130 The result will be : 130 The result will be :
131 131
@@ -151,8 +151,8 @@ public type Total_Line($Data,$Upplet,$Row): @@ -151,8 +151,8 @@ public type Total_Line($Data,$Upplet,$Row):
151 151
152 public type HowManyColumns: 152 public type HowManyColumns:
153 _1, 153 _1,
154 - several (Int32 col_nb,  
155 - Int32 spacer). 154 + several (Int col_nb,
  155 + Int spacer).
156 156
157 157
158 158
@@ -169,7 +169,7 @@ public define HTML_Off_Form @@ -169,7 +169,7 @@ public define HTML_Off_Form
169 List(Table_Option) lto, 169 List(Table_Option) lto,
170 List(HTML_Row(HTML_Off_Form)) columns_name, 170 List(HTML_Row(HTML_Off_Form)) columns_name,
171 HowManyColumns number_of_columns, 171 HowManyColumns number_of_columns,
172 - (RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form) line_format, 172 + (RGB,Int,$Data) -> HTML_Row(HTML_Off_Form) line_format,
173 RGB a_color, 173 RGB a_color,
174 RGB b_color, 174 RGB b_color,
175 Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line 175 Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
@@ -182,7 +182,7 @@ public define HTML_In_Form @@ -182,7 +182,7 @@ public define HTML_In_Form
182 List(Table_Option) lto, 182 List(Table_Option) lto,
183 List(HTML_Row(HTML_In_Form)) columns_name, 183 List(HTML_Row(HTML_In_Form)) columns_name,
184 HowManyColumns number_of_columns, 184 HowManyColumns number_of_columns,
185 - (RGB,Int32,$Data) -> HTML_Row(HTML_In_Form) line_format, 185 + (RGB,Int,$Data) -> HTML_Row(HTML_In_Form) line_format,
186 RGB a_color, 186 RGB a_color,
187 RGB b_color, 187 RGB b_color,
188 Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line 188 Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
@@ -263,7 +263,7 @@ public define HTML_Off_Form @@ -263,7 +263,7 @@ public define HTML_Off_Form
263 List(Table_Option) lto, 263 List(Table_Option) lto,
264 List(HTML_Row(HTML_Off_Form)) columns_name, 264 List(HTML_Row(HTML_Off_Form)) columns_name,
265 HowManyColumns number_of_columns, 265 HowManyColumns number_of_columns,
266 - (RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form) line_format, 266 + (RGB,Int,$Data) -> HTML_Row(HTML_Off_Form) line_format,
267 RGB a_color, 267 RGB a_color,
268 RGB b_color 268 RGB b_color
269 ). 269 ).
@@ -275,7 +275,7 @@ public define HTML_In_Form @@ -275,7 +275,7 @@ public define HTML_In_Form
275 List(Table_Option) lto, 275 List(Table_Option) lto,
276 List(HTML_Row(HTML_In_Form)) columns_name, 276 List(HTML_Row(HTML_In_Form)) columns_name,
277 HowManyColumns number_of_columns, 277 HowManyColumns number_of_columns,
278 - (RGB,Int32,$Data) -> HTML_Row(HTML_In_Form) line_format, 278 + (RGB,Int,$Data) -> HTML_Row(HTML_In_Form) line_format,
279 RGB a_color, 279 RGB a_color,
280 RGB b_color 280 RGB b_color
281 ). 281 ).
@@ -319,7 +319,7 @@ type Print_Table($Data): @@ -319,7 +319,7 @@ type Print_Table($Data):
319 print_table 319 print_table
320 ( 320 (
321 $Data data, 321 $Data data,
322 - Int32 num 322 + Int num
323 ). 323 ).
324 324
325 325
@@ -331,9 +331,9 @@ define (List(Print_Table($Data)),List($Data)) @@ -331,9 +331,9 @@ define (List(Print_Table($Data)),List($Data))
331 ( 331 (
332 List($Data) l, 332 List($Data) l,
333 List(Print_Table($Data)) result, 333 List(Print_Table($Data)) result,
334 - Int32 n,  
335 - Int32 ct, // counter  
336 - Int32 num 334 + Int n,
  335 + Int ct, // counter
  336 + Int num
337 ) = 337 ) =
338 if l is 338 if l is
339 { 339 {
@@ -349,8 +349,8 @@ define List(List(Print_Table($Data))) @@ -349,8 +349,8 @@ define List(List(Print_Table($Data)))
349 short_lists 349 short_lists
350 ( 350 (
351 List($Data) l, 351 List($Data) l,
352 - Int32 nb, // number of element of short list  
353 - Int32 ct // counter for numbering data (initialized at 0) 352 + Int nb, // number of element of short list
  353 + Int ct // counter for numbering data (initialized at 0)
354 ) = 354 ) =
355 if get_n_elements(l,[],nb,1,ct) is (result,unused) 355 if get_n_elements(l,[],nb,1,ct) is (result,unused)
356 then if unused is 356 then if unused is
@@ -367,7 +367,7 @@ define (List(HTML_Row($HTML)),$Upplet) @@ -367,7 +367,7 @@ define (List(HTML_Row($HTML)),$Upplet)
367 generic_rows 367 generic_rows
368 ( 368 (
369 List(Print_Table($Data)) lpt, 369 List(Print_Table($Data)) lpt,
370 - (RGB,Int32,$Data) -> HTML_Row($HTML) line_format, 370 + (RGB,Int,$Data) -> HTML_Row($HTML) line_format,
371 RGB a_color, 371 RGB a_color,
372 RGB b_color, 372 RGB b_color,
373 ($Upplet,$Data) -> $Upplet do_sum, 373 ($Upplet,$Data) -> $Upplet do_sum,
@@ -393,13 +393,13 @@ define List(HTML_Cell(HTML_In_Form)) @@ -393,13 +393,13 @@ define List(HTML_Cell(HTML_In_Form))
393 List(List(Print_Table($Data))) print_data, 393 List(List(Print_Table($Data))) print_data,
394 List(Table_Option) lto, 394 List(Table_Option) lto,
395 List(HTML_Row(HTML_In_Form)) names, 395 List(HTML_Row(HTML_In_Form)) names,
396 - (RGB,Int32,$Data) -> HTML_Row(HTML_In_Form) line_format, 396 + (RGB,Int,$Data) -> HTML_Row(HTML_In_Form) line_format,
397 RGB a_color, 397 RGB a_color,
398 RGB b_color, 398 RGB b_color,
399 ($Upplet,$Data) -> $Upplet do_sum, 399 ($Upplet,$Data) -> $Upplet do_sum,
400 $Upplet -> HTML_Row(HTML_In_Form) total_line, 400 $Upplet -> HTML_Row(HTML_In_Form) total_line,
401 $Upplet value, 401 $Upplet value,
402 - Int32 spacer 402 + Int spacer
403 ) = 403 ) =
404 if print_data is 404 if print_data is
405 { 405 {
@@ -427,7 +427,7 @@ public define HTML_In_Form @@ -427,7 +427,7 @@ public define HTML_In_Form
427 List(Table_Option) lto, 427 List(Table_Option) lto,
428 List(HTML_Row(HTML_In_Form)) names, 428 List(HTML_Row(HTML_In_Form)) names,
429 HowManyColumns hm_col, 429 HowManyColumns hm_col,
430 - (RGB,Int32,$Data) -> HTML_Row(HTML_In_Form) line_format, 430 + (RGB,Int,$Data) -> HTML_Row(HTML_In_Form) line_format,
431 RGB a_color, 431 RGB a_color,
432 RGB b_color, 432 RGB b_color,
433 Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line 433 Total_Line($Data,$Upplet,HTML_Row(HTML_In_Form)) total_line
@@ -486,13 +486,13 @@ define List(HTML_Cell(HTML_Off_Form)) @@ -486,13 +486,13 @@ define List(HTML_Cell(HTML_Off_Form))
486 List(List(Print_Table($Data))) print_data, 486 List(List(Print_Table($Data))) print_data,
487 List(Table_Option) lto, 487 List(Table_Option) lto,
488 List(HTML_Row(HTML_Off_Form)) names, 488 List(HTML_Row(HTML_Off_Form)) names,
489 - (RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form) line_format, 489 + (RGB,Int,$Data) -> HTML_Row(HTML_Off_Form) line_format,
490 RGB a_color, 490 RGB a_color,
491 RGB b_color, 491 RGB b_color,
492 ($Upplet,$Data) -> $Upplet do_sum, 492 ($Upplet,$Data) -> $Upplet do_sum,
493 $Upplet -> HTML_Row(HTML_Off_Form) total_line, 493 $Upplet -> HTML_Row(HTML_Off_Form) total_line,
494 $Upplet value, 494 $Upplet value,
495 - Int32 spacer 495 + Int spacer
496 ) = 496 ) =
497 if print_data is 497 if print_data is
498 { 498 {
@@ -520,7 +520,7 @@ public define HTML_Off_Form @@ -520,7 +520,7 @@ public define HTML_Off_Form
520 List(Table_Option) lto, 520 List(Table_Option) lto,
521 List(HTML_Row(HTML_Off_Form)) names, 521 List(HTML_Row(HTML_Off_Form)) names,
522 HowManyColumns hm_col, 522 HowManyColumns hm_col,
523 - (RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form) line_format, 523 + (RGB,Int,$Data) -> HTML_Row(HTML_Off_Form) line_format,
524 RGB a_color, 524 RGB a_color,
525 RGB b_color, 525 RGB b_color,
526 Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line 526 Total_Line($Data,$Upplet,HTML_Row(HTML_Off_Form)) total_line
@@ -588,7 +588,7 @@ public define HTML_Off_Form @@ -588,7 +588,7 @@ public define HTML_Off_Form
588 (List(Table_Option)) lto, 588 (List(Table_Option)) lto,
589 (List(HTML_Row(HTML_Off_Form))) columns_name, 589 (List(HTML_Row(HTML_Off_Form))) columns_name,
590 (HowManyColumns) _1, 590 (HowManyColumns) _1,
591 - ((RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 591 + ((RGB,Int,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
592 (RGB) a_color, 592 (RGB) a_color,
593 (RGB) b_color, 593 (RGB) b_color,
594 (Total_Line($Data,$Data,HTML_Row(HTML_Off_Form))) no_total 594 (Total_Line($Data,$Data,HTML_Row(HTML_Off_Form))) no_total
@@ -610,7 +610,7 @@ public define HTML_In_Form @@ -610,7 +610,7 @@ public define HTML_In_Form
610 (List(Table_Option)) lto, 610 (List(Table_Option)) lto,
611 (List(HTML_Row(HTML_In_Form))) columns_name, 611 (List(HTML_Row(HTML_In_Form))) columns_name,
612 (HowManyColumns) _1, 612 (HowManyColumns) _1,
613 - ((RGB,Int32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 613 + ((RGB,Int,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
614 (RGB) a_color, 614 (RGB) a_color,
615 (RGB) b_color, 615 (RGB) b_color,
616 (Total_Line($Data,$Data,HTML_Row(HTML_In_Form))) no_total 616 (Total_Line($Data,$Data,HTML_Row(HTML_In_Form))) no_total
@@ -637,7 +637,7 @@ public define HTML_Off_Form @@ -637,7 +637,7 @@ public define HTML_Off_Form
637 (List(Table_Option)) lto, 637 (List(Table_Option)) lto,
638 (List(HTML_Row(HTML_Off_Form))) columns_name, 638 (List(HTML_Row(HTML_Off_Form))) columns_name,
639 (HowManyColumns) _1, 639 (HowManyColumns) _1,
640 - ((RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 640 + ((RGB,Int,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
641 (RGB) a_color, 641 (RGB) a_color,
642 (RGB) b_color, 642 (RGB) b_color,
643 (Total_Line($Data,$Upplet,(HTML_Row(HTML_Off_Form)))) total_line 643 (Total_Line($Data,$Upplet,(HTML_Row(HTML_Off_Form)))) total_line
@@ -660,7 +660,7 @@ public define HTML_In_Form @@ -660,7 +660,7 @@ public define HTML_In_Form
660 (List(Table_Option)) lto, 660 (List(Table_Option)) lto,
661 (List(HTML_Row(HTML_In_Form))) columns_name, 661 (List(HTML_Row(HTML_In_Form))) columns_name,
662 (HowManyColumns) _1, 662 (HowManyColumns) _1,
663 - ((RGB,Int32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 663 + ((RGB,Int,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
664 (RGB) a_color, 664 (RGB) a_color,
665 (RGB) b_color, 665 (RGB) b_color,
666 (Total_Line($Data,$Upplet,(HTML_Row(HTML_In_Form)))) total_line 666 (Total_Line($Data,$Upplet,(HTML_Row(HTML_In_Form)))) total_line
@@ -678,7 +678,7 @@ public define HTML_Off_Form @@ -678,7 +678,7 @@ public define HTML_Off_Form
678 List(Table_Option) lto, 678 List(Table_Option) lto,
679 List(HTML_Row(HTML_Off_Form)) columns_name, 679 List(HTML_Row(HTML_Off_Form)) columns_name,
680 HowManyColumns number_of_columns, 680 HowManyColumns number_of_columns,
681 - (RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form) line_format, 681 + (RGB,Int,$Data) -> HTML_Row(HTML_Off_Form) line_format,
682 RGB a_color, 682 RGB a_color,
683 RGB b_color 683 RGB b_color
684 ) = 684 ) =
@@ -688,7 +688,7 @@ public define HTML_Off_Form @@ -688,7 +688,7 @@ public define HTML_Off_Form
688 (List(Table_Option)) lto, 688 (List(Table_Option)) lto,
689 (List(HTML_Row(HTML_Off_Form))) columns_name, 689 (List(HTML_Row(HTML_Off_Form))) columns_name,
690 (HowManyColumns) number_of_columns, 690 (HowManyColumns) number_of_columns,
691 - ((RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,n,d), 691 + ((RGB,Int,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int n,$Data d) |-> line_format(r,n,d),
692 (RGB) a_color, 692 (RGB) a_color,
693 (RGB) b_color, 693 (RGB) b_color,
694 (Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total 694 (Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total
@@ -702,7 +702,7 @@ public define HTML_In_Form @@ -702,7 +702,7 @@ public define HTML_In_Form
702 List(Table_Option) lto, 702 List(Table_Option) lto,
703 List(HTML_Row(HTML_In_Form)) columns_name, 703 List(HTML_Row(HTML_In_Form)) columns_name,
704 HowManyColumns number_of_columns, 704 HowManyColumns number_of_columns,
705 - (RGB,Int32,$Data) -> HTML_Row(HTML_In_Form) line_format, 705 + (RGB,Int,$Data) -> HTML_Row(HTML_In_Form) line_format,
706 RGB a_color, 706 RGB a_color,
707 RGB b_color 707 RGB b_color
708 ) = 708 ) =
@@ -712,7 +712,7 @@ public define HTML_In_Form @@ -712,7 +712,7 @@ public define HTML_In_Form
712 (List(Table_Option)) lto, 712 (List(Table_Option)) lto,
713 (List(HTML_Row(HTML_In_Form))) columns_name, 713 (List(HTML_Row(HTML_In_Form))) columns_name,
714 (HowManyColumns) number_of_columns, 714 (HowManyColumns) number_of_columns,
715 - ((RGB,Int32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,n,d), 715 + ((RGB,Int,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int n,$Data d) |-> line_format(r,n,d),
716 (RGB) a_color, 716 (RGB) a_color,
717 (RGB) b_color, 717 (RGB) b_color,
718 (Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total 718 (Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total
@@ -739,7 +739,7 @@ public define HTML_Off_Form @@ -739,7 +739,7 @@ public define HTML_Off_Form
739 (List(Table_Option)) lto, 739 (List(Table_Option)) lto,
740 (List(HTML_Row(HTML_Off_Form))) columns_name, 740 (List(HTML_Row(HTML_Off_Form))) columns_name,
741 (HowManyColumns) number_of_columns, 741 (HowManyColumns) number_of_columns,
742 - ((RGB,Int32,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 742 + ((RGB,Int,$Data) -> HTML_Row(HTML_Off_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
743 (RGB) a_color, 743 (RGB) a_color,
744 (RGB) b_color, 744 (RGB) b_color,
745 (Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total 745 (Total_Line($Data,$Data,(HTML_Row(HTML_Off_Form)))) no_total
@@ -763,7 +763,7 @@ public define HTML_In_Form @@ -763,7 +763,7 @@ public define HTML_In_Form
763 (List(Table_Option)) lto, 763 (List(Table_Option)) lto,
764 (List(HTML_Row(HTML_In_Form))) columns_name, 764 (List(HTML_Row(HTML_In_Form))) columns_name,
765 (HowManyColumns) number_of_columns, 765 (HowManyColumns) number_of_columns,
766 - ((RGB,Int32,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int32 n,$Data d) |-> line_format(r,d), 766 + ((RGB,Int,$Data) -> HTML_Row(HTML_In_Form)) (RGB r,Int n,$Data d) |-> line_format(r,d),
767 (RGB) a_color, 767 (RGB) a_color,
768 (RGB) b_color, 768 (RGB) b_color,
769 (Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total 769 (Total_Line($Data,$Data,(HTML_Row(HTML_In_Form)))) no_total
calexium_lib/web/CXM_html.anubis
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 *Copyright* Copyright (c) Alain Prouté 2001. 5 *Copyright* Copyright (c) Alain Prouté 2001.
6 6
7 read tools/basis.anubis 7 read tools/basis.anubis
8 - 8 +read system/string.anubis
9 9
10 10
11 11
@@ -24,7 +24,7 @@ read tools/basis.anubis @@ -24,7 +24,7 @@ read tools/basis.anubis
24 String value, 24 String value,
25 String temp_file_path). 25 String temp_file_path).
26 26
27 -read web/CXM_common.anubis 27 +read CXM_common.anubis
28 28
29 In other words, a 'web argument' is just a pair made of the name of the argument, and 29 In other words, a 'web argument' is just a pair made of the name of the argument, and
30 the value of the argument, and both are character strings. 'upload' will be explained 30 the value of the argument, and both are character strings. 'upload' will be explained
@@ -33,9 +33,9 @@ read web/CXM_common.anubis @@ -33,9 +33,9 @@ read web/CXM_common.anubis
33 33
34 The next variable is a multipurpose counter (used to generate unique names). 34 The next variable is a multipurpose counter (used to generate unique names).
35 35
36 -variable Int32 web_count = 0. 36 +variable Int web_count = 0.
37 37
38 -define Int32 38 +define Int
39 new_web_count 39 new_web_count
40 = 40 =
41 web_count <- *web_count+1; 41 web_count <- *web_count+1;
@@ -68,7 +68,7 @@ public type Web_color_name: @@ -68,7 +68,7 @@ public type Web_color_name:
68 Web colors. 68 Web colors.
69 69
70 public type Web_color: 70 public type Web_color:
71 - rgb(Int32,Int32,Int32), /* give the color by its components */ 71 + rgb(Word8,Word8,Word8), /* give the color by its components */
72 _(Web_color_name). /* or by its name */ 72 _(Web_color_name). /* or by its name */
73 73
74 74
@@ -78,7 +78,7 @@ public type Web_color: @@ -78,7 +78,7 @@ public type Web_color:
78 78
79 public type WebMeta: 79 public type WebMeta:
80 keywords(List(String)), 80 keywords(List(String)),
81 - refresh(String url, Int32 delay), // in seconds 81 + refresh(String url, Int delay), // in seconds
82 meta(String name, String content), 82 meta(String name, String content),
83 http_equiv(String name, String content). 83 http_equiv(String name, String content).
84 84
@@ -106,10 +106,10 @@ public type LayerDisposition: @@ -106,10 +106,10 @@ public type LayerDisposition:
106 vertical. 106 vertical.
107 107
108 public type FollowPathCommand: // this type is used by the Web_body_option 'follow_path'. 108 public type FollowPathCommand: // this type is used by the Web_body_option 'follow_path'.
109 - pos(Int32 x, // x coordinate of position  
110 - Int32 y, // y coordinate of position  
111 - Int32 image_number, // the image to display at that position  
112 - Int32 delay). // wait that milliseconds before leaving this position 109 + pos(Int x, // x coordinate of position
  110 + Int y, // y coordinate of position
  111 + Int image_number, // the image to display at that position
  112 + Int delay). // wait that milliseconds before leaving this position
113 113
114 public type Web_body_option: 114 public type Web_body_option:
115 background_color(Web_color), /* color for the background */ 115 background_color(Web_color), /* color for the background */
@@ -121,35 +121,35 @@ public type Web_body_option: @@ -121,35 +121,35 @@ public type Web_body_option:
121 // produces a background whose color changes very slowly (this is not tiring) among rather 121 // produces a background whose color changes very slowly (this is not tiring) among rather
122 // light pastel colors. 122 // light pastel colors.
123 // 123 //
124 - psychedelic_background(Int32 average, /* average light (0 to 255) */  
125 - Int32 amplitude, /* amplitude of variation of light */  
126 - Int32 delay), /* in milliseconds */ 124 + psychedelic_background(Int average, /* average light (0 to 255) */
  125 + Int amplitude, /* amplitude of variation of light */
  126 + Int delay), /* in milliseconds */
127 background_image(String file_name), /* name of image file for the background */ 127 background_image(String file_name), /* name of image file for the background */
128 // 128 //
129 // 'scrolling_layer' produces a layer above the page which is scrolling continuously either 129 // 'scrolling_layer' produces a layer above the page which is scrolling continuously either
130 // vertically or horizontally. The 'content' is indefinitly repeated. 130 // vertically or horizontally. The 'content' is indefinitly repeated.
131 // 131 //
132 scrolling_layer(LayerDisposition, 132 scrolling_layer(LayerDisposition,
133 - Int32 steps, /* number of pixels of each move */  
134 - Int32 margin, /* measured from left or top in pixels */  
135 - Int32 delay, /* milliseconds for one move */ 133 + Int steps, /* number of pixels of each move */
  134 + Int margin, /* measured from left or top in pixels */
  135 + Int delay, /* milliseconds for one move */
136 Web_item content, /* content of layer (will be repeated) */ 136 Web_item content, /* content of layer (will be repeated) */
137 - Int32 period), /* number of pixels between two instances of 'content' */ 137 + Int period), /* number of pixels between two instances of 'content' */
138 // 138 //
139 // 'bounce' shows its content above the page and let it move and bounce on the edges of a rectangle. 139 // 'bounce' shows its content above the page and let it move and bounce on the edges of a rectangle.
140 // The rectangle is determined by the last 4 arguments. 140 // The rectangle is determined by the last 4 arguments.
141 // 141 //
142 bounce(Web_item content, 142 bounce(Web_item content,
143 - Int32 left,  
144 - Int32 right,  
145 - Int32 top,  
146 - Int32 bottom), 143 + Int left,
  144 + Int right,
  145 + Int top,
  146 + Int bottom),
147 // 147 //
148 // put something over the page in any position you want: 148 // put something over the page in any position you want:
149 // 149 //
150 over(Web_item content, 150 over(Web_item content,
151 - Int32 left,  
152 - Int32 top), 151 + Int left,
  152 + Int top),
153 // 153 //
154 // follow_path: let a changing image follow a path on the screen. This gadget shows 154 // follow_path: let a changing image follow a path on the screen. This gadget shows
155 // an image following a polygonal path on the screen. The image may change at regular 155 // an image following a polygonal path on the screen. The image may change at regular
@@ -171,18 +171,18 @@ public type Web_body_option: @@ -171,18 +171,18 @@ public type Web_body_option:
171 // rank 0). 'd' is the delay in milliseconds to wait before leaving that position. 171 // rank 0). 'd' is the delay in milliseconds to wait before leaving that position.
172 // 172 //
173 follow_path(List(String) filenames, /* the changing images which follows the path */ 173 follow_path(List(String) filenames, /* the changing images which follows the path */
174 - Int32 change_every, /* number of steps betwen two changes */ 174 + Int change_every, /* number of steps betwen two changes */
175 List(FollowPathCommand) path, /* the polygonal path and commands */ 175 List(FollowPathCommand) path, /* the polygonal path and commands */
176 Bool loop, /* if true do it repeatedly, otherwise only once */ 176 Bool loop, /* if true do it repeatedly, otherwise only once */
177 - Int32 steps, /* approximative distance (in pixels) between two 177 + Int steps, /* approximative distance (in pixels) between two
178 successive positions */ 178 successive positions */
179 - Int32 delay), /* milliseconds between two successive positions */ 179 + Int delay), /* milliseconds between two successive positions */
180 180
181 load_image(String name), /* load an image (for next page), which is not displayed */ 181 load_image(String name), /* load an image (for next page), which is not displayed */
182 - left_margin(Int32), /* left margin for document */  
183 - top_margin(Int32), /* top margin for document */  
184 - margin_width(Int32),  
185 - margin_height(Int32), 182 + left_margin(Int), /* left margin for document */
  183 + top_margin(Int), /* top margin for document */
  184 + margin_width(Int),
  185 + margin_height(Int),
186 reload_frame(String name, /* name of target frame */ 186 reload_frame(String name, /* name of target frame */
187 String url), /* url to load in this frame */ 187 String url), /* url to load in this frame */
188 onload(String function_name). /* nom de la fonction javascript (sans les '()') */ 188 onload(String function_name). /* nom de la fonction javascript (sans les '()') */
@@ -230,7 +230,7 @@ public type Page_body: @@ -230,7 +230,7 @@ public type Page_body:
230 230
231 231
232 public type VFrame: 232 public type VFrame:
233 - frame(Int32 height, 233 + frame(Int height,
234 Printable_tree url, 234 Printable_tree url,
235 String name). 235 String name).
236 236
@@ -242,8 +242,8 @@ public type Web_page: @@ -242,8 +242,8 @@ public type Web_page:
242 Page_body body), /* body of page */ 242 Page_body body), /* body of page */
243 standard_frameset(String title, 243 standard_frameset(String title,
244 List(WebMeta) meta_tags, 244 List(WebMeta) meta_tags,
245 - Int32 height, /* height of 'top menu' (pixels) */  
246 - Int32 width, /* width of 'left menu' (pixels) */ 245 + Int height, /* height of 'top menu' (pixels) */
  246 + Int width, /* width of 'left menu' (pixels) */
247 Printable_tree main). /* url for main */ 247 Printable_tree main). /* url for main */
248 248
249 +---------+--------------------------+ 249 +---------+--------------------------+
@@ -293,8 +293,8 @@ public define Web_page @@ -293,8 +293,8 @@ public define Web_page
293 standard_frameset 293 standard_frameset
294 ( 294 (
295 String title, 295 String title,
296 - Int32 height,  
297 - Int32 width, 296 + Int height,
  297 + Int width,
298 Printable_tree main 298 Printable_tree main
299 ) = 299 ) =
300 300
@@ -331,8 +331,8 @@ public type Web_item: @@ -331,8 +331,8 @@ public type Web_item:
331 text_nowrap_pt(Printable_tree), 331 text_nowrap_pt(Printable_tree),
332 par(String), 332 par(String),
333 preformated_text(String text), 333 preformated_text(String text),
334 - integer(Int32),  
335 - float(Float,Int32),... 334 + integer(Int),
  335 + float(Float,Int),...
336 336
337 337
338 You may want to center a web item in a page. Just enclose it into 338 You may want to center a web item in a page. Just enclose it into
@@ -345,8 +345,8 @@ public type Web_item: @@ -345,8 +345,8 @@ public type Web_item:
345 You may want to write characters of a given item with a big font: 345 You may want to write characters of a given item with a big font:
346 346
347 public type Web_item: 347 public type Web_item:
348 - bigger(Int32,Web_item),  
349 - smaller(Int32,Web_item), 348 + bigger(Int,Web_item),
  349 + smaller(Int,Web_item),
350 bold(Web_item), 350 bold(Web_item),
351 italic(Web_item), 351 italic(Web_item),
352 big(Web_item), 352 big(Web_item),
@@ -366,14 +366,14 @@ public type WebStyle: @@ -366,14 +366,14 @@ public type WebStyle:
366 float_to_left, // the web item will float to the left and text will wrap around 366 float_to_left, // the web item will float to the left and text will wrap around
367 float_to_right, 367 float_to_right,
368 font_family(String font_name), // "verdana" "helvetica" "times" etc... 368 font_family(String font_name), // "verdana" "helvetica" "times" etc...
369 - font_size(Int32 size), 369 + font_size(Int size),
370 italic, 370 italic,
371 oblique, 371 oblique,
372 small_capitals, 372 small_capitals,
373 bold, 373 bold,
374 bolder, 374 bolder,
375 lighter, 375 lighter,
376 - line_height(Int32 height), 376 + line_height(Int height),
377 text_center, 377 text_center,
378 text_left, 378 text_left,
379 text_right, 379 text_right,
@@ -381,7 +381,7 @@ public type WebStyle: @@ -381,7 +381,7 @@ public type WebStyle:
381 text_underline, 381 text_underline,
382 text_blink, 382 text_blink,
383 text_line_through, 383 text_line_through,
384 - width(Int32 n). 384 + width(Int n).
385 385
386 386
387 387
@@ -390,12 +390,12 @@ public type Web_item: @@ -390,12 +390,12 @@ public type Web_item:
390 390
391 391
392 public type Web_item: 392 public type Web_item:
393 - spacer(Int32 width, Int32 height), 393 + spacer(Int width, Int height),
394 image(String file_name), /* image */ 394 image(String file_name), /* image */
395 image_d(String file_name, String description), 395 image_d(String file_name, String description),
396 image_pt(Printable_tree file_name), 396 image_pt(Printable_tree file_name),
397 on_image(String file_name, Web_item content), 397 on_image(String file_name, Web_item content),
398 - turning_images(NonEmptyList(String) filenames, Int32 millisecs),... 398 + turning_images(NonEmptyList(String) filenames, Int millisecs),...
399 399
400 400
401 401
@@ -418,8 +418,8 @@ public type Web_item: @@ -418,8 +418,8 @@ public type Web_item:
418 String target, 418 String target,
419 String image_on, 419 String image_on,
420 String image_off, 420 String image_off,
421 - Int32 width,  
422 - Int32 height, 421 + Int width,
  422 + Int height,
423 String description), ... 423 String description), ...
424 424
425 425
@@ -428,7 +428,7 @@ public type Web_item: @@ -428,7 +428,7 @@ public type Web_item:
428 zones overlap, the first one (in the order they are defined) is selected. 428 zones overlap, the first one (in the order they are defined) is selected.
429 429
430 Zones are of 3 sorts: rectangles, circles and polygons. Point's coordinates are 430 Zones are of 3 sorts: rectangles, circles and polygons. Point's coordinates are
431 - specified as pairs of integers (of anonymous agglomeration type (Int32,Int32)). The 431 + specified as pairs of integers (of anonymous agglomeration type (Int,Int)). The
432 first coordinate counts pixels from the left of the image. The second coordinate counts 432 first coordinate counts pixels from the left of the image. The second coordinate counts
433 pixels from the top of the image. With polygons, you can construct zones which are 433 pixels from the top of the image. With polygons, you can construct zones which are
434 almost as complicated as you want. You may also construct a zone as the overlapping of 434 almost as complicated as you want. You may also construct a zone as the overlapping of
@@ -437,19 +437,19 @@ public type Web_item: @@ -437,19 +437,19 @@ public type Web_item:
437 public type Mouse_Sensitive_Zone: 437 public type Mouse_Sensitive_Zone:
438 rectangle 438 rectangle
439 ( 439 (
440 - (Int32,Int32) left_top,  
441 - (Int32,Int32) right_bottom, 440 + (Int,Int) left_top,
  441 + (Int,Int) right_bottom,
442 String url 442 String url
443 ), 443 ),
444 circle 444 circle
445 ( 445 (
446 - (Int32,Int32) center,  
447 - Int32 radius, 446 + (Int,Int) center,
  447 + Int radius,
448 String url 448 String url
449 ), 449 ),
450 polygon 450 polygon
451 ( 451 (
452 - List((Int32,Int32)) vertices, 452 + List((Int,Int)) vertices,
453 String url 453 String url
454 ). 454 ).
455 455
@@ -518,14 +518,14 @@ form @@ -518,14 +518,14 @@ form
518 518
519 public type Web_item: 519 public type Web_item:
520 text_input(String name, /* text field to be documented by user */ 520 text_input(String name, /* text field to be documented by user */
521 - Int32 size, 521 + Int size,
522 String initial_value),... 522 String initial_value),...
523 523
524 public define Web_item 524 public define Web_item
525 text_input 525 text_input
526 ( 526 (
527 String name, 527 String name,
528 - Int32 size, 528 + Int size,
529 String initial_value 529 String initial_value
530 ) = 530 ) =
531 531
@@ -535,12 +535,12 @@ public type Web_item: @@ -535,12 +535,12 @@ public type Web_item:
535 535
536 public type Web_item: 536 public type Web_item:
537 password_input(String name, 537 password_input(String name,
538 - Int32 size), 538 + Int size),
539 text_area(String name, 539 text_area(String name,
540 - Int32 columns,  
541 - Int32 rows, 540 + Int columns,
  541 + Int rows,
542 String initial_text), 542 String initial_text),
543 - upload(String name, Int32 size),... 543 + upload(String name, Int size),...
544 544
545 545
546 546
@@ -560,7 +560,7 @@ public type Web_item: @@ -560,7 +560,7 @@ public type Web_item:
560 String hl_image_file), 560 String hl_image_file),
561 text_submit(String name, String value, String text), 561 text_submit(String name, String value, String text),
562 web_submit(String web_args, Web_item content), 562 web_submit(String web_args, Web_item content),
563 - button(String name, String text, String on_click_fonction, Int32 width, Int32 height),... 563 + button(String name, String text, String on_click_fonction, Int width, Int height),...
564 564
565 565
566 public type Web_item: /* mark the form with an information */ 566 public type Web_item: /* mark the form with an information */
@@ -625,11 +625,11 @@ public type Table_option: @@ -625,11 +625,11 @@ public type Table_option:
625 more or less wide. You may also specify a color for the border. */ 625 more or less wide. You may also specify a color for the border. */
626 border, 626 border,
627 nude, /* equivalent to 'border(0,0,0)' (below) */ 627 nude, /* equivalent to 'border(0,0,0)' (below) */
628 - border(Int32, /* width of exterior (pixels) */  
629 - Int32, /* width of top */  
630 - Int32), /* width of interior */ 628 + border(Int, /* width of exterior (pixels) */
  629 + Int, /* width of top */
  630 + Int), /* width of interior */
631 border_color(Web_color), 631 border_color(Web_color),
632 - absolute_width(Int32). 632 + absolute_width(Int).
633 633
634 634
635 635
@@ -649,7 +649,7 @@ public type Row_option: @@ -649,7 +649,7 @@ public type Row_option:
649 top, 649 top,
650 v_center, 650 v_center,
651 bottom, 651 bottom,
652 - absolute_height(Int32), 652 + absolute_height(Int),
653 base_line, 653 base_line,
654 /* set the background color of all cells in the row */ 654 /* set the background color of all cells in the row */
655 background_color(Web_color). 655 background_color(Web_color).
@@ -670,13 +670,13 @@ public type Cell_option: @@ -670,13 +670,13 @@ public type Cell_option:
670 /* you can set the width of the cell either absolutely (in pixels) 670 /* you can set the width of the cell either absolutely (in pixels)
671 or as a percentage of the width of the table. */ 671 or as a percentage of the width of the table. */
672 background_image(String file_name), 672 background_image(String file_name),
673 - absolute_width(Int32),  
674 - relative_width(Int32),  
675 - absolute_height(Int32),  
676 - relative_height(Int32), 673 + absolute_width(Int),
  674 + relative_width(Int),
  675 + absolute_height(Int),
  676 + relative_height(Int),
677 /* a cell may span over several columns or rows in the table */ 677 /* a cell may span over several columns or rows in the table */
678 - columns(Int32),  
679 - rows(Int32), 678 + columns(Int),
  679 + rows(Int),
680 nowrap. 680 nowrap.
681 681
682 682
@@ -713,14 +713,14 @@ public type Web_item: @@ -713,14 +713,14 @@ public type Web_item:
713 713
714 public type Web_item: 714 public type Web_item:
715 select(String name, 715 select(String name,
716 - Int32 size, 716 + Int size,
717 List(String) choices), 717 List(String) choices),
718 select(String name, 718 select(String name,
719 - Int32 size, 719 + Int size,
720 List(String) choices, 720 List(String) choices,
721 String selected), 721 String selected),
722 immediate_select(String name, // selection will immediately submit the form 722 immediate_select(String name, // selection will immediately submit the form
723 - Int32 size, 723 + Int size,
724 List(String) choices),... 724 List(String) choices),...
725 725
726 726
@@ -738,23 +738,23 @@ public type Web_item: @@ -738,23 +738,23 @@ public type Web_item:
738 String web_args, 738 String web_args,
739 String window_name, 739 String window_name,
740 Web_item content, 740 Web_item content,
741 - Int32 width,  
742 - Int32 height), 741 + Int width,
  742 + Int height),
743 link_to_window_with_ticket_and_scroll 743 link_to_window_with_ticket_and_scroll
744 (String name, 744 (String name,
745 String web_args, 745 String web_args,
746 String window_name, 746 String window_name,
747 Web_item content, 747 Web_item content,
748 - Int32 width,  
749 - Int32 height), 748 + Int width,
  749 + Int height),
750 link_to_window_with_ticket_and_scroll 750 link_to_window_with_ticket_and_scroll
751 (String name, 751 (String name,
752 String label_name, 752 String label_name,
753 String web_args, 753 String web_args,
754 String window_name, 754 String window_name,
755 Web_item content, 755 Web_item content,
756 - Int32 width,  
757 - Int32 height), 756 + Int width,
  757 + Int height),
758 link_to_frame (Printable_tree name, String frame_name, Web_item). 758 link_to_frame (Printable_tree name, String frame_name, Web_item).
759 759
760 760
@@ -798,7 +798,7 @@ public define String @@ -798,7 +798,7 @@ public define String
798 ) = 798 ) =
799 if wc is 799 if wc is
800 { 800 {
801 - rgb(r,g,b) then "\"#" + hexadecimal(r,2) + hexadecimal(g,2) + hexadecimal(b,2) + "\"", 801 + rgb(r,g,b) then "\"#" + to_hexa(r) + to_hexa(g) + to_hexa(b) + "\"",
802 _(c) then format(c) 802 _(c) then format(c)
803 }. 803 }.
804 804
@@ -809,7 +809,7 @@ public define String @@ -809,7 +809,7 @@ public define String
809 ) = 809 ) =
810 if wc is 810 if wc is
811 { 811 {
812 - rgb(r,g,b) then "#" + hexadecimal(r,2) + hexadecimal(g,2) + hexadecimal(b,2) + "", 812 + rgb(r,g,b) then "#" + to_hexa(r) + to_hexa(g) + to_hexa(b) + "",
813 _(c) then format(c) 813 _(c) then format(c)
814 }. 814 }.
815 815
@@ -826,7 +826,7 @@ public define String @@ -826,7 +826,7 @@ public define String
826 ) = 826 ) =
827 if wc is 827 if wc is
828 { 828 {
829 - rgb(r,g,b) then "" + hexadecimal(r,2) + hexadecimal(g,2) + hexadecimal(b,2) + "", 829 + rgb(r,g,b) then "" + to_hexa(r) + to_hexa(g) + to_hexa(b) + "",
830 _(c) then format(c) 830 _(c) then format(c)
831 }. 831 }.
832 832
@@ -837,13 +837,17 @@ define Printable_tree @@ -837,13 +837,17 @@ define Printable_tree
837 ) = [(String)format_without_sharp(c)]. 837 ) = [(String)format_without_sharp(c)].
838 838
839 839
  840 +define Printable_tree
  841 + [Word32 x . Printable_tree t]
  842 + =
  843 + [to_Int(x) . t].
840 844
841 define Printable_tree 845 define Printable_tree
842 psychedelic_bg 846 psychedelic_bg
843 ( 847 (
844 - Int32 average,  
845 - Int32 amplitude,  
846 - Int32 delay 848 + Int average,
  849 + Int amplitude,
  850 + Int delay
847 ) = 851 ) =
848 with ampl = if amplitude >= 120 then 120 else 852 with ampl = if amplitude >= 120 then 120 else
849 if amplitude =< 1 then 1 else amplitude, 853 if amplitude =< 1 then 1 else amplitude,
@@ -865,23 +869,23 @@ define List(Web_body_option) @@ -865,23 +869,23 @@ define List(Web_body_option)
865 replace_background_init 869 replace_background_init
866 ( 870 (
867 List(Web_body_option) l, 871 List(Web_body_option) l,
868 - Int32 average,  
869 - Int32 amplitude,  
870 - Int32 delay 872 + Int average,
  873 + Int amplitude,
  874 + Int delay
871 ) = 875 ) =
872 if l is 876 if l is
873 { 877 {
874 [ ] then [ ], 878 [ ] then [ ],
875 [h . t] then 879 [h . t] then
876 if h is background_color(_) 880 if h is background_color(_)
877 - then [background_color(rgb(average+amplitude,  
878 - average,  
879 - average-amplitude)) 881 + then [background_color(rgb(truncate_to_Word8(average+amplitude),
  882 + truncate_to_Word8(average),
  883 + truncate_to_Word8(average-amplitude)))
880 . replace_background_init(t,average,amplitude,delay)] 884 . replace_background_init(t,average,amplitude,delay)]
881 else [h . replace_background_init(t,average,amplitude,delay)] 885 else [h . replace_background_init(t,average,amplitude,delay)]
882 }. 886 }.
883 887
884 -define Maybe((Int32,Int32,Int32)) 888 +define Maybe((Int,Int,Int))
885 get_psy 889 get_psy
886 ( 890 (
887 List(Web_body_option) l 891 List(Web_body_option) l
@@ -920,10 +924,10 @@ define Printable_tree @@ -920,10 +924,10 @@ define Printable_tree
920 move_layer_command 924 move_layer_command
921 ( 925 (
922 String property, 926 String property,
923 - Int32 n,  
924 - Int32 num,  
925 - Int32 i,  
926 - Int32 period 927 + Int n,
  928 + Int num,
  929 + Int i,
  930 + Int period
927 ) = 931 ) =
928 if i >= num then [ ] else 932 if i >= num then [ ] else
929 [" if (document.layers)", 933 [" if (document.layers)",
@@ -936,12 +940,12 @@ define Printable_tree @@ -936,12 +940,12 @@ define Printable_tree
936 format_layers 940 format_layers
937 ( 941 (
938 LayerDisposition disp, 942 LayerDisposition disp,
939 - Int32 margin, 943 + Int margin,
940 Web_item content, 944 Web_item content,
941 - Int32 n,  
942 - Int32 num,  
943 - Int32 i,  
944 - Int32 period 945 + Int n,
  946 + Int num,
  947 + Int i,
  948 + Int period
945 ) = 949 ) =
946 if i >= num then [ ] else 950 if i >= num then [ ] else
947 ["<layer name=\"nslay",n,"_",i,"\" top=0", 951 ["<layer name=\"nslay",n,"_",i,"\" top=0",
@@ -958,12 +962,12 @@ define Printable_tree @@ -958,12 +962,12 @@ define Printable_tree
958 s_layer 962 s_layer
959 ( 963 (
960 LayerDisposition disp, 964 LayerDisposition disp,
961 - Int32 steps,  
962 - Int32 margin,  
963 - Int32 delay, 965 + Int steps,
  966 + Int margin,
  967 + Int delay,
964 Web_item content, 968 Web_item content,
965 - Int32 period,  
966 - Int32 num 969 + Int period,
  970 + Int num
967 ) = 971 ) =
968 with n = new_web_count, 972 with n = new_web_count,
969 [ "<script>", 973 [ "<script>",
@@ -985,8 +989,8 @@ define Printable_tree @@ -985,8 +989,8 @@ define Printable_tree
985 over 989 over
986 ( 990 (
987 Web_item i, 991 Web_item i,
988 - Int32 left,  
989 - Int32 top 992 + Int left,
  993 + Int top
990 ) = 994 ) =
991 with n = new_web_count, 995 with n = new_web_count,
992 [ "<layer name=\"nslay",n,"\" top=",top," left=",left,">", 996 [ "<layer name=\"nslay",n,"\" top=",top," left=",left,">",
@@ -999,10 +1003,10 @@ define Printable_tree @@ -999,10 +1003,10 @@ define Printable_tree
999 bnce 1003 bnce
1000 ( 1004 (
1001 Web_item i, 1005 Web_item i,
1002 - Int32 left,  
1003 - Int32 right,  
1004 - Int32 top,  
1005 - Int32 bottom 1006 + Int left,
  1007 + Int right,
  1008 + Int top,
  1009 + Int bottom
1006 ) = 1010 ) =
1007 with n = new_web_count, 1011 with n = new_web_count,
1008 [ "<script>", 1012 [ "<script>",
@@ -1027,11 +1031,11 @@ define Printable_tree @@ -1027,11 +1031,11 @@ define Printable_tree
1027 define Printable_tree 1031 define Printable_tree
1028 folp_switch 1032 folp_switch
1029 ( 1033 (
1030 - Int32 n,  
1031 - Int32 i, 1034 + Int n,
  1035 + Int i,
1032 List(FollowPathCommand) path, 1036 List(FollowPathCommand) path,
1033 Bool loop, 1037 Bool loop,
1034 - Int32 steps 1038 + Int steps
1035 ) = 1039 ) =
1036 if path is 1040 if path is
1037 { 1041 {
@@ -1073,9 +1077,9 @@ define Printable_tree @@ -1073,9 +1077,9 @@ define Printable_tree
1073 define Printable_tree 1077 define Printable_tree
1074 set_folpimages 1078 set_folpimages
1075 ( 1079 (
1076 - Int32 n, 1080 + Int n,
1077 List(String) filenames, 1081 List(String) filenames,
1078 - Int32 i, 1082 + Int i,
1079 ) = 1083 ) =
1080 if filenames is 1084 if filenames is
1081 { 1085 {
@@ -1089,11 +1093,11 @@ define Printable_tree @@ -1089,11 +1093,11 @@ define Printable_tree
1089 follow_path 1093 follow_path
1090 ( 1094 (
1091 List(String) filenames, 1095 List(String) filenames,
1092 - Int32 change_every, 1096 + Int change_every,
1093 List(FollowPathCommand) path, 1097 List(FollowPathCommand) path,
1094 Bool loop, 1098 Bool loop,
1095 - Int32 steps,  
1096 - Int32 delay 1099 + Int steps,
  1100 + Int delay
1097 ) = 1101 ) =
1098 if filenames is 1102 if filenames is
1099 { 1103 {
@@ -1182,7 +1186,7 @@ public define Printable_tree @@ -1182,7 +1186,7 @@ public define Printable_tree
1182 background_color(c) then [" bgcolor=" , (String)format(c)], 1186 background_color(c) then [" bgcolor=" , (String)format(c)],
1183 psychedelic_background(a,f,d) then add_script(psychedelic_bg(a,f,d)); [ ], 1187 psychedelic_background(a,f,d) then add_script(psychedelic_bg(a,f,d)); [ ],
1184 background_image(n) then [" background=", n], 1188 background_image(n) then [" background=", n],
1185 - scrolling_layer(disp,st,m,t,c,p) then add_script(s_layer(disp,st,m,t,c,p,2000/p)); [ ], 1189 + scrolling_layer(disp,st,m,t,c,p) then add_script(s_layer(disp,st,m,t,c,p,2000\p)); [ ],
1186 bounce(i,l,r,t,b) then add_script(bnce(i,l,r,t,b)); [ ], 1190 bounce(i,l,r,t,b) then add_script(bnce(i,l,r,t,b)); [ ],
1187 over(i,l,t) then add_script(over(i,l,t)); [ ], 1191 over(i,l,t) then add_script(over(i,l,t)); [ ],
1188 follow_path(li,ns,p,l,s,d) then add_script(follow_path(li,ns,p,l,s,d)); [ ], 1192 follow_path(li,ns,p,l,s,d) then add_script(follow_path(li,ns,p,l,s,d)); [ ],
@@ -1199,7 +1203,7 @@ define Printable_tree @@ -1199,7 +1203,7 @@ define Printable_tree
1199 preload_list 1203 preload_list
1200 ( 1204 (
1201 List(ImageToLoad) images, 1205 List(ImageToLoad) images,
1202 - Int32 n, 1206 + Int n,
1203 ) = 1207 ) =
1204 if images is 1208 if images is
1205 { 1209 {
@@ -1284,13 +1288,13 @@ public define Printable_tree @@ -1284,13 +1288,13 @@ public define Printable_tree
1284 1288
1285 1289
1286 1290
1287 -public define Int32  
1288 - percentage(Int32 n) = 1291 +public define Int
  1292 + percentage(Int n) =
1289 if n < 0 then 0 1293 if n < 0 then 0
1290 else if n > 100 then 100 1294 else if n > 100 then 100
1291 else n. 1295 else n.
1292 1296
1293 - public define Int32 percentage(Int32 n) = n. 1297 + public define Int percentage(Int n) = n.
1294 1298
1295 1299
1296 1300
@@ -1441,14 +1445,14 @@ public define String @@ -1441,14 +1445,14 @@ public define String
1441 float_to_left then "float: left", 1445 float_to_left then "float: left",
1442 float_to_right then "float: right", 1446 float_to_right then "float: right",
1443 font_family(n) then "font-family: "+n, 1447 font_family(n) then "font-family: "+n,
1444 - font_size(n) then "font-size: "+integer_to_string(n)+"pt", 1448 + font_size(n) then "font-size: "+to_decimal(n)+"pt",
1445 italic then "font-style: italic", 1449 italic then "font-style: italic",
1446 oblique then "font-style: oblique", 1450 oblique then "font-style: oblique",
1447 small_capitals then "font-variant: small-caps", 1451 small_capitals then "font-variant: small-caps",
1448 bold then "font-weight: bold", 1452 bold then "font-weight: bold",
1449 bolder then "font-weight: bolder", 1453 bolder then "font-weight: bolder",
1450 lighter then "font-weight: lighter", 1454 lighter then "font-weight: lighter",
1451 - line_height(h) then "line-height: "+integer_to_string(h), 1455 + line_height(h) then "line-height: "+to_decimal(h),
1452 text_center then "text-align: center", 1456 text_center then "text-align: center",
1453 text_left then "text-align: left", 1457 text_left then "text-align: left",
1454 text_right then "text-align: right", 1458 text_right then "text-align: right",
@@ -1456,7 +1460,7 @@ public define String @@ -1456,7 +1460,7 @@ public define String
1456 text_underline then "text-decoration: underline", 1460 text_underline then "text-decoration: underline",
1457 text_blink then "text-decoration: blink", 1461 text_blink then "text-decoration: blink",
1458 text_line_through then "text-decoration: line-through", 1462 text_line_through then "text-decoration: line-through",
1459 - width(n) then "width: "+integer_to_string(n), 1463 + width(n) then "width: "+to_decimal(n),
1460 }. 1464 }.
1461 1465
1462 1466
@@ -1480,7 +1484,7 @@ public define Printable_tree @@ -1480,7 +1484,7 @@ public define Printable_tree
1480 define Printable_tree 1484 define Printable_tree
1481 format_polygon_coordinates 1485 format_polygon_coordinates
1482 ( 1486 (
1483 - List((Int32,Int32)) vertices 1487 + List((Int,Int)) vertices
1484 ) = 1488 ) =
1485 if vertices is 1489 if vertices is
1486 { 1490 {
@@ -1550,7 +1554,7 @@ define Printable_tree @@ -1550,7 +1554,7 @@ define Printable_tree
1550 . format(t, c_ticket, s_ticket)] 1554 . format(t, c_ticket, s_ticket)]
1551 }. 1555 }.
1552 1556
1553 -variable Int32 map_number = 0. 1557 +variable Int map_number = 0.
1554 1558
1555 define Printable_tree 1559 define Printable_tree
1556 format_mouse_sensitive_image 1560 format_mouse_sensitive_image
@@ -1727,7 +1731,7 @@ define String @@ -1727,7 +1731,7 @@ define String
1727 define Printable_tree 1731 define Printable_tree
1728 set_turning_images_sources 1732 set_turning_images_sources
1729 ( 1733 (
1730 - Int32 i, 1734 + Int i,
1731 String name, 1735 String name,
1732 List(String) filenames 1736 List(String) filenames
1733 ) = 1737 ) =
@@ -1738,6 +1742,21 @@ define Printable_tree @@ -1738,6 +1742,21 @@ define Printable_tree
1738 [" i",name,"[",i,"].src=\"",h,"\";" 1742 [" i",name,"[",i,"].src=\"",h,"\";"
1739 . set_turning_images_sources(i+1,name,t)] 1743 . set_turning_images_sources(i+1,name,t)]
1740 }. 1744 }.
  1745 +
  1746 +define Bool
  1747 + member
  1748 + (
  1749 + Word8 x,
  1750 + Printable_tree t
  1751 + ) =
  1752 + if t is
  1753 + {
  1754 + [] then false,
  1755 + str_pt(String _0,Printable_tree _1) then (member(x,_0) | member(x,_1)),
  1756 + ba_pt(ByteArray _0,Printable_tree _1) then (member(x,to_string(_0)) | member(x,_1)),
  1757 + int_pt(Int _0,Printable_tree _1) then (member(x,to_decimal(_0)) | member(x,_1)),
  1758 + pt_pt(Printable_tree _0,Printable_tree _1) then (member(x,_0) | member(x,_1))
  1759 + }.
1741 1760
1742 public define Printable_tree 1761 public define Printable_tree
1743 format 1762 format
@@ -1803,7 +1822,7 @@ public define Printable_tree @@ -1803,7 +1822,7 @@ public define Printable_tree
1803 ["<span style=\"background: url(",fn,")\">",format(c_ticket,s_ticket,x),"</span>"], 1822 ["<span style=\"background: url(",fn,")\">",format(c_ticket,s_ticket,x),"</span>"],
1804 1823
1805 turning_images(fns,msec) then if fns is [im0 . imo] then 1824 turning_images(fns,msec) then if fns is [im0 . imo] then
1806 - with name = "trni"+integer_to_string(new_web_count), n = 1+length(imo), (Printable_tree) 1825 + with name = "trni"+to_decimal(new_web_count), n = 1+length(imo), (Printable_tree)
1807 ["<script>", 1826 ["<script>",
1808 "var i",name,"=new Array(",n,");", 1827 "var i",name,"=new Array(",n,");",
1809 "var n",name,"=0;", 1828 "var n",name,"=0;",
@@ -1823,7 +1842,7 @@ public define Printable_tree @@ -1823,7 +1842,7 @@ public define Printable_tree
1823 1842
1824 rollover(prlim,url,target,ion,ioff,descr) then (Printable_tree) 1843 rollover(prlim,url,target,ion,ioff,descr) then (Printable_tree)
1825 (images_to_load <- [simple(ion) . *images_to_load]; 1844 (images_to_load <- [simple(ion) . *images_to_load];
1826 - with name = "ron_"+integer_to_string(new_web_count), 1845 + with name = "ron_"+to_decimal(new_web_count),
1827 ["<a target=\"",target,"\" href=\"",url, 1846 ["<a target=\"",target,"\" href=\"",url,
1828 (if (c_ticket = "" & s_ticket = "") then "" else (if member('?',url) then "&" else "?")), 1847 (if (c_ticket = "" & s_ticket = "") then "" else (if member('?',url) then "&" else "?")),
1829 (if c_ticket = "" then [ ] else ["c_ticket=",c_ticket]), 1848 (if c_ticket = "" then [ ] else ["c_ticket=",c_ticket]),
@@ -1834,7 +1853,7 @@ public define Printable_tree @@ -1834,7 +1853,7 @@ public define Printable_tree
1834 1853
1835 rollover(prlim,url,target,ion,ioff,w,h,descr) then (Printable_tree) 1854 rollover(prlim,url,target,ion,ioff,w,h,descr) then (Printable_tree)
1836 (images_to_load <- [simple(ion) . *images_to_load]; 1855 (images_to_load <- [simple(ion) . *images_to_load];
1837 - with name = "ron_"+integer_to_string(new_web_count), 1856 + with name = "ron_"+to_decimal(new_web_count),
1838 ["<a target=\"",target,"\" href=\"",url, 1857 ["<a target=\"",target,"\" href=\"",url,
1839 (if (c_ticket = "" & s_ticket = "") then "" else (if member('?',url) then "&" else "?")), 1858 (if (c_ticket = "" & s_ticket = "") then "" else (if member('?',url) then "&" else "?")),
1840 (if c_ticket = "" then [ ] else ["c_ticket=",c_ticket]), 1859 (if c_ticket = "" then [ ] else ["c_ticket=",c_ticket]),
@@ -1927,7 +1946,7 @@ public define Printable_tree @@ -1927,7 +1946,7 @@ public define Printable_tree
1927 ["<a href=\"javascript:document.forms[0].action='", 1946 ["<a href=\"javascript:document.forms[0].action='",
1928 wa,"'; document.forms[0].submit();\">",format(c_ticket,s_ticket,i),"</a>"], 1947 wa,"'; document.forms[0].submit();\">",format(c_ticket,s_ticket,i),"</a>"],
1929 1948
1930 - button(n, String t, String o, Int32 w, Int32 h) then (Printable_tree) 1949 + button(n, String t, String o, Int w, Int h) then (Printable_tree)
1931 ["<input type=button name=",n," value=\"",t, 1950 ["<input type=button name=",n," value=\"",t,
1932 "\"style=\"width=",w, ";height=", h, "\" ", "\" onclick=\"", o, "\";\" />"], 1951 "\"style=\"width=",w, ";height=", h, "\" ", "\" onclick=\"", o, "\";\" />"],
1933 1952
@@ -2089,9 +2108,9 @@ define Printable_tree @@ -2089,9 +2108,9 @@ define Printable_tree
2089 define String 2108 define String
2090 frame_size 2109 frame_size
2091 ( 2110 (
2092 - Int32 s 2111 + Int s
2093 ) = 2112 ) =
2094 - if s =< 0 then "*" else integer_to_string(s). 2113 + if s =< 0 then "*" else to_decimal(s).
2095 2114
2096 define String 2115 define String
2097 frame_stack_rows 2116 frame_stack_rows
@@ -2119,13 +2138,13 @@ define String @@ -2119,13 +2138,13 @@ define String
2119 define Printable_tree 2138 define Printable_tree
2120 standard_headers 2139 standard_headers
2121 ( 2140 (
2122 - Int32 size 2141 + Int size
2123 ) = 2142 ) =
2124 [ 2143 [
2125 "HTTP/1.0 200 OK" + crlf + 2144 "HTTP/1.0 200 OK" + crlf +
2126 "Server: Anubis" + crlf + 2145 "Server: Anubis" + crlf +
2127 "Content-Type: text/html" + crlf + 2146 "Content-Type: text/html" + crlf +
2128 - "Content-Length: "+integer_to_string(size)+crlf+ 2147 + "Content-Length: "+to_decimal(size)+crlf+
2129 crlf 2148 crlf
2130 ]. 2149 ].
2131 2150
@@ -2211,7 +2230,7 @@ public define Printable_tree @@ -2211,7 +2230,7 @@ public define Printable_tree
2211 if p is 2230 if p is
2212 { 2231 {
2213 web_page(title,metas,head_scripts,body) then 2232 web_page(title,metas,head_scripts,body) then
2214 - with body = 2233 + with fullpage =
2215 [ 2234 [
2216 "<html>", 2235 "<html>",
2217 "<head>", 2236 "<head>",
@@ -2240,10 +2259,10 @@ public define Printable_tree @@ -2240,10 +2259,10 @@ public define Printable_tree
2240 if hs is 2259 if hs is
2241 { 2260 {
2242 empty then [ ], 2261 empty then [ ],
2243 - anubis then standard_headers(length(body)), 2262 + anubis then standard_headers(length(fullpage)),
2244 apache then apache_headers 2263 apache then apache_headers
2245 } 2264 }
2246 - . body 2265 + . fullpage
2247 ], 2266 ],
2248 standard_frameset(title,metas,height,width,main) then 2267 standard_frameset(title,metas,height,width,main) then
2249 with body = 2268 with body =
@@ -2319,19 +2338,19 @@ public define Bool @@ -2319,19 +2338,19 @@ public define Bool
2319 public define Cell 2338 public define Cell
2320 h_spacer 2339 h_spacer
2321 ( 2340 (
2322 - Int32 n 2341 + Int n
2323 ) = 2342 ) =
2324 - cell([absolute_width(n)],literal("&nbsp;")). 2343 + cell([absolute_width(n)],text("&nbsp;")).
2325 2344
2326 public define Cell 2345 public define Cell
2327 v_spacer 2346 v_spacer
2328 ( 2347 (
2329 - Int32 n 2348 + Int n
2330 ) = 2349 ) =
2331 - cell([absolute_height(n)],literal("&nbsp;")). 2350 + cell([absolute_height(n)],text("&nbsp;")).
2332 2351
2333 public define Cell 2352 public define Cell
2334 - empty = cell([],literal("&nbsp;")). 2353 + empty = cell([],text("&nbsp;")).
2335 2354
2336 2355
2337 2356
@@ -2339,19 +2358,19 @@ public define Cell @@ -2339,19 +2358,19 @@ public define Cell
2339 at each call. The argument is the name of the file (relative to the directory of the 2358 at each call. The argument is the name of the file (relative to the directory of the
2340 server), and the file is created automatically. It returns the number of the visitor. 2359 server), and the file is created automatically. It returns the number of the visitor.
2341 2360
2342 -public define Int32 2361 +public define Int
2343 get_visitor_number 2362 get_visitor_number
2344 ( 2363 (
2345 String counter_file_name, 2364 String counter_file_name,
2346 ) = 2365 ) =
2347 protect 2366 protect
2348 - if (RetrieveResult(Int32))retrieve(counter_file_name) is 2367 + if (RetrieveResult(Int))retrieve(counter_file_name) is
2349 { 2368 {
2350 cannot_find_file then 2369 cannot_find_file then
2351 // 2370 //
2352 // It's time to create the file. 2371 // It's time to create the file.
2353 // 2372 //
2354 - if save((Int32)1,counter_file_name) is 2373 + if save((Int)1,counter_file_name) is
2355 { 2374 {
2356 cannot_open_file then 0, 2375 cannot_open_file then 0,
2357 write_error then 0, 2376 write_error then 0,
calexium_lib/web/CXM_http_get_common.anubis
@@ -32,7 +32,7 @@ public type HTTP_argument: @@ -32,7 +32,7 @@ public type HTTP_argument:
32 32
33 'crlf' and 'crlfcrlf' are defined in 'basis.anubis'. 33 'crlf' and 'crlfcrlf' are defined in 'basis.anubis'.
34 34
35 -public define Maybe(Int32) 35 +public define Maybe(Int)
36 has_double_crlf 36 has_double_crlf
37 ( 37 (
38 String s, 38 String s,
@@ -159,21 +159,21 @@ public define Bool @@ -159,21 +159,21 @@ public define Bool
159 159
160 Separating the server name from the port. 160 Separating the server name from the port.
161 161
162 -public define (String,Int32) 162 +public define (String,Word32)
163 separate_name_port 163 separate_name_port
164 ( 164 (
165 String server_name, 165 String server_name,
166 - Int32 default_port 166 + Word32 default_port
167 ) = 167 ) =
168 if find(":",server_name,0) is 168 if find(":",server_name,0) is
169 { 169 {
170 failure then (server_name,default_port), 170 failure then (server_name,default_port),
171 success(n) then 171 success(n) then
172 (substr(server_name,0,n), 172 (substr(server_name,0,n),
173 - if string_to_integer(substr(server_name,n+1,length(server_name)-n-1)) is 173 + if decimal_scan(substr(server_name,n+1,length(server_name)-n-1)) is
174 { 174 {
175 failure then default_port, 175 failure then default_port,
176 - success(p) then p 176 + success(p) then truncate_to_Word32(p)
177 }) 177 })
178 }. 178 }.
179 179
@@ -192,7 +192,7 @@ define HTTP_header @@ -192,7 +192,7 @@ define HTTP_header
192 separate_header 192 separate_header
193 ( 193 (
194 String header, 194 String header,
195 - Int32 i 195 + Int i
196 ) = 196 ) =
197 if nth(i,header) is 197 if nth(i,header) is
198 { 198 {
@@ -210,7 +210,7 @@ define List(HTTP_header) @@ -210,7 +210,7 @@ define List(HTTP_header)
210 separate_headers 210 separate_headers
211 ( 211 (
212 String headers, 212 String headers,
213 - Int32 start, 213 + Int start,
214 ) = 214 ) =
215 if find("\r\n",headers,start) is 215 if find("\r\n",headers,start) is
216 { 216 {
@@ -244,7 +244,7 @@ public define One @@ -244,7 +244,7 @@ public define One
244 public define Word8 244 public define Word8
245 force_nth 245 force_nth
246 ( 246 (
247 - Int32 n, 247 + Int n,
248 String s 248 String s
249 ) = 249 ) =
250 if nth(n,s) is 250 if nth(n,s) is
calexium_lib/web/CXM_making_a_web_site.anubis
@@ -439,7 +439,7 @@ public define Web_Site @@ -439,7 +439,7 @@ public define Web_Site
439 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) ticket_lost_state, 439 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) ticket_lost_state,
440 List(Web_Action($SessionTicket, $State)) actions, 440 List(Web_Action($SessionTicket, $State)) actions,
441 (Maybe($SessionTicket), Maybe($State), List(Web_arg) lwa) -> HTML_Page compute_page, 441 (Maybe($SessionTicket), Maybe($State), List(Web_arg) lwa) -> HTML_Page compute_page,
442 - Int32 timeout, // seconds (todo: minutes) 442 + Int timeout, // seconds (todo: minutes)
443 List(Redirection) redirections, 443 List(Redirection) redirections,
444 String charset, 444 String charset,
445 List(String) journal_extensions, 445 List(String) journal_extensions,
@@ -559,8 +559,8 @@ public define Web_Site @@ -559,8 +559,8 @@ public define Web_Site
559 'start_web_sites' below. This function returns a result of the following type: 559 'start_web_sites' below. This function returns a result of the following type:
560 560
561 public type Start_Web_Sites_Result: 561 public type Start_Web_Sites_Result:
562 - cannot_bind_to_port(Int32),  
563 - cannot_bind_to_port(Int32,Int32), 562 + cannot_bind_to_port(Word32),
  563 + cannot_bind_to_port(Word32,Word32),
564 ok(Server http_server, 564 ok(Server http_server,
565 Server https_server). 565 Server https_server).
566 566
@@ -582,9 +582,9 @@ public type Start_Web_Sites_Result: @@ -582,9 +582,9 @@ public type Start_Web_Sites_Result:
582 public define Start_Web_Sites_Result 582 public define Start_Web_Sites_Result
583 start_web_sites 583 start_web_sites
584 ( 584 (
585 - Int32 ip_address, // the IP address shared by the web sites  
586 - Int32 http_port, // usually: 80  
587 - Int32 https_port, // usually: 443 585 + Word32 ip_address, // the IP address shared by the web sites
  586 + Word32 http_port, // usually: 80
  587 + Word32 https_port, // usually: 443
588 String ssl_certificate_common_name, 588 String ssl_certificate_common_name,
589 List(Web_Site) web_sites, // web sites to be started 589 List(Web_Site) web_sites, // web sites to be started
590 Var(Bool) shutdown_required 590 Var(Bool) shutdown_required
@@ -627,12 +627,12 @@ public define Start_Web_Sites_Result @@ -627,12 +627,12 @@ public define Start_Web_Sites_Result
627 627
628 628
629 public type HTML_Size: 629 public type HTML_Size:
630 - absolute(Int32), // in pixels  
631 - percentage(Int32). 630 + absolute(Int), // in pixels
  631 + percentage(Int).
632 632
633 633
634 public type Text_Option: 634 public type Text_Option:
635 - size(Int32), // size of character font to use 635 + size(Int), // size of character font to use
636 font(String), // name of character font to use (such as "helvetica",...) 636 font(String), // name of character font to use (such as "helvetica",...)
637 color(RGB), // color to be used for characters 637 color(RGB), // color to be used for characters
638 italic, 638 italic,
@@ -726,7 +726,7 @@ public type CoreAttrs: @@ -726,7 +726,7 @@ public type CoreAttrs:
726 lang (String), 726 lang (String),
727 dir (Reading_Way), 727 dir (Reading_Way),
728 accesskey (Word8), 728 accesskey (Word8),
729 - tabindex (Int32), 729 + tabindex (Int),
730 attr (String, String), 730 attr (String, String),
731 event (HtmlEvents, String). 731 event (HtmlEvents, String).
732 732
@@ -737,7 +737,7 @@ public type InputAttrs: @@ -737,7 +737,7 @@ public type InputAttrs:
737 lang (String), 737 lang (String),
738 dir (Reading_Way), 738 dir (Reading_Way),
739 accesskey (Word8), 739 accesskey (Word8),
740 - tabindex (Int32), 740 + tabindex (Int),
741 attr (String, String), 741 attr (String, String),
742 event (HtmlEvents, String). 742 event (HtmlEvents, String).
743 743
@@ -788,12 +788,12 @@ define String event_name @@ -788,12 +788,12 @@ define String event_name
788 public type Table_Option: 788 public type Table_Option:
789 background_color(RGB), // applied to all cells in the table 789 background_color(RGB), // applied to all cells in the table
790 background_image(String url), 790 background_image(String url),
791 - border(Int32 width_of_outer_edge, // if not present, all values are 0  
792 - Int32 width_of_top_of_relief,  
793 - Int32 width_of_inner_edge, 791 + border(Int width_of_outer_edge, // if not present, all values are 0
  792 + Int width_of_top_of_relief,
  793 + Int width_of_inner_edge,
794 RGB border_color), 794 RGB border_color),
795 - width(Int32), // sets a minimal width for the table  
796 - percentage_width(Int32). 795 + width(Int), // sets a minimal width for the table
  796 + percentage_width(Int).
797 797
798 798
799 public define Table_Option nude = border(0,0,0,rgb(0,0,0)). 799 public define Table_Option nude = border(0,0,0,rgb(0,0,0)).
@@ -821,11 +821,11 @@ public type Cell_Option: @@ -821,11 +821,11 @@ public type Cell_Option:
821 base_line, // align the content vertically according to base lines 821 base_line, // align the content vertically according to base lines
822 background_color(RGB), 822 background_color(RGB),
823 background_image(String url, BackgroundOption), 823 background_image(String url, BackgroundOption),
824 - width(Int32), // sets a minimal width for the cell  
825 - percentage_width(Int32),  
826 - height(Int32), // sets a minimal height for the cell  
827 - columns(Int32), // lets the cell span over several columns  
828 - rows(Int32), // lets the cell span over several rows 824 + width(Int), // sets a minimal width for the cell
  825 + percentage_width(Int),
  826 + height(Int), // sets a minimal height for the cell
  827 + columns(Int), // lets the cell span over several columns
  828 + rows(Int), // lets the cell span over several rows
829 nowrap. // do not allow text wrapping within the cell 829 nowrap. // do not allow text wrapping within the cell
830 830
831 A list of 'Cell_Option' must be given with each cell and each row in a table. Options 831 A list of 'Cell_Option' must be given with each cell and each row in a table. Options
@@ -907,8 +907,8 @@ public type Actioner_Connection: @@ -907,8 +907,8 @@ public type Actioner_Connection:
907 public type Other_Window_Option: 907 public type Other_Window_Option:
908 resizable, // the new window may be resized by the client 908 resizable, // the new window may be resized by the client
909 scrollbars, // the new window has scrollbars 909 scrollbars, // the new window has scrollbars
910 - width(Int32), // the new window has the specified width  
911 - height(Int32). // the new window has the specified height 910 + width(Int), // the new window has the specified width
  911 + height(Int). // the new window has the specified height
912 912
913 public type Actioner_Target: 913 public type Actioner_Target:
914 same, 914 same,
@@ -920,10 +920,10 @@ public type Actioner_Aspect: @@ -920,10 +920,10 @@ public type Actioner_Aspect:
920 img_link (String img_url, String alt_text), 920 img_link (String img_url, String alt_text),
921 push_button (List(CoreAttrs),String text), 921 push_button (List(CoreAttrs),String text),
922 button (String url_off, String url_on), // rollover button 922 button (String url_off, String url_on), // rollover button
923 - button (String url_off, String url_on, Int32 w, Int32 h), // idem with size 923 + button (String url_off, String url_on, Int w, Int h), // idem with size
924 submit (List(CoreAttrs),String text), 924 submit (List(CoreAttrs),String text),
925 - immediate_selector (List(CoreAttrs),WebArgName name, Int32 size, List((WebArgValue,String)) choices),  
926 - immediate_selector (List(CoreAttrs),WebArgName name, Int32 size, List((WebArgValue,String)) choices, InitialValue selected). 925 + immediate_selector (List(CoreAttrs),WebArgName name, Int size, List((WebArgValue,String)) choices),
  926 + immediate_selector (List(CoreAttrs),WebArgName name, Int size, List((WebArgValue,String)) choices, InitialValue selected).
927 927
928 928
929 929
@@ -951,14 +951,14 @@ public define Actioner_Aspect @@ -951,14 +951,14 @@ public define Actioner_Aspect
951 link 951 link
952 ( 952 (
953 List(Text_Option) options, 953 List(Text_Option) options,
954 - Int32 i 954 + Int i
955 ) = 955 ) =
956 - link(options,integer_to_string(i), failure). 956 + link(options,to_decimal(i), failure).
957 957
958 public define Actioner_Aspect 958 public define Actioner_Aspect
959 link 959 link
960 ( 960 (
961 - Int32 i 961 + Int i
962 ) = 962 ) =
963 link([], i). 963 link([], i).
964 964
@@ -986,12 +986,12 @@ public type HTML_In_Form: @@ -986,12 +986,12 @@ public type HTML_In_Form:
986 preformated (List(Text_Option), String), 986 preformated (List(Text_Option), String),
987 paragraph (List(Text_Option), HTML_In_Form content), 987 paragraph (List(Text_Option), HTML_In_Form content),
988 image (List(CoreAttrs), String url, String alternate), 988 image (List(CoreAttrs), String url, String alternate),
989 - image (List(CoreAttrs), String url, String alternate, Int32 width, Int32 height), 989 + image (List(CoreAttrs), String url, String alternate, Int width, Int height),
990 table (List(Table_Option), HTML_Header_Row(HTML_In_Form), List(HTML_Row(HTML_In_Form)), HTML_Footer_Row(HTML_In_Form)), 990 table (List(Table_Option), HTML_Header_Row(HTML_In_Form), List(HTML_Row(HTML_In_Form)), HTML_Footer_Row(HTML_In_Form)),
991 center (HTML_In_Form), 991 center (HTML_In_Form),
992 mail_to (String email, HTML_In_Form element), 992 mail_to (String email, HTML_In_Form element),
993 - scroller (Int32 width, Int32 height,  
994 - Int32 content_width, Int32 content_height, 993 + scroller (Int width, Int height,
  994 + Int content_width, Int content_height,
995 HTML_In_Form content), 995 HTML_In_Form content),
996 actioner (Actioner_Connection, Actioner_Target, Actioner_Aspect, 996 actioner (Actioner_Connection, Actioner_Target, Actioner_Aspect,
997 String action_name, List((String,String)) extra_ops, 997 String action_name, List((String,String)) extra_ops,
@@ -1001,18 +1001,18 @@ public type HTML_In_Form: @@ -1001,18 +1001,18 @@ public type HTML_In_Form:
1001 foreign_link (List(Text_Option), String url, String name), 1001 foreign_link (List(Text_Option), String url, String name),
1002 private_download (String abs_path, String name, String extra_ext, 1002 private_download (String abs_path, String name, String extra_ext,
1003 Maybe((String,List((String,String)))) action), 1003 Maybe((String,List((String,String)))) action),
1004 - text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width),  
1005 - text_input_ro (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width),  
1006 - password_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width),  
1007 - text_area (List(TextAreaOption), String label_text, HtmlId id, WebArgName name, InitialValue init, Int32 width, Int32 height),  
1008 - file_upload (List(InputAttrs), String label, HtmlId id, WebArgName name, Int32 width),  
1009 - selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List(String) choices),  
1010 - selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List(String) choices, InitialValue selected), 1004 + text_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
  1005 + text_input_ro (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
  1006 + password_input (List(InputAttrs), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width),
  1007 + text_area (List(TextAreaOption), String label_text, HtmlId id, WebArgName name, InitialValue init, Int width, Int height),
  1008 + file_upload (List(InputAttrs), String label, HtmlId id, WebArgName name, Int width),
  1009 + selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List(String) choices),
  1010 + selector (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List(String) choices, InitialValue selected),
1011 // List((String,String)) = List((code,name)) where : 1011 // List((String,String)) = List((code,name)) where :
1012 // code is the web-arg value 1012 // code is the web-arg value
1013 // name appears in selector 1013 // name appears in selector
1014 - selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List((WebArgValue,String)) choices),  
1015 - selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int32 size, List((WebArgValue,String)) choices, InitialValue selected), 1014 + selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List((WebArgValue,String)) choices),
  1015 + selector_c (List(InputAttrs), String label_text, HtmlId id, WebArgName name, Int size, List((WebArgValue,String)) choices, InitialValue selected),
1016 radio_button (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked), 1016 radio_button (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1017 radio_button_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked), 1017 radio_button_r (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
1018 check_box (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked), 1018 check_box (List(InputAttrs), String label_text, HtmlId id, WebArgName name, WebArgValue value, Bool checked),
@@ -1029,12 +1029,12 @@ public define HTML_In_Form literal(Printable_tree t) = literal_pt(t). @@ -1029,12 +1029,12 @@ public define HTML_In_Form literal(Printable_tree t) = literal_pt(t).
1029 1029
1030 public define HTML_In_Form image(String url) = image([], url, url). 1030 public define HTML_In_Form image(String url) = image([], url, url).
1031 1031
1032 -public define HTML_In_Form image(String url, Int32 width, Int32 height) = image([], url, url, width, height). 1032 +public define HTML_In_Form image(String url, Int width, Int height) = image([], url, url, width, height).
1033 1033
1034 public define HTML_In_Form 1034 public define HTML_In_Form
1035 foreign_link 1035 foreign_link
1036 ( 1036 (
1037 - Int32 tsize, 1037 + Int tsize,
1038 String url, 1038 String url,
1039 String name 1039 String name
1040 ) = 1040 ) =
@@ -1066,8 +1066,8 @@ public define HTML_In_Form @@ -1066,8 +1066,8 @@ public define HTML_In_Form
1066 ( 1066 (
1067 WebArgName name, 1067 WebArgName name,
1068 InitialValue init, 1068 InitialValue init,
1069 - Int32 width,  
1070 - Int32 height 1069 + Int width,
  1070 + Int height
1071 ) = 1071 ) =
1072 text_area([], "", htmlId(""), name,init,width,height). 1072 text_area([], "", htmlId(""), name,init,width,height).
1073 1073
@@ -1077,8 +1077,8 @@ public define HTML_In_Form @@ -1077,8 +1077,8 @@ public define HTML_In_Form
1077 List(TextAreaOption) options, 1077 List(TextAreaOption) options,
1078 WebArgName name, 1078 WebArgName name,
1079 InitialValue init, 1079 InitialValue init,
1080 - Int32 width,  
1081 - Int32 height 1080 + Int width,
  1081 + Int height
1082 ) = 1082 ) =
1083 text_area(options, "", htmlId(""), name,init,width,height). 1083 text_area(options, "", htmlId(""), name,init,width,height).
1084 1084
@@ -1158,7 +1158,7 @@ public define HTML_In_Form @@ -1158,7 +1158,7 @@ public define HTML_In_Form
1158 = check_box_r (options, label_text, htmlId(n.name), n, value, checked). 1158 = check_box_r (options, label_text, htmlId(n.name), n, value, checked).
1159 1159
1160 public define HTML_In_Form 1160 public define HTML_In_Form
1161 - file_upload (WebArgName name, Int32 width) 1161 + file_upload (WebArgName name, Int width)
1162 = file_upload([], "", htmlId(""), name, width). 1162 = file_upload([], "", htmlId(""), name, width).
1163 1163
1164 1164
@@ -1170,12 +1170,12 @@ public type HTML_Off_Form: @@ -1170,12 +1170,12 @@ public type HTML_Off_Form:
1170 preformated (List(Text_Option), String), 1170 preformated (List(Text_Option), String),
1171 paragraph (List(Text_Option), HTML_Off_Form content), 1171 paragraph (List(Text_Option), HTML_Off_Form content),
1172 image (List(CoreAttrs), String url, String alternate), 1172 image (List(CoreAttrs), String url, String alternate),
1173 - image (List(CoreAttrs), String url, String alternate, Int32 width, Int32 height), 1173 + image (List(CoreAttrs), String url, String alternate, Int width, Int height),
1174 table (List(Table_Option), HTML_Header_Row(HTML_Off_Form), List(HTML_Row(HTML_Off_Form)), HTML_Footer_Row(HTML_Off_Form)), 1174 table (List(Table_Option), HTML_Header_Row(HTML_Off_Form), List(HTML_Row(HTML_Off_Form)), HTML_Footer_Row(HTML_Off_Form)),
1175 center (HTML_Off_Form), 1175 center (HTML_Off_Form),
1176 mail_to (String email, HTML_Off_Form element), 1176 mail_to (String email, HTML_Off_Form element),
1177 - scroller (Int32 width, Int32 height,  
1178 - Int32 content_width, Int32 content_height, 1177 + scroller (Int width, Int height,
  1178 + Int content_width, Int content_height,
1179 HTML_Off_Form content), 1179 HTML_Off_Form content),
1180 fixed_size (HTML_Size width, HTML_Size height, HTML_Off_Form content), 1180 fixed_size (HTML_Size width, HTML_Size height, HTML_Off_Form content),
1181 fixed_size_2 (HTML_Size width, HTML_Size height, String name_of_HTML_file), 1181 fixed_size_2 (HTML_Size width, HTML_Size height, String name_of_HTML_file),
@@ -1203,7 +1203,7 @@ public type HTML_Off_Form: @@ -1203,7 +1203,7 @@ public type HTML_Off_Form:
1203 1203
1204 public define HTML_Off_Form image(String url) = image([], url, url). 1204 public define HTML_Off_Form image(String url) = image([], url, url).
1205 1205
1206 -public define HTML_Off_Form image(String url, Int32 width, Int32 height) = image([], url, url, width, height). 1206 +public define HTML_Off_Form image(String url, Int width, Int height) = image([], url, url, width, height).
1207 1207
1208 public define HTML_Off_Form 1208 public define HTML_Off_Form
1209 form 1209 form
@@ -1234,7 +1234,7 @@ public define HTML_Off_Form fixed_size(HTML_Size width, HTML_Size height, String @@ -1234,7 +1234,7 @@ public define HTML_Off_Form fixed_size(HTML_Size width, HTML_Size height, String
1234 public define HTML_Off_Form 1234 public define HTML_Off_Form
1235 foreign_link 1235 foreign_link
1236 ( 1236 (
1237 - Int32 tsize, 1237 + Int tsize,
1238 String url, 1238 String url,
1239 String name 1239 String name
1240 ) = 1240 ) =
@@ -1329,15 +1329,15 @@ public define HTML_Off_Form @@ -1329,15 +1329,15 @@ public define HTML_Off_Form
1329 text 1329 text
1330 ( 1330 (
1331 List(Text_Option) lto, 1331 List(Text_Option) lto,
1332 - Int32 i 1332 + Int i
1333 ) = 1333 ) =
1334 - text(lto,integer_to_string(i)). 1334 + text(lto,to_decimal(i)).
1335 1335
1336 1336
1337 public define HTML_Off_Form 1337 public define HTML_Off_Form
1338 text 1338 text
1339 ( 1339 (
1340 - Int32 i 1340 + Int i
1341 ) = 1341 ) =
1342 text([],i). 1342 text([],i).
1343 1343
@@ -1353,14 +1353,14 @@ public define HTML_Off_Form @@ -1353,14 +1353,14 @@ public define HTML_Off_Form
1353 public define HTML_Cell(HTML_Off_Form) 1353 public define HTML_Cell(HTML_Off_Form)
1354 width_gap 1354 width_gap
1355 ( 1355 (
1356 - Int32 w 1356 + Int w
1357 ) = 1357 ) =
1358 cell([width(w)],text([],"")). 1358 cell([width(w)],text([],"")).
1359 1359
1360 public define HTML_Cell(HTML_In_Form) 1360 public define HTML_Cell(HTML_In_Form)
1361 width_gap 1361 width_gap
1362 ( 1362 (
1363 - Int32 w 1363 + Int w
1364 ) = 1364 ) =
1365 cell([width(w)],text([],"")). 1365 cell([width(w)],text([],"")).
1366 1366
@@ -1370,14 +1370,14 @@ public define HTML_Cell(HTML_In_Form) @@ -1370,14 +1370,14 @@ public define HTML_Cell(HTML_In_Form)
1370 public define HTML_Row(HTML_Off_Form) 1370 public define HTML_Row(HTML_Off_Form)
1371 height_gap 1371 height_gap
1372 ( 1372 (
1373 - Int32 h 1373 + Int h
1374 ) = 1374 ) =
1375 row([],[cell([height(h)],text([],""))]). 1375 row([],[cell([height(h)],text([],""))]).
1376 1376
1377 public define HTML_Row(HTML_In_Form) 1377 public define HTML_Row(HTML_In_Form)
1378 height_gap 1378 height_gap
1379 ( 1379 (
1380 - Int32 h 1380 + Int h
1381 ) = 1381 ) =
1382 row([],[cell([height(h)],text([],""))]). 1382 row([],[cell([height(h)],text([],""))]).
1383 1383
@@ -1430,8 +1430,8 @@ public type HTML_Meta: @@ -1430,8 +1430,8 @@ public type HTML_Meta:
1430 refresh (Actioner_Connection connection, 1430 refresh (Actioner_Connection connection,
1431 Actioner_Target target, 1431 Actioner_Target target,
1432 String action_name, 1432 String action_name,
1433 - Int32 delay), // in seconds  
1434 - refresh (String url, Int32 delay), // in seconds 1433 + Int delay), // in seconds
  1434 + refresh (String url, Int delay), // in seconds
1435 meta (String name, String content), 1435 meta (String name, String content),
1436 http_equiv (String name, String content), 1436 http_equiv (String name, String content),
1437 generic_meta (List((String,String))), 1437 generic_meta (List((String,String))),
@@ -1707,7 +1707,7 @@ read CXM_web_arg_encode.anubis @@ -1707,7 +1707,7 @@ read CXM_web_arg_encode.anubis
1707 define (Maybe($State) s) -> String // the function constructed returns the name of the state 1707 define (Maybe($State) s) -> String // the function constructed returns the name of the state
1708 make_save_state_function 1708 make_save_state_function
1709 ( 1709 (
1710 - Int32 timeout, 1710 + Int timeout,
1711 String state_directory 1711 String state_directory
1712 ) = 1712 ) =
1713 (Maybe($State) mbs) |-> 1713 (Maybe($State) mbs) |->
@@ -1740,7 +1740,7 @@ define (String state_name) -&gt; PreviousState($State) @@ -1740,7 +1740,7 @@ define (String state_name) -&gt; PreviousState($State)
1740 ) = 1740 ) =
1741 (String state_name) |-> 1741 (String state_name) |->
1742 with file_path = state_directory+"/s"+state_name, 1742 with file_path = state_directory+"/s"+state_name,
1743 - if (RetrieveResult((Int32,$State)))retrieve(file_path) is ok(d) 1743 + if (RetrieveResult((Int,$State)))retrieve(file_path) is ok(d)
1744 then ( 1744 then (
1745 if d is (time_stamp,s) then 1745 if d is (time_stamp,s) then
1746 if time_stamp < now 1746 if time_stamp < now
@@ -1772,7 +1772,7 @@ define (List(String) file_names) -&gt; One @@ -1772,7 +1772,7 @@ define (List(String) file_names) -&gt; One
1772 [ ] then unique, 1772 [ ] then unique,
1773 [h . t] then 1773 [h . t] then
1774 with file_path = state_directory+"/"+h, 1774 with file_path = state_directory+"/"+h,
1775 - if (RetrieveResult((Int32,$State)))retrieve(file_path) is ok(d) 1775 + if (RetrieveResult((Int,$State)))retrieve(file_path) is ok(d)
1776 then ( 1776 then (
1777 if d is (time_stamp,data) then 1777 if d is (time_stamp,data) then
1778 if time_stamp < now 1778 if time_stamp < now
@@ -1830,8 +1830,8 @@ define One @@ -1830,8 +1830,8 @@ define One
1830 delete_states_loop 1830 delete_states_loop
1831 ( 1831 (
1832 List((String,List(String) -> One)) directories_and_functions, 1832 List((String,List(String) -> One)) directories_and_functions,
1833 - Int32 timeout,  
1834 - Int32 next_time, 1833 + Int timeout,
  1834 + Int next_time,
1835 Server http_server, 1835 Server http_server,
1836 Server https_server, 1836 Server https_server,
1837 Var(Bool) shutdown_required 1837 Var(Bool) shutdown_required
@@ -1932,10 +1932,10 @@ define String @@ -1932,10 +1932,10 @@ define String
1932 1932
1933 In order to uniquely name object for JavaScript we generate unique ids from a counter. 1933 In order to uniquely name object for JavaScript we generate unique ids from a counter.
1934 1934
1935 -define Int32 1935 +define Int
1936 new_idnum 1936 new_idnum
1937 ( 1937 (
1938 - Var(Int32) ic_v // 'idnum' counter variable 1938 + Var(Int) ic_v // 'idnum' counter variable
1939 ) = 1939 ) =
1940 protect 1940 protect
1941 with result = *ic_v+1, 1941 with result = *ic_v+1,
@@ -2031,7 +2031,7 @@ define (List(Web_arg) lwa) -&gt; Separated_Web_Args($State) @@ -2031,7 +2031,7 @@ define (List(Web_arg) lwa) -&gt; Separated_Web_Args($State)
2031 { 2031 {
2032 web_arg(n,v) then 2032 web_arg(n,v) then
2033 with prefix = if substr(n,0,4) = "amp;" then substr(n,4,1) else substr(n,0,1), 2033 with prefix = if substr(n,0,4) = "amp;" then substr(n,4,1) else substr(n,0,1),
2034 - name_start = (Int32)(if substr(n,0,4) = "amp;" then 5 else 1), 2034 + name_start = (Int)(if substr(n,0,4) = "amp;" then 5 else 1),
2035 if prefix = "s" then 2035 if prefix = "s" then
2036 swa(success(retrieve_state(v)),an1,op1) else 2036 swa(success(retrieve_state(v)),an1,op1) else
2037 if prefix = "a" then 2037 if prefix = "a" then
@@ -2070,7 +2070,7 @@ define (Maybe($State) previous, @@ -2070,7 +2070,7 @@ define (Maybe($State) previous,
2070 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) 2070 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header))
2071 make_apply_action_function 2071 make_apply_action_function
2072 ( 2072 (
2073 - List(Web_Action($SessionTicket, $State)) actions 2073 + List(Web_Action($SessionTicket, $State)) actions_list
2074 ) = 2074 ) =
2075 with f = 2075 with f =
2076 (Maybe($State) previous, 2076 (Maybe($State) previous,
@@ -2121,7 +2121,7 @@ define (Maybe($State) previous, @@ -2121,7 +2121,7 @@ define (Maybe($State) previous,
2121 HTTP_Info http_info, 2121 HTTP_Info http_info,
2122 List(Web_arg) lwa, 2122 List(Web_arg) lwa,
2123 Bool is_https) |-> 2123 Bool is_https) |->
2124 - f(previous,action_name,http_info,lwa,is_https,actions). 2124 + f(previous, action_name, http_info, lwa, is_https, actions_list).
2125 2125
2126 2126
2127 2127
@@ -2138,7 +2138,7 @@ define (Maybe($State) previous, @@ -2138,7 +2138,7 @@ define (Maybe($State) previous,
2138 need another one, because, we have some extra informations to record for each site. 2138 need another one, because, we have some extra informations to record for each site.
2139 2139
2140 public type Web_Site: 2140 public type Web_Site:
2141 - web_site((Int32,Int32) -> Web_Site_Description description, 2141 + web_site((Word32,Word32) -> Web_Site_Description description,
2142 List(String) -> One delete_out_of_date). 2142 List(String) -> One delete_out_of_date).
2143 2143
2144 2144
@@ -2154,8 +2154,8 @@ public type Web_Site: @@ -2154,8 +2154,8 @@ public type Web_Site:
2154 2154
2155 type CommonInfo: 2155 type CommonInfo:
2156 info(String common_name, 2156 info(String common_name,
2157 - Int32 http_port,  
2158 - Int32 https_port, 2157 + Word32 http_port,
  2158 + Word32 https_port,
2159 String site_directory, 2159 String site_directory,
2160 String authorization_secret 2160 String authorization_secret
2161 ). 2161 ).
@@ -2205,7 +2205,7 @@ public define Web_Site @@ -2205,7 +2205,7 @@ public define Web_Site
2205 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) ticket_lost_state, 2205 Bool is_https) -> (Maybe($SessionTicket), Maybe($State), List(HTTP_header)) ticket_lost_state,
2206 List(Web_Action($SessionTicket, $State)) actions, 2206 List(Web_Action($SessionTicket, $State)) actions,
2207 (Maybe($SessionTicket), Maybe($State), List(Web_arg) lwa) -> HTML_Page compute_page, 2207 (Maybe($SessionTicket), Maybe($State), List(Web_arg) lwa) -> HTML_Page compute_page,
2208 - Int32 timeout, 2208 + Int timeout,
2209 Redirections redirections, 2209 Redirections redirections,
2210 String charset, 2210 String charset,
2211 List(String) journal_extensions, 2211 List(String) journal_extensions,
@@ -2235,7 +2235,7 @@ public define Web_Site @@ -2235,7 +2235,7 @@ public define Web_Site
2235 // 2235 //
2236 // construct the site handler 2236 // construct the site handler
2237 // 2237 //
2238 - site_handler = (Int32 http_port, Int32 https_port) |-> 2238 + site_handler = (Word32 http_port, Word32 https_port) |->
2239 ((String host_name, 2239 ((String host_name,
2240 HTTP_Info http_info, 2240 HTTP_Info http_info,
2241 List(Web_arg) lwa, 2241 List(Web_arg) lwa,
@@ -2293,7 +2293,7 @@ public define Web_Site @@ -2293,7 +2293,7 @@ public define Web_Site
2293 // 2293 //
2294 // construct the web site description 2294 // construct the web site description
2295 // 2295 //
2296 - web_site((Int32 http_port, Int32 https_port) |-> 2296 + web_site((Word32 http_port, Word32 https_port) |->
2297 web_site_description(common_names, 2297 web_site_description(common_names,
2298 site_directory, 2298 site_directory,
2299 redirections, 2299 redirections,
@@ -2320,9 +2320,9 @@ public define Web_Site @@ -2320,9 +2320,9 @@ public define Web_Site
2320 public define Start_Web_Sites_Result 2320 public define Start_Web_Sites_Result
2321 start_web_sites 2321 start_web_sites
2322 ( 2322 (
2323 - Int32 ip_address, // the IP address shared by the web sites  
2324 - Int32 http_port, // usually: 80  
2325 - Int32 https_port, // usually: 443 2323 + Word32 ip_address, // the IP address shared by the web sites
  2324 + Word32 http_port, // usually: 80
  2325 + Word32 https_port, // usually: 443
2326 String ssl_certificate_common_name, 2326 String ssl_certificate_common_name,
2327 List(Web_Site) web_sites, // web sites to be started 2327 List(Web_Site) web_sites, // web sites to be started
2328 Var(Bool) shutdown_required 2328 Var(Bool) shutdown_required
@@ -2372,9 +2372,9 @@ public define Start_Web_Sites_Result @@ -2372,9 +2372,9 @@ public define Start_Web_Sites_Result
2372 public define One 2372 public define One
2373 start_web_sites 2373 start_web_sites
2374 ( 2374 (
2375 - Int32 ip_address, // the IP address shared by the web sites  
2376 - Int32 http_port, // usually: 80  
2377 - Int32 https_port, // usually: 443 2375 + Word32 ip_address, // the IP address shared by the web sites
  2376 + Word32 http_port, // usually: 80
  2377 + Word32 https_port, // usually: 443
2378 String ssl_certificate_common_name, 2378 String ssl_certificate_common_name,
2379 List(Web_Site) web_sites, // web sites to be started 2379 List(Web_Site) web_sites, // web sites to be started
2380 Var(Bool) shutdown_required, 2380 Var(Bool) shutdown_required,
@@ -2426,12 +2426,12 @@ type HTML_Any($T): @@ -2426,12 +2426,12 @@ type HTML_Any($T):
2426 any_preformated (List(Text_Option), String), 2426 any_preformated (List(Text_Option), String),
2427 any_paragraph (List(Text_Option), $T content), 2427 any_paragraph (List(Text_Option), $T content),
2428 any_image (List(CoreAttrs), String url, String alternate), 2428 any_image (List(CoreAttrs), String url, String alternate),
2429 - any_image (List(CoreAttrs), String url, String alternate, Int32 width, Int32 height), 2429 + any_image (List(CoreAttrs), String url, String alternate, Int width, Int height),
2430 any_table (List(Table_Option), HTML_Header_Row($T), List(HTML_Row($T)), HTML_Footer_Row($T)), 2430 any_table (List(Table_Option), HTML_Header_Row($T), List(HTML_Row($T)), HTML_Footer_Row($T)),
2431 any_center ($T), 2431 any_center ($T),
2432 any_mail_to (String email, $T element), 2432 any_mail_to (String email, $T element),
2433 - any_scroller (Int32 width, Int32 height,  
2434 - Int32 content_width, Int32 content_height, 2433 + any_scroller (Int width, Int height,
  2434 + Int content_width, Int content_height,
2435 $T content), 2435 $T content),
2436 any_fixed_size (HTML_Size width, HTML_Size height, $T content), 2436 any_fixed_size (HTML_Size width, HTML_Size height, $T content),
2437 any_fixed_size_2 (HTML_Size width, HTML_Size height, String name_of_HTML_file), 2437 any_fixed_size_2 (HTML_Size width, HTML_Size height, String name_of_HTML_file),
@@ -2464,9 +2464,9 @@ define String @@ -2464,9 +2464,9 @@ define String
2464 RGB color 2464 RGB color
2465 ) = 2465 ) =
2466 if color is rgb(r,g,b) then 2466 if color is rgb(r,g,b) then
2467 - "#" + hexadecimal(word8_to_int32(r),2)  
2468 - + hexadecimal(word8_to_int32(g),2)  
2469 - + hexadecimal(word8_to_int32(b),2). 2467 + "#" + to_hexa(r)
  2468 + + to_hexa(g)
  2469 + + to_hexa(b).
2470 2470
2471 2471
2472 The following is a very arbitrary definition of the opposite color. The thing which is 2472 The following is a very arbitrary definition of the opposite color. The thing which is
@@ -2479,12 +2479,9 @@ define RGB @@ -2479,12 +2479,9 @@ define RGB
2479 RGB color 2479 RGB color
2480 ) = 2480 ) =
2481 if color is rgb(r,g,b) then 2481 if color is rgb(r,g,b) then
2482 - with r1 = word8_to_int32(r),  
2483 - with g1 = word8_to_int32(g),  
2484 - with b1 = word8_to_int32(b),  
2485 - rgb(truncate_to_word8(255-r1),  
2486 - truncate_to_word8(255-g1),  
2487 - truncate_to_word8(255-b1)). 2482 + rgb(255-r,
  2483 + 255-g,
  2484 + 255-b).
2488 2485
2489 2486
2490 2487
@@ -2498,19 +2495,19 @@ define RGB @@ -2498,19 +2495,19 @@ define RGB
2498 2495
2499 Computing printed text length. 2496 Computing printed text length.
2500 2497
2501 - define Int32 2498 + define Int
2502 printed_text_width 2499 printed_text_width
2503 ( 2500 (
2504 - Word8 -> Int32 char_size, 2501 + Word8 -> Int char_size,
2505 List(Word8) l 2502 List(Word8) l
2506 ) = 2503 ) =
2507 if l is 2504 if l is
2508 { 2505 {
2509 - [] then (Int32) 0, 2506 + [] then (Int) 0,
2510 [h . t] then char_size(h) + 1+ printed_text_width(char_size,t) 2507 [h . t] then char_size(h) + 1+ printed_text_width(char_size,t)
2511 }. 2508 }.
2512 2509
2513 - define Int32 2510 + define Int
2514 printed_text_width 2511 printed_text_width
2515 ( 2512 (
2516 SystemFont font, 2513 SystemFont font,
@@ -2538,11 +2535,11 @@ define RGBA @@ -2538,11 +2535,11 @@ define RGBA
2538 ( 2535 (
2539 RGBAImage dest, 2536 RGBAImage dest,
2540 RGBA color, 2537 RGBA color,
2541 - Int32 contrast,  
2542 - Int32 x,  
2543 - Int32 y,  
2544 - Int32 width,  
2545 - Int32 height 2538 + Int contrast,
  2539 + Int x,
  2540 + Int y,
  2541 + Int width,
  2542 + Int height
2546 ) = 2543 ) =
2547 with l = lighten(color,contrast), 2544 with l = lighten(color,contrast),
2548 d = darken(color,contrast), 2545 d = darken(color,contrast),
@@ -2558,8 +2555,8 @@ define RGBA @@ -2558,8 +2555,8 @@ define RGBA
2558 create_button_background 2555 create_button_background
2559 ( 2556 (
2560 RGBA color, 2557 RGBA color,
2561 - Int32 width,  
2562 - Int32 height 2558 + Int width,
  2559 + Int height
2563 ) = 2560 ) =
2564 with result = create_rgba_image(width,height,color), 2561 with result = create_rgba_image(width,height,color),
2565 draw_relief(result,color,100,0,0,width,height); 2562 draw_relief(result,color,100,0,0,width,height);
@@ -2579,9 +2576,9 @@ define RGBA @@ -2579,9 +2576,9 @@ define RGBA
2579 ( 2576 (
2580 RGBAImage image, 2577 RGBAImage image,
2581 String text, 2578 String text,
2582 - Int32 text_index,  
2583 - Int32 pixel_x,  
2584 - Int32 y, 2579 + Int text_index,
  2580 + Int pixel_x,
  2581 + Int y,
2585 Rectangle clip, 2582 Rectangle clip,
2586 RGBA color, 2583 RGBA color,
2587 SystemFont font, 2584 SystemFont font,
@@ -2599,7 +2596,7 @@ define RGBA @@ -2599,7 +2596,7 @@ define RGBA
2599 ( 2596 (
2600 RGBAImage image, 2597 RGBAImage image,
2601 String text, 2598 String text,
2602 - Int32 text_width, 2599 + Int text_width,
2603 RGBA light_color, 2600 RGBA light_color,
2604 RGBA dark_color, 2601 RGBA dark_color,
2605 SystemFont font 2602 SystemFont font
@@ -2637,7 +2634,7 @@ define RGBA @@ -2637,7 +2634,7 @@ define RGBA
2637 String site_directory, 2634 String site_directory,
2638 RGBA color, 2635 RGBA color,
2639 String text, 2636 String text,
2640 - Int32 width, 2637 + Int width,
2641 SystemFont font 2638 SystemFont font
2642 ) = 2639 ) =
2643 with xxxx = web_arg_encode(sha1((color,text,width))), 2640 with xxxx = web_arg_encode(sha1((color,text,width))),
@@ -2649,7 +2646,7 @@ define RGBA @@ -2649,7 +2646,7 @@ define RGBA
2649 else with 2646 else with
2650 text_width = printed_text_width(font,text), 2647 text_width = printed_text_width(font,text),
2651 button_width = max(width,text_width+12), 2648 button_width = max(width,text_width+12),
2652 - button_height = (Int32)20, 2649 + button_height = (Int)20,
2653 light_color = lighten(color,60), 2650 light_color = lighten(color,60),
2654 very_light_color = lighten(light_color,30), 2651 very_light_color = lighten(light_color,30),
2655 dark_color = darken(color,40), 2652 dark_color = darken(color,40),
@@ -2721,7 +2718,7 @@ define String @@ -2721,7 +2718,7 @@ define String
2721 resizable then "resizable", 2718 resizable then "resizable",
2722 scrollbars then "scrollbars", 2719 scrollbars then "scrollbars",
2723 width(w) then "width="+w, 2720 width(w) then "width="+w,
2724 - height(h) then "height="+h 2721 + height(h2) then "height="+h2
2725 } + if t is [ ] then "" else (","+format(t)) 2722 } + if t is [ ] then "" else (","+format(t))
2726 }. 2723 }.
2727 2724
@@ -2787,12 +2784,12 @@ public define Printable_tree @@ -2787,12 +2784,12 @@ public define Printable_tree
2787 2784
2788 2785
2789 2786
2790 -variable Int32 count = 0. 2787 +variable Int count = 0.
2791 2788
2792 Note: this counter is private to the virtual machine, hence there is one counter by 2789 Note: this counter is private to the virtual machine, hence there is one counter by
2793 client and by page : it seems that a new VM (simply a delegate) is started for each request. 2790 client and by page : it seems that a new VM (simply a delegate) is started for each request.
2794 2791
2795 -define Int32 2792 +define Int
2796 new_count 2793 new_count
2797 = 2794 =
2798 count <- *count+1; 2795 count <- *count+1;
@@ -3168,25 +3165,25 @@ define Printable_tree @@ -3168,25 +3165,25 @@ define Printable_tree
3168 Bool is_https, 3165 Bool is_https,
3169 ) = 3166 ) =
3170 //if cinfo is info(common_name,http_port,https_port,site_dir,secret) then 3167 //if cinfo is info(common_name,http_port,https_port,site_dir,secret) then
3171 - with url = make_foreign_link_url(target,url),  
3172 -// with action = format_action(url, aspect, extract_id(aspect), mb_form_name), 3168 + with full_url = make_foreign_link_url(target,url),
  3169 +// with action = format_action(full_url, aspect, extract_id(aspect), mb_form_name),
3173 if aspect is 3170 if aspect is
3174 { 3171 {
3175 3172
3176 link(opt, text, mb_name) then 3173 link(opt, text, mb_name) then
3177 with name_tag = if mb_name is success(n) then " name=\"" + n + "\"" else "", 3174 with name_tag = if mb_name is success(n) then " name=\"" + n + "\"" else "",
3178 [ 3175 [
3179 - "<a href=\"", url, "\"", format_text_options(opt), name_tag, ">", 3176 + "<a href=\"", full_url, "\"", format_text_options(opt), name_tag, ">",
3180 text, 3177 text,
3181 "</a>" 3178 "</a>"
3182 ], 3179 ],
3183 img_link(img,alt_text) then 3180 img_link(img,alt_text) then
3184 [ 3181 [
3185 - "<a href=\"", url ,"\"><img src=\"", img, 3182 + "<a href=\"", full_url ,"\"><img src=\"", img,
3186 "\" alt=\"" + alt_text + "\" border=\"0\"></a>" 3183 "\" alt=\"" + alt_text + "\" border=\"0\"></a>"
3187 ], 3184 ],
3188 push_button(options, text) then 3185 push_button(options, text) then
3189 - ["<a href=\"",url,"\"", format_attrs(options), ">", 3186 + ["<a href=\"",full_url,"\"", format_attrs(options), ">",
3190 text, "</a>" 3187 text, "</a>"
3191 ], 3188 ],
3192 button(url_off,url_on) then 3189 button(url_off,url_on) then
@@ -3268,7 +3265,7 @@ define Printable_tree @@ -3268,7 +3265,7 @@ define Printable_tree
3268 [ if action is 3265 [ if action is
3269 { 3266 {
3270 url(u) then ["<a href=\"",u], 3267 url(u) then ["<a href=\"",u],
3271 - javascript(s,h) then [s,"<a onMouseDown=\"",h] 3268 + javascript(s,h2) then [s,"<a onMouseDown=\"",h2]
3272 }, 3269 },
3273 "\" style=\"text-decoration:none\">", 3270 "\" style=\"text-decoration:none\">",
3274 "<img width=",w," height=",h," alt=\"",url_off,"\" src=\"",url_off,"\" border=0", 3271 "<img width=",w," height=",h," alt=\"",url_off,"\" src=\"",url_off,"\" border=0",
@@ -3358,10 +3355,10 @@ define Printable_tree @@ -3358,10 +3355,10 @@ define Printable_tree
3358 3355
3359 *** [5.6] Formating rows and cells in a table. 3356 *** [5.6] Formating rows and cells in a table.
3360 3357
3361 -define Int32 3358 +define Int
3362 percent 3359 percent
3363 ( 3360 (
3364 - Int32 p 3361 + Int p
3365 ) = 3362 ) =
3366 if p < 0 then 0 else if p > 100 then 100 else p. 3363 if p < 0 then 0 else if p > 100 then 100 else p.
3367 3364
@@ -3421,7 +3418,7 @@ define String @@ -3421,7 +3418,7 @@ define String
3421 background_image(n,o) then " style=\"background: url("+n+")"+format(o)+"\"", 3418 background_image(n,o) then " style=\"background: url("+n+")"+format(o)+"\"",
3422 width(w) then " width=\""+w+"\"", 3419 width(w) then " width=\""+w+"\"",
3423 percentage_width(n) then " width=\""+percent(n)+"%\"", 3420 percentage_width(n) then " width=\""+percent(n)+"%\"",
3424 - height(h) then " height=\""+h+"\"", 3421 + height(h2) then " height=\""+h2+"\"",
3425 columns(n) then " colspan=\""+n+"\"", 3422 columns(n) then " colspan=\""+n+"\"",
3426 rows(n) then " rowspan=\""+n+"\"", 3423 rows(n) then " rowspan=\""+n+"\"",
3427 nowrap then " nowrap" 3424 nowrap then " nowrap"
@@ -3587,7 +3584,7 @@ define String @@ -3587,7 +3584,7 @@ define String
3587 size(n) then "font-size:"+n+"pt", 3584 size(n) then "font-size:"+n+"pt",
3588 font(fn) then "font-family:"+fn, 3585 font(fn) then "font-family:"+fn,
3589 color(c) then if c is rgb(r,g,b) then 3586 color(c) then if c is rgb(r,g,b) then
3590 - "color:rgb("+word8_to_int32(r)+","+word8_to_int32(g)+","+word8_to_int32(b)+")", 3587 + "color:rgb("+to_decimal(r)+","+to_decimal(g)+","+to_decimal(b)+")",
3591 italic then "font-style:italic", 3588 italic then "font-style:italic",
3592 oblique then "font-style:oblique", 3589 oblique then "font-style:oblique",
3593 small_capitals then "font-variant:small-caps", 3590 small_capitals then "font-variant:small-caps",
@@ -3638,11 +3635,11 @@ define Printable_tree @@ -3638,11 +3635,11 @@ define Printable_tree
3638 format_scroller 3635 format_scroller
3639 ( 3636 (
3640 String sn, 3637 String sn,
3641 - Int32 width,  
3642 - Int32 height,  
3643 - Int32 content_width,  
3644 - Int32 content_height,  
3645 - Int32 idnum, // identifying the scroller 3638 + Int width,
  3639 + Int height,
  3640 + Int content_width,
  3641 + Int content_height,
  3642 + Int idnum, // identifying the scroller
3646 $T content, 3643 $T content,
3647 $T -> Printable_tree format_element 3644 $T -> Printable_tree format_element
3648 ) = 3645 ) =
@@ -3714,7 +3711,7 @@ define Printable_tree @@ -3714,7 +3711,7 @@ define Printable_tree
3714 ( 3711 (
3715 CommonInfo cinfo, 3712 CommonInfo cinfo,
3716 String sn, // state_name 3713 String sn, // state_name
3717 - Var(Int32) ic_v, 3714 + Var(Int) ic_v,
3718 HTML_Any($T) element, 3715 HTML_Any($T) element,
3719 $T -> Printable_tree format_element, // able to format a datum of type $T 3716 $T -> Printable_tree format_element, // able to format a datum of type $T
3720 Bool is_https, 3717 Bool is_https,
@@ -3798,7 +3795,7 @@ define Printable_tree @@ -3798,7 +3795,7 @@ define Printable_tree
3798 CommonInfo cinfo, 3795 CommonInfo cinfo,
3799 String fn, // form_name 3796 String fn, // form_name
3800 String sn, // state_name 3797 String sn, // state_name
3801 - Var(Int32) ic_v, // idnum counter variable 3798 + Var(Int) ic_v, // idnum counter variable
3802 HTML_In_Form element, 3799 HTML_In_Form element,
3803 Bool is_https, 3800 Bool is_https,
3804 ) = 3801 ) =
@@ -3983,7 +3980,7 @@ define Printable_tree @@ -3983,7 +3980,7 @@ define Printable_tree
3983 ( 3980 (
3984 CommonInfo cinfo, 3981 CommonInfo cinfo,
3985 String sn, // state_name 3982 String sn, // state_name
3986 - Var(Int32) ic_v, // 'idnum' counter variable 3983 + Var(Int) ic_v, // 'idnum' counter variable
3987 HTML_Off_Form element, 3984 HTML_Off_Form element,
3988 Bool is_https, 3985 Bool is_https,
3989 ) = 3986 ) =
@@ -4037,7 +4034,7 @@ define Printable_tree @@ -4037,7 +4034,7 @@ define Printable_tree
4037 enctype(c), 4034 enctype(c),
4038 " action=\"http", 4035 " action=\"http",
4039 if is_https then "s" else "", 4036 if is_https then "s" else "",
4040 - "://",common_name,":",http_port,"/\">", 4037 + "://",common_name,":",to_decimal(http_port),"/\">",
4041 // action is set dynamically by 4038 // action is set dynamically by
4042 // the actioner using JavaScript 4039 // the actioner using JavaScript
4043 if fn is htmlId(id) then 4040 if fn is htmlId(id) then
@@ -4141,7 +4138,7 @@ define Printable_tree @@ -4141,7 +4138,7 @@ define Printable_tree
4141 { 4138 {
4142 background_color(c) then [" bgcolor=\"" , (String)html_format(c), "\""], 4139 background_color(c) then [" bgcolor=\"" , (String)html_format(c), "\""],
4143 background_image(n) then [" background=", n], 4140 background_image(n) then [" background=", n],
4144 - background_image(n,o) then [" style=\"background: url(",n,")",format(o),"\""] 4141 + background_image(n,o2) then [" style=\"background: url(",n,")",format(o2),"\""]
4145 4142
4146 }. 4143 }.
4147 4144
@@ -4209,7 +4206,7 @@ define Printable_tree @@ -4209,7 +4206,7 @@ define Printable_tree
4209 String charset 4206 String charset
4210 ) = 4207 ) =
4211 if cinfo is info(common_name,http_port,https_port,site_directory,secret) then 4208 if cinfo is info(common_name,http_port,https_port,site_directory,secret) then
4212 - with ic_v = var((Int32)0), 4209 + with ic_v = var((Int)0),
4213 if page is 4210 if page is
4214 { 4211 {
4215 html_page(title,metas,css_styles, css_files, js_files, body) then 4212 html_page(title,metas,css_styles, css_files, js_files, body) then
calexium_lib/web/CXM_mime.anubis
@@ -68,5 +68,5 @@ public define String @@ -68,5 +68,5 @@ public define String
68 String charset, 68 String charset,
69 String text 69 String text
70 )= 70 )=
71 - with text = "=?"+charset+"?B?"+to_string(base64_encode(to_byte_array(text)))+"?=",  
72 - find_and_replace(text, implode([13,10]), implode([13,10,32])). 71 + with text2 = "=?"+charset+"?B?"+to_string(base64_encode(to_byte_array(text)))+"?=",
  72 + find_and_replace(text2, implode([13,10]), implode([13,10,32])).
calexium_lib/web/CXM_multihost_http_server.anubis
@@ -179,7 +179,7 @@ read CXM_mime.anubis @@ -179,7 +179,7 @@ read CXM_mime.anubis
179 public type HTTP_Info: 179 public type HTTP_Info:
180 http_info 180 http_info
181 ( 181 (
182 - Int32 ip_address, // IP address of the client 182 + Word32 ip_address, // IP address of the client
183 String uri, // URI requested by the client 183 String uri, // URI requested by the client
184 List(HTTP_header) http_headers, // HTTP headers sent by the client 184 List(HTTP_header) http_headers, // HTTP headers sent by the client
185 One -> String generate_trust_ticket // may be used against denial of 185 One -> String generate_trust_ticket // may be used against denial of
@@ -283,17 +283,17 @@ public type Web_Site_Description: @@ -283,17 +283,17 @@ public type Web_Site_Description:
283 Each dubious IP address is recorded together with its last activity time. 283 Each dubious IP address is recorded together with its last activity time.
284 284
285 public type DubiousIP: 285 public type DubiousIP:
286 - dubious_ip (Int32 address,  
287 - Int32 last_activity). 286 + dubious_ip (Word32 address,
  287 + Int last_activity).
288 288
289 289
290 public type DenialOfService: 290 public type DenialOfService:
291 - denial_of_service(Var(Int32) max_connections,  
292 - Var(Int32) request_line_delay, // seconds  
293 - Var(Int32) headers_delay,  
294 - Var(Int32) answer_delay, 291 + denial_of_service(Var(Int) max_connections,
  292 + Var(Int) request_line_delay, // seconds
  293 + Var(Int) headers_delay,
  294 + Var(Int) answer_delay,
295 Var(List(DubiousIP)) list_of_dubious, 295 Var(List(DubiousIP)) list_of_dubious,
296 - Var(List(Int32)) reliable_addresses). 296 + Var(List(Word32)) reliable_addresses).
297 297
298 The informations in this set of variables are stored serialized into the file 298 The informations in this set of variables are stored serialized into the file
299 'my_anubis/web_sites/dos_info'. If this file does not exist a set if variables with 299 'my_anubis/web_sites/dos_info'. If this file does not exist a set if variables with
@@ -315,8 +315,8 @@ public define DenialOfService load_denial_of_service_info. @@ -315,8 +315,8 @@ public define DenialOfService load_denial_of_service_info.
315 public define StartServerResult 315 public define StartServerResult
316 start_http_server 316 start_http_server
317 ( 317 (
318 - Int32 ip_address,  
319 - Int32 http_port, 318 + Word32 ip_address,
  319 + Word32 http_port,
320 List(Web_Site_Description) web_sites, 320 List(Web_Site_Description) web_sites,
321 DenialOfService dos 321 DenialOfService dos
322 ). 322 ).
@@ -324,8 +324,8 @@ public define StartServerResult @@ -324,8 +324,8 @@ public define StartServerResult
324 public define StartServerResult 324 public define StartServerResult
325 start_https_server 325 start_https_server
326 ( 326 (
327 - Int32 ip_address,  
328 - Int32 https_port, 327 + Word32 ip_address,
  328 + Word32 https_port,
329 String certificate_common_name, 329 String certificate_common_name,
330 List(Web_Site_Description) web_sites, 330 List(Web_Site_Description) web_sites,
331 DenialOfService dos 331 DenialOfService dos
@@ -452,7 +452,7 @@ public define String @@ -452,7 +452,7 @@ public define String
452 452
453 public type DispatcherInfo: 453 public type DispatcherInfo:
454 site(String common_name, 454 site(String common_name,
455 - Int32 http_port). 455 + Word32 http_port).
456 456
457 The dispatcher does not write into this file. It reads it when it starts, and rereads 457 The dispatcher does not write into this file. It reads it when it starts, and rereads
458 it each time the date of last modification of the file changes, so that the dispatcher 458 it each time the date of last modification of the file changes, so that the dispatcher
@@ -468,8 +468,8 @@ public type DispatcherInfo: @@ -468,8 +468,8 @@ public type DispatcherInfo:
468 public define One 468 public define One
469 start_web_dispatcher 469 start_web_dispatcher
470 ( 470 (
471 - Int32 ip_address, // address for listening (typically 0)  
472 - Int32 port, // typically 80 471 + Word32 ip_address, // address for listening (typically 0)
  472 + Word32 port, // typically 80
473 DenialOfService dos 473 DenialOfService dos
474 ). 474 ).
475 475
@@ -497,7 +497,7 @@ define String @@ -497,7 +497,7 @@ define String
497 ( 497 (
498 UTime t 498 UTime t
499 ) = 499 ) =
500 - integer_to_string(t.seconds) + "." + zero_pad_n(6, t.microseconds ) + "s". 500 + to_decimal(t.seconds) + "." + zero_pad_n(6, t.microseconds ) + "s".
501 501
502 502
503 variable UTime t0 = utime(0,0). 503 variable UTime t0 = utime(0,0).
@@ -508,7 +508,7 @@ define One @@ -508,7 +508,7 @@ define One
508 ( 508 (
509 UTime start 509 UTime start
510 ) = 510 ) =
511 - with delta = (UTime)now - start, 511 + with delta = (UTime)unow - start,
512 t1 <- delta + *t1; 512 t1 <- delta + *t1;
513 unique. 513 unique.
514 514
@@ -519,7 +519,7 @@ define One @@ -519,7 +519,7 @@ define One
519 ( 519 (
520 UTime start 520 UTime start
521 ) = 521 ) =
522 - with delta = (UTime)now - start, 522 + with delta = (UTime)unow - start,
523 t2 <- delta + *t2; 523 t2 <- delta + *t2;
524 unique. 524 unique.
525 525
@@ -529,7 +529,7 @@ public define One @@ -529,7 +529,7 @@ public define One
529 ( 529 (
530 String txt 530 String txt
531 ) = 531 ) =
532 - println(utime_to_string((UTime)now - *t0) + " : " + txt). 532 + println(utime_to_string((UTime)unow - *t0) + " : " + txt).
533 533
534 534
535 ----------------------------------- Table of Contents --------------------------------- 535 ----------------------------------- Table of Contents ---------------------------------
@@ -614,7 +614,7 @@ type Error: @@ -614,7 +614,7 @@ type Error:
614 end_of_line_expected, 614 end_of_line_expected,
615 incorrect_content_length_value, 615 incorrect_content_length_value,
616 colon_expected, 616 colon_expected,
617 - timeout(Int32). 617 + timeout(Int).
618 618
619 type HTTP_RequestType: 619 type HTTP_RequestType:
620 get, 620 get,
@@ -632,7 +632,7 @@ type EncodingType: @@ -632,7 +632,7 @@ type EncodingType:
632 type BufferedConnection: 632 type BufferedConnection:
633 buffered_connection(Connection conn, 633 buffered_connection(Connection conn,
634 Var(ByteArray) buffer, 634 Var(ByteArray) buffer,
635 - Var(Int32) read_pos). 635 + Var(Int) read_pos).
636 636
637 637
638 638
@@ -674,8 +674,8 @@ define String @@ -674,8 +674,8 @@ define String
674 674
675 We need two conversion functions for IP addresses: 675 We need two conversion functions for IP addresses:
676 676
677 - (Word8,Word8,Word8,Word8) --> Int32 ip_address  
678 - Int32 --> String ip_addr_to_string 677 + (Word8,Word8,Word8,Word8) --> Word32 ip_address
  678 + Word32 --> String ip_addr_to_string
679 679
680 These conversions are defined in 'tools/basis.anubis'. 680 These conversions are defined in 'tools/basis.anubis'.
681 681
@@ -710,15 +710,15 @@ define One @@ -710,15 +710,15 @@ define One
710 710
711 711
712 712
713 -define One record_dubious_IP(Int32 addr,DenialOfService dos). 713 +define One record_dubious_IP(Word32 addr,DenialOfService dos).
714 714
715 -variable Int32 sttm = 0. // contains the start time for this connection. 715 +variable Int sttm = 0. // contains the start time for this connection.
716 716
717 define Result(Error,Word8) 717 define Result(Error,Word8)
718 record_dubious_connection 718 record_dubious_connection
719 ( 719 (
720 Connection conn, 720 Connection conn,
721 - Int32 dead_line, 721 + Int dead_line,
722 DenialOfService dos, 722 DenialOfService dos,
723 ) = 723 ) =
724 if remote_IP_address_and_port(conn) is (addr,port) then 724 if remote_IP_address_and_port(conn) is (addr,port) then
@@ -739,8 +739,8 @@ define One @@ -739,8 +739,8 @@ define One
739 ( 739 (
740 ByteArray source, 740 ByteArray source,
741 ByteArray dest, 741 ByteArray dest,
742 - Int32 position,  
743 - Int32 i 742 + Int position,
  743 + Int i
744 ) = 744 ) =
745 if nth(i,source) is 745 if nth(i,source) is
746 { 746 {
@@ -756,16 +756,16 @@ define ReadResult @@ -756,16 +756,16 @@ define ReadResult
756 read_from_connexion 756 read_from_connexion
757 ( 757 (
758 BufferedConnection connection, 758 BufferedConnection connection,
759 - Int32 size,  
760 - Int32 time_out, 759 + Int size,
  760 + Int time_out,
761 ByteArray result_buffer, 761 ByteArray result_buffer,
762 - Int32 position 762 + Int position
763 ) = 763 ) =
764 //println(pid + "read_from_connexion(" + size + ")"); 764 //println(pid + "read_from_connexion(" + size + ")");
765 765
766 if *connection.read_pos < length(*connection.buffer) then 766 if *connection.read_pos < length(*connection.buffer) then
767 //println(pid + " reading from buffer (size = " + length(*connection.buffer) + ", pos = " + *connection.read_pos); 767 //println(pid + " reading from buffer (size = " + length(*connection.buffer) + ", pos = " + *connection.read_pos);
768 - //with t1_tmp = (UTime) now, 768 + //with t1_tmp = (UTime) unow,
769 with result = extract(*connection.buffer, *connection.read_pos, *connection.read_pos + size), 769 with result = extract(*connection.buffer, *connection.read_pos, *connection.read_pos + size),
770 size_read = length(result), 770 size_read = length(result),
771 put(result,result_buffer,position,0); 771 put(result,result_buffer,position,0);
@@ -783,7 +783,7 @@ define ReadResult @@ -783,7 +783,7 @@ define ReadResult
783 else 783 else
784 ok(result_buffer) 784 ok(result_buffer)
785 else 785 else
786 - //if now > dead_line then record_dubious_connection(connection,dead_line,dos) else 786 + //if unow > dead_line then record_dubious_connection(connection,dead_line,dos) else
787 if read(connection.conn, 16384, time_out) is // the connection is closed after 10 minutes of inactivity 787 if read(connection.conn, 16384, time_out) is // the connection is closed after 10 minutes of inactivity
788 { 788 {
789 error then println(pid + "read failed)"); error, 789 error then println(pid + "read failed)"); error,
@@ -802,7 +802,7 @@ define Result(Error,Word8) @@ -802,7 +802,7 @@ define Result(Error,Word8)
802 // only when the list is empty). 802 // only when the list is empty).
803 ( 803 (
804 BufferedConnection connection, 804 BufferedConnection connection,
805 - Int32 dead_line, 805 + Int dead_line,
806 DenialOfService dos 806 DenialOfService dos
807 ) = 807 ) =
808 //with t2_tmp = (UTime) now, 808 //with t2_tmp = (UTime) now,
@@ -811,7 +811,7 @@ define Result(Error,Word8) @@ -811,7 +811,7 @@ define Result(Error,Word8)
811 [ ] then 811 [ ] then
812 // /////////////////// 812 // ///////////////////
813 // Buffered reading 813 // Buffered reading
814 - //if now > dead_line then record_dubious_connection(connection,dead_line,dos) else 814 + //if unow > dead_line then record_dubious_connection(connection,dead_line,dos) else
815 if nth(*connection.read_pos, *connection.buffer) is 815 if nth(*connection.read_pos, *connection.buffer) is
816 { 816 {
817 failure then 817 failure then
@@ -869,8 +869,8 @@ define Result(Error,One) @@ -869,8 +869,8 @@ define Result(Error,One)
869 read_and_ignore 869 read_and_ignore
870 ( 870 (
871 BufferedConnection connection, // to client 871 BufferedConnection connection, // to client
872 - Int32 dead_line,  
873 - Int32 number_of_characters, // number of characters to read and ignore 872 + Int dead_line,
  873 + Int number_of_characters, // number of characters to read and ignore
874 DenialOfService dos 874 DenialOfService dos
875 ) = 875 ) =
876 if number_of_characters =< 0 then ok(unique) else 876 if number_of_characters =< 0 then ok(unique) else
@@ -897,7 +897,7 @@ define Result(Error,String) @@ -897,7 +897,7 @@ define Result(Error,String)
897 read_string 897 read_string
898 ( 898 (
899 BufferedConnection connection, // connection with the client 899 BufferedConnection connection, // connection with the client
900 - Int32 dead_line, 900 + Int dead_line,
901 List(Word8) so_far, // characters read so far (in reverse order) 901 List(Word8) so_far, // characters read so far (in reverse order)
902 DenialOfService dos 902 DenialOfService dos
903 ) = 903 ) =
@@ -948,12 +948,9 @@ define Word8 @@ -948,12 +948,9 @@ define Word8
948 Word8 x1, 948 Word8 x1,
949 Word8 x2 949 Word8 x2
950 ) = 950 ) =
951 - with z1 = word8_to_int32(x1),  
952 - n1 = if z1 =< '9' then (z1 - '0') else (z1 - 'A' + 10),  
953 - z2 = word8_to_int32(x2),  
954 - n2 = if z2 =< '9' then (z2 - '0') else (z2 - 'A' + 10),  
955 - n = (n1 << 4) + n2,  
956 - truncate_to_word8(n). 951 + with n1 = if x1 +=< '9' then (x1 - '0') else (x1 - 'A' + 10),
  952 + n2 = if x2 +=< '9' then (x2 - '0') else (x2 - 'A' + 10),
  953 + (n1 << 4) + n2.
957 954
958 955
959 956
@@ -961,7 +958,7 @@ define String @@ -961,7 +958,7 @@ define String
961 web_to_ascii 958 web_to_ascii
962 ( 959 (
963 String web_string, 960 String web_string,
964 - Int32 n, // current position in web_string 961 + Int n, // current position in web_string
965 List(Word8) so_far 962 List(Word8) so_far
966 ) = 963 ) =
967 if nth(n,web_string) is 964 if nth(n,web_string) is
@@ -1011,7 +1008,7 @@ define String @@ -1011,7 +1008,7 @@ define String
1011 make_current_journal_file_name 1008 make_current_journal_file_name
1012 = 1009 =
1013 if convert_time(now) is date_and_time(y,m,d,h,_,_,_,_,_) then 1010 if convert_time(now) is date_and_time(y,m,d,h,_,_,_,_,_) then
1014 - integer_to_string(y)+"_"+ 1011 + to_decimal(y)+"_"+
1015 zero_pad_n(2,m)+"_"+ 1012 zero_pad_n(2,m)+"_"+
1016 zero_pad_n(2,d)+"_"+ 1013 zero_pad_n(2,d)+"_"+
1017 zero_pad_n(2,h). 1014 zero_pad_n(2,h).
@@ -1081,7 +1078,7 @@ define String @@ -1081,7 +1078,7 @@ define String
1081 define String 1078 define String
1082 format_month 1079 format_month
1083 ( 1080 (
1084 - Int32 m 1081 + Int m
1085 ) = 1082 ) =
1086 if m = 1 then "jan" else 1083 if m = 1 then "jan" else
1087 if m = 2 then "feb" else 1084 if m = 2 then "feb" else
@@ -1119,7 +1116,7 @@ define String @@ -1119,7 +1116,7 @@ define String
1119 ) = 1116 ) =
1120 with dt = convert_time(now), 1117 with dt = convert_time(now),
1121 if remote_IP_address_and_port(client_connection) is (addr,port) then 1118 if remote_IP_address_and_port(client_connection) is (addr,port) then
1122 - integer_to_string(year(dt))+"/"+format_month(month(dt))+"/"+zero_pad_n(2,day(dt))+" "+ 1119 + to_decimal(year(dt))+"/"+format_month(month(dt))+"/"+zero_pad_n(2,day(dt))+" "+
1123 zero_pad_n(2,hour(dt))+":"+zero_pad_n(2,minute(dt))+":"+zero_pad_n(2,second(dt))+ 1120 zero_pad_n(2,hour(dt))+":"+zero_pad_n(2,minute(dt))+":"+zero_pad_n(2,second(dt))+
1124 " from "+ip_addr_to_string(addr)+ 1121 " from "+ip_addr_to_string(addr)+
1125 ": "+uri(request_line)+"\n"+ 1122 ": "+uri(request_line)+"\n"+
@@ -1143,16 +1140,16 @@ define One @@ -1143,16 +1140,16 @@ define One
1143 Web_Site_Description desc, 1140 Web_Site_Description desc,
1144 String msg, 1141 String msg,
1145 ) = 1142 ) =
1146 - with msg = to_byte_array("["+virtual_machine_id+"] "+msg+"\n"), 1143 + with ba_msg = to_byte_array("["+virtual_machine_id+"] "+msg+"\n"),
1147 protect 1144 protect
1148 ( 1145 (
1149 if file(site_directory(desc)+"/journal/"+make_current_journal_file_name,append) is 1146 if file(site_directory(desc)+"/journal/"+make_current_journal_file_name,append) is
1150 { 1147 {
1151 failure then unique, 1148 failure then unique,
1152 success(journal_file) then 1149 success(journal_file) then
1153 - forget(reliable_write(file(journal_file),msg)) 1150 + forget(reliable_write(file(journal_file),ba_msg))
1154 }; 1151 };
1155 - forget(reliable_write(file(stdout),msg)) 1152 + forget(reliable_write(file(stdout),ba_msg))
1156 ). 1153 ).
1157 1154
1158 1155
@@ -1202,7 +1199,7 @@ define Result(Error,One) @@ -1202,7 +1199,7 @@ define Result(Error,One)
1202 skip_http_blanks 1199 skip_http_blanks
1203 ( 1200 (
1204 BufferedConnection connection, 1201 BufferedConnection connection,
1205 - Int32 dead_line, 1202 + Int dead_line,
1206 DenialOfService dos 1203 DenialOfService dos
1207 ) = 1204 ) =
1208 if next_char(connection,dead_line,dos) is 1205 if next_char(connection,dead_line,dos) is
@@ -1258,7 +1255,7 @@ define Result(Error,One) @@ -1258,7 +1255,7 @@ define Result(Error,One)
1258 read_new_line 1255 read_new_line
1259 ( 1256 (
1260 BufferedConnection connection, 1257 BufferedConnection connection,
1261 - Int32 dead_line, 1258 + Int dead_line,
1262 DenialOfService dos 1259 DenialOfService dos
1263 ) = 1260 ) =
1264 if skip_http_blanks(connection,dead_line,dos) is 1261 if skip_http_blanks(connection,dead_line,dos) is
@@ -1307,7 +1304,7 @@ define Result(Error,String) @@ -1307,7 +1304,7 @@ define Result(Error,String)
1307 read_word_aux 1304 read_word_aux
1308 ( 1305 (
1309 BufferedConnection connection, 1306 BufferedConnection connection,
1310 - Int32 dead_line, 1307 + Int dead_line,
1311 List(Word8) so_far, 1308 List(Word8) so_far,
1312 DenialOfService dos 1309 DenialOfService dos
1313 ) = 1310 ) =
@@ -1325,7 +1322,7 @@ define Result(Error,String) @@ -1325,7 +1322,7 @@ define Result(Error,String)
1325 read_word 1322 read_word
1326 ( 1323 (
1327 BufferedConnection connection, 1324 BufferedConnection connection,
1328 - Int32 dead_line, 1325 + Int dead_line,
1329 DenialOfService dos 1326 DenialOfService dos
1330 ) = 1327 ) =
1331 if skip_http_blanks(connection,dead_line,dos) is 1328 if skip_http_blanks(connection,dead_line,dos) is
@@ -1366,7 +1363,7 @@ define (String,String) @@ -1366,7 +1363,7 @@ define (String,String)
1366 separate_uri_from_query_string 1363 separate_uri_from_query_string
1367 ( 1364 (
1368 String uri_and_query_string, 1365 String uri_and_query_string,
1369 - Int32 n 1366 + Int n
1370 ) = 1367 ) =
1371 if nth(n,uri_and_query_string) is 1368 if nth(n,uri_and_query_string) is
1372 { 1369 {
@@ -1435,8 +1432,8 @@ define String @@ -1435,8 +1432,8 @@ define String
1435 read_name_or_value 1432 read_name_or_value
1436 ( 1433 (
1437 String s, 1434 String s,
1438 - Int32 start,  
1439 - Int32 i 1435 + Int start,
  1436 + Int i
1440 ) = 1437 ) =
1441 if nth(i,s) is 1438 if nth(i,s) is
1442 { 1439 {
@@ -1452,7 +1449,7 @@ define List(Web_arg) @@ -1452,7 +1449,7 @@ define List(Web_arg)
1452 read_www_url_encoded_web_args 1449 read_www_url_encoded_web_args
1453 ( 1450 (
1454 String s, 1451 String s,
1455 - Int32 start, 1452 + Int start,
1456 ) = 1453 ) =
1457 with first = read_name_or_value(s,start,start), 1454 with first = read_name_or_value(s,start,start),
1458 if first = "" 1455 if first = ""
@@ -1490,16 +1487,16 @@ define Result(Error,HTTP_RequestType) @@ -1490,16 +1487,16 @@ define Result(Error,HTTP_RequestType)
1490 ( 1487 (
1491 String s 1488 String s
1492 ) = 1489 ) =
1493 - with s = to_lower(s),  
1494 - if s = "get" then ok(get) else  
1495 - if s = "post" then ok(post) else  
1496 - error(not_get_or_post_request(s)). 1490 + with ls = to_lower(s),
  1491 + if ls = "get" then ok(get) else
  1492 + if ls = "post" then ok(post) else
  1493 + error(not_get_or_post_request(ls)).
1497 1494
1498 define Result(Error,HTTP_RequestLine) 1495 define Result(Error,HTTP_RequestLine)
1499 read_request_line 1496 read_request_line
1500 ( 1497 (
1501 BufferedConnection connection, 1498 BufferedConnection connection,
1502 - Int32 dead_line, 1499 + Int dead_line,
1503 DenialOfService dos 1500 DenialOfService dos
1504 ) = 1501 ) =
1505 if read_word(connection,dead_line,dos) is 1502 if read_word(connection,dead_line,dos) is
@@ -1545,10 +1542,9 @@ define Bool @@ -1545,10 +1542,9 @@ define Bool
1545 ( 1542 (
1546 Word8 c 1543 Word8 c
1547 ) = 1544 ) =
1548 - with n = word8_to_int32(c),  
1549 - if ('a' =< n & n =< 'z') then true else  
1550 - if ('A' =< n & n =< 'Z') then true else  
1551 - if ('0' =< n & n =< '9') then true else 1545 + if ('a' +=< c & c +=< 'z') then true else
  1546 + if ('A' +=< c & c +=< 'Z') then true else
  1547 + if ('0' +=< c & c +=< '9') then true else
1552 if c = '-' then true else 1548 if c = '-' then true else
1553 c = '_'. 1549 c = '_'.
1554 1550
@@ -1556,7 +1552,7 @@ define Result(Error,String) @@ -1556,7 +1552,7 @@ define Result(Error,String)
1556 read_header_name 1552 read_header_name
1557 ( 1553 (
1558 BufferedConnection connection, 1554 BufferedConnection connection,
1559 - Int32 dead_line, 1555 + Int dead_line,
1560 List(Word8) so_far, 1556 List(Word8) so_far,
1561 DenialOfService dos 1557 DenialOfService dos
1562 ) = 1558 ) =
@@ -1573,7 +1569,7 @@ define Result(Error,One) @@ -1573,7 +1569,7 @@ define Result(Error,One)
1573 skip_colon 1569 skip_colon
1574 ( 1570 (
1575 BufferedConnection connection, 1571 BufferedConnection connection,
1576 - Int32 dead_line, 1572 + Int dead_line,
1577 DenialOfService dos 1573 DenialOfService dos
1578 ) = 1574 ) =
1579 if skip_http_blanks(connection,dead_line,dos) is 1575 if skip_http_blanks(connection,dead_line,dos) is
@@ -1594,7 +1590,7 @@ define Result(Error,String) @@ -1594,7 +1590,7 @@ define Result(Error,String)
1594 read_header_value 1590 read_header_value
1595 ( 1591 (
1596 BufferedConnection connection, 1592 BufferedConnection connection,
1597 - Int32 dead_line, 1593 + Int dead_line,
1598 List(Word8) so_far, 1594 List(Word8) so_far,
1599 DenialOfService dos 1595 DenialOfService dos
1600 ) = 1596 ) =
@@ -1628,7 +1624,7 @@ define Result(Error,Maybe(HTTP_header)) @@ -1628,7 +1624,7 @@ define Result(Error,Maybe(HTTP_header))
1628 read_header 1624 read_header
1629 ( 1625 (
1630 BufferedConnection connection, 1626 BufferedConnection connection,
1631 - Int32 dead_line, 1627 + Int dead_line,
1632 DenialOfService dos 1628 DenialOfService dos
1633 ) = 1629 ) =
1634 if read_header_name(connection,dead_line,[],dos) is 1630 if read_header_name(connection,dead_line,[],dos) is
@@ -1666,7 +1662,7 @@ define Result(Error,List(HTTP_header)) @@ -1666,7 +1662,7 @@ define Result(Error,List(HTTP_header))
1666 read_http_headers 1662 read_http_headers
1667 ( 1663 (
1668 BufferedConnection connection, 1664 BufferedConnection connection,
1669 - Int32 dead_line, 1665 + Int dead_line,
1670 DenialOfService dos 1666 DenialOfService dos
1671 ) = 1667 ) =
1672 if read_header(connection,dead_line,dos) is 1668 if read_header(connection,dead_line,dos) is
@@ -1695,7 +1691,7 @@ define Result(Error,List(HTTP_header)) @@ -1695,7 +1691,7 @@ define Result(Error,List(HTTP_header))
1695 The size of the body of the request is given under the 'Content-Length' header. If this 1691 The size of the body of the request is given under the 'Content-Length' header. If this
1696 header is not present, the size is assumed to be zero. 1692 header is not present, the size is assumed to be zero.
1697 1693
1698 -define Result(Error,Int32) 1694 +define Result(Error,Int)
1699 get_body_size 1695 get_body_size
1700 ( 1696 (
1701 List(HTTP_header) headers 1697 List(HTTP_header) headers
@@ -1705,7 +1701,7 @@ define Result(Error,Int32) @@ -1705,7 +1701,7 @@ define Result(Error,Int32)
1705 [ ] then ok(0), 1701 [ ] then ok(0),
1706 [h . t] then if h is http_header(name,value) then 1702 [h . t] then if h is http_header(name,value) then
1707 if name = "content-length" 1703 if name = "content-length"
1708 - then if string_to_integer(value) is 1704 + then if decimal_scan(value) is
1709 { 1705 {
1710 failure then error(incorrect_content_length_value), 1706 failure then error(incorrect_content_length_value),
1711 success(n) then ok(n) 1707 success(n) then ok(n)
@@ -1737,9 +1733,9 @@ define Result(Error,ByteArray) @@ -1737,9 +1733,9 @@ define Result(Error,ByteArray)
1737 read_http_body 1733 read_http_body
1738 ( 1734 (
1739 BufferedConnection connection, 1735 BufferedConnection connection,
1740 - Int32 body_size, 1736 + Int body_size,
1741 ByteArray so_far, // when calling this function, 'so_far' is the empty byte array 1737 ByteArray so_far, // when calling this function, 'so_far' is the empty byte array
1742 - Int32 retries // this function is called with retries = 10 1738 + Int retries // this function is called with retries = 10
1743 ) = 1739 ) =
1744 if body_size = 0 then ok(constant_byte_array(0,0)) else 1740 if body_size = 0 then ok(constant_byte_array(0,0)) else
1745 if retries =< 0 then error(cannot_read_from_connection) else 1741 if retries =< 0 then error(cannot_read_from_connection) else
@@ -1803,10 +1799,9 @@ define Bool @@ -1803,10 +1799,9 @@ define Bool
1803 ( 1799 (
1804 Word8 c 1800 Word8 c
1805 ) = 1801 ) =
1806 - with n = word8_to_int32(c),  
1807 - if ('a' =< n & n =< 'z') then true else // accept 'a' to 'z'  
1808 - if ('A' =< n & n =< 'Z') then true else // accept 'A' to 'Z'  
1809 - if ('0' =< n & n =< '9') then true else // accept '0' to '9' 1802 + if ('a' +=< c & c +=< 'z') then true else // accept 'a' to 'z'
  1803 + if ('A' +=< c & c +=< 'Z') then true else // accept 'A' to 'Z'
  1804 + if ('0' +=< c & c +=< '9') then true else // accept '0' to '9'
1810 if c = '.' then true else // accept '.' '-' '/' and '_' 1805 if c = '.' then true else // accept '.' '-' '/' and '_'
1811 if c = '-' then true else 1806 if c = '-' then true else
1812 if c = '/' then true else 1807 if c = '/' then true else
@@ -1820,7 +1815,7 @@ define Bool @@ -1820,7 +1815,7 @@ define Bool
1820 is_illegal_uri 1815 is_illegal_uri
1821 ( 1816 (
1822 String uri, 1817 String uri,
1823 - Int32 n 1818 + Int n
1824 ) = 1819 ) =
1825 if nth(n,uri) is 1820 if nth(n,uri) is
1826 { 1821 {
@@ -1891,7 +1886,7 @@ define String @@ -1891,7 +1886,7 @@ define String
1891 get_uri_extension_aux 1886 get_uri_extension_aux
1892 ( 1887 (
1893 String uri, 1888 String uri,
1894 - Int32 n // used for searching backwards 1889 + Int n // used for searching backwards
1895 ) = 1890 ) =
1896 if nth(n,uri) is 1891 if nth(n,uri) is
1897 { 1892 {
@@ -2017,7 +2012,7 @@ public define String @@ -2017,7 +2012,7 @@ public define String
2017 public define String 2012 public define String
2018 format_http_date 2013 format_http_date
2019 ( 2014 (
2020 - Int32 date 2015 + Int date
2021 ) = 2016 ) =
2022 format_http_date(convert_time(date)). 2017 format_http_date(convert_time(date)).
2023 2018
@@ -2030,7 +2025,7 @@ define List(HTTP_header) @@ -2030,7 +2025,7 @@ define List(HTTP_header)
2030 headers_for_send_file 2025 headers_for_send_file
2031 ( 2026 (
2032 String mime_type, 2027 String mime_type,
2033 - Int32 size, 2028 + Int size,
2034 String etag, 2029 String etag,
2035 Maybe(FileTimes) mb_ftimes, 2030 Maybe(FileTimes) mb_ftimes,
2036 ) = 2031 ) =
@@ -2038,12 +2033,12 @@ define List(HTTP_header) @@ -2038,12 +2033,12 @@ define List(HTTP_header)
2038 [ 2033 [
2039 http_header("Content-Type",mime_type), 2034 http_header("Content-Type",mime_type),
2040 http_header("Etag", etag), 2035 http_header("Etag", etag),
2041 - http_header("Content-Length",integer_to_string(size)), 2036 + http_header("Content-Length",to_decimal(size)),
2042 ], 2037 ],
2043 if mb_ftimes is 2038 if mb_ftimes is
2044 { 2039 {
2045 failure then headers, 2040 failure then headers,
2046 - success(ftimes) then [http_header("Last-Modified", format_http_date(ftimes.last_modified)) . headers] 2041 + success(ftimes) then [http_header("Last-Modified", format_http_date(to_Int(ftimes.last_modified))) . headers]
2047 } 2042 }
2048 . 2043 .
2049 2044
@@ -2057,8 +2052,8 @@ define One @@ -2057,8 +2052,8 @@ define One
2057 Web_Site_Description desc, 2052 Web_Site_Description desc,
2058 Connection connection, // connection with the client 2053 Connection connection, // connection with the client
2059 Connection file, // file to be sent already opened 2054 Connection file, // file to be sent already opened
2060 - Int32 size, // size of file  
2061 - Int32 sent, // bytes already sent 2055 + Int size, // size of file
  2056 + Int sent, // bytes already sent
2062 String filename // name of file 2057 String filename // name of file
2063 ) = 2058 ) =
2064 if sent >= size then unique else 2059 if sent >= size then unique else
@@ -2082,7 +2077,7 @@ define String @@ -2082,7 +2077,7 @@ define String
2082 ( 2077 (
2083 String filename, 2078 String filename,
2084 Maybe(FileTimes) mb_ftimes, 2079 Maybe(FileTimes) mb_ftimes,
2085 - Int32 size, 2080 + Int size,
2086 ) = 2081 ) =
2087 if mb_ftimes is 2082 if mb_ftimes is
2088 { 2083 {
@@ -2111,7 +2106,7 @@ define One @@ -2111,7 +2106,7 @@ define One
2111 Connection connection, 2106 Connection connection,
2112 List(HTTP_header) input_headers, 2107 List(HTTP_header) input_headers,
2113 List(HTTP_header) headers, 2108 List(HTTP_header) headers,
2114 - Int32 size, 2109 + Int size,
2115 Connection file, 2110 Connection file,
2116 String filename, 2111 String filename,
2117 String full_path, 2112 String full_path,
@@ -2248,13 +2243,13 @@ define List(HTTP_header) @@ -2248,13 +2243,13 @@ define List(HTTP_header)
2248 define List(HTTP_header) 2243 define List(HTTP_header)
2249 standard_headers_for_html 2244 standard_headers_for_html
2250 ( 2245 (
2251 - Int32 answer_body_size, 2246 + Int answer_body_size,
2252 String charset 2247 String charset
2253 ) = 2248 ) =
2254 [ 2249 [
2255 //http_header("Content-Type","text/html"), 2250 //http_header("Content-Type","text/html"),
2256 http_header("Content-Type","text/html; charset="+charset), 2251 http_header("Content-Type","text/html; charset="+charset),
2257 - http_header("Content-length",integer_to_string(answer_body_size)) 2252 + http_header("Content-length",to_decimal(answer_body_size))
2258 ]. 2253 ].
2259 2254
2260 2255
@@ -2264,7 +2259,7 @@ define One @@ -2264,7 +2259,7 @@ define One
2264 String host_name, 2259 String host_name,
2265 Web_Site_Description desc, 2260 Web_Site_Description desc,
2266 Connection connection, // with the client 2261 Connection connection, // with the client
2267 - Int32 ip_addr, // of the client 2262 + Word32 ip_addr, // of the client
2268 HTTP_RequestLine request_line, 2263 HTTP_RequestLine request_line,
2269 List(HTTP_header) headers, 2264 List(HTTP_header) headers,
2270 ByteArray body, 2265 ByteArray body,
@@ -2350,7 +2345,7 @@ define Maybe(String) @@ -2350,7 +2345,7 @@ define Maybe(String)
2350 get_boundary_value_3 2345 get_boundary_value_3
2351 ( 2346 (
2352 String s, 2347 String s,
2353 - Int32 i, 2348 + Int i,
2354 List(Word8) so_far 2349 List(Word8) so_far
2355 ) = 2350 ) =
2356 if nth(i,s) is 2351 if nth(i,s) is
@@ -2368,7 +2363,7 @@ define Maybe(String) @@ -2368,7 +2363,7 @@ define Maybe(String)
2368 get_boundary_value_2 2363 get_boundary_value_2
2369 ( 2364 (
2370 String s, 2365 String s,
2371 - Int32 i, 2366 + Int i,
2372 ) = 2367 ) =
2373 if nth(i,s) is 2368 if nth(i,s) is
2374 { 2369 {
@@ -2383,7 +2378,7 @@ define Maybe(String) @@ -2383,7 +2378,7 @@ define Maybe(String)
2383 get_boundary_value_1 2378 get_boundary_value_1
2384 ( 2379 (
2385 String s, // string into which we must find '= ...' 2380 String s, // string into which we must find '= ...'
2386 - Int32 i // position of start of search 2381 + Int i // position of start of search
2387 ) = 2382 ) =
2388 if nth(i,s) is 2383 if nth(i,s) is
2389 { 2384 {
@@ -2468,13 +2463,13 @@ define Maybe(String) @@ -2468,13 +2463,13 @@ define Maybe(String)
2468 Below is a variant of 'find' (see 'tools/findstring.anubis'), with an extra 'end' 2463 Below is a variant of 'find' (see 'tools/findstring.anubis'), with an extra 'end'
2469 argument. 2464 argument.
2470 2465
2471 -define Maybe(Int32) 2466 +define Maybe(Int)
2472 find 2467 find
2473 ( 2468 (
2474 String what, 2469 String what,
2475 ByteArray where, 2470 ByteArray where,
2476 - Int32 start,  
2477 - Int32 end 2471 + Int start,
  2472 + Int end
2478 ) = 2473 ) =
2479 if find(to_byte_array(what),where,start) is 2474 if find(to_byte_array(what),where,start) is
2480 { 2475 {
@@ -2490,8 +2485,8 @@ define String @@ -2490,8 +2485,8 @@ define String
2490 read_attribute_value 2485 read_attribute_value
2491 ( 2486 (
2492 ByteArray where, 2487 ByteArray where,
2493 - Int32 start,  
2494 - Int32 end, 2488 + Int start,
  2489 + Int end,
2495 List(Word8) so_far 2490 List(Word8) so_far
2496 ) = 2491 ) =
2497 if start >= end then implode(reverse(so_far)) else 2492 if start >= end then implode(reverse(so_far)) else
@@ -2509,17 +2504,17 @@ define Maybe(String) @@ -2509,17 +2504,17 @@ define Maybe(String)
2509 ( 2504 (
2510 String name, 2505 String name,
2511 ByteArray where, 2506 ByteArray where,
2512 - Int32 start,  
2513 - Int32 end 2507 + Int start,
  2508 + Int end
2514 ) = 2509 ) =
2515 - with name = name+"=\"",  
2516 - if find(to_byte_array(name),where,start) is 2510 + with prefix = name+"=\"",
  2511 + if find(to_byte_array(prefix),where,start) is
2517 { 2512 {
2518 failure then failure, 2513 failure then failure,
2519 success(n) then 2514 success(n) then
2520 - if n+length(name) >= end 2515 + if n+length(prefix) >= end
2521 then failure 2516 then failure
2522 - else success(read_attribute_value(where,n+length(name),end,[])) 2517 + else success(read_attribute_value(where,n+length(prefix),end,[]))
2523 }. 2518 }.
2524 2519
2525 2520
@@ -2528,8 +2523,8 @@ define Maybe((String,Maybe(String))) @@ -2528,8 +2523,8 @@ define Maybe((String,Maybe(String)))
2528 find_name_and_filename 2523 find_name_and_filename
2529 ( 2524 (
2530 ByteArray body, 2525 ByteArray body,
2531 - Int32 start,  
2532 - Int32 end 2526 + Int start,
  2527 + Int end
2533 ) = 2528 ) =
2534 if find(to_byte_array("Content-Disposition"),body,start) is 2529 if find(to_byte_array("Content-Disposition"),body,start) is
2535 { 2530 {
@@ -2557,7 +2552,7 @@ define Maybe((String,Maybe(String))) @@ -2557,7 +2552,7 @@ define Maybe((String,Maybe(String)))
2557 2552
2558 *** [5.7.3] Creating a temporary filename for an uploaded file. 2553 *** [5.7.3] Creating a temporary filename for an uploaded file.
2559 2554
2560 -variable Int32 uploaded_file_count = 0. 2555 +variable Int uploaded_file_count = 0.
2561 2556
2562 This variable is local to the virtual machine. Hence, its value is 0 each time a new 2557 This variable is local to the virtual machine. Hence, its value is 0 each time a new
2563 requests arrives. Temporary uploaded files are stored in the directory represented by 2558 requests arrives. Temporary uploaded files are stored in the directory represented by
@@ -2582,11 +2577,11 @@ define Maybe(String) // returns the temporary file name @@ -2582,11 +2577,11 @@ define Maybe(String) // returns the temporary file name
2582 ( 2577 (
2583 Web_Site_Description desc, 2578 Web_Site_Description desc,
2584 ByteArray body, 2579 ByteArray body,
2585 - Int32 start,  
2586 - Int32 end 2580 + Int start,
  2581 + Int end
2587 ) = 2582 ) =
2588 uploaded_file_count <- 1 + *uploaded_file_count; 2583 uploaded_file_count <- 1 + *uploaded_file_count;
2589 - with tfn = "_"+integer_to_string(virtual_machine_id)+"_"+integer_to_string(*uploaded_file_count), 2584 + with tfn = "_"+to_decimal(virtual_machine_id)+"_"+to_decimal(*uploaded_file_count),
2590 if (Maybe(WStream))connect to file site_directory(desc)+"/upload_temporary/"+tfn is 2585 if (Maybe(WStream))connect to file site_directory(desc)+"/upload_temporary/"+tfn is
2591 { 2586 {
2592 failure then failure, 2587 failure then failure,
@@ -2614,11 +2609,11 @@ define Maybe(String) // returns the temporary file name @@ -2614,11 +2609,11 @@ define Maybe(String) // returns the temporary file name
2614 machine as the file name. Actually, this is not quite normal. Nevertheless, we need to 2609 machine as the file name. Actually, this is not quite normal. Nevertheless, we need to
2615 remove the path, and keep only the file name. This is achieved by 'remove_path' below. 2610 remove the path, and keep only the file name. This is achieved by 'remove_path' below.
2616 2611
2617 -define Int32 2612 +define Int
2618 file_name_begin 2613 file_name_begin
2619 ( 2614 (
2620 String full_name, 2615 String full_name,
2621 - Int32 i 2616 + Int i
2622 ) = 2617 ) =
2623 if nth(i,full_name) is 2618 if nth(i,full_name) is
2624 { 2619 {
@@ -2649,8 +2644,8 @@ define Maybe(Web_arg) @@ -2649,8 +2644,8 @@ define Maybe(Web_arg)
2649 ( 2644 (
2650 Web_Site_Description desc, 2645 Web_Site_Description desc,
2651 ByteArray body, 2646 ByteArray body,
2652 - Int32 start,  
2653 - Int32 end 2647 + Int start,
  2648 + Int end
2654 ) = 2649 ) =
2655 if find(to_byte_array(crlf+crlf),body,start) is 2650 if find(to_byte_array(crlf+crlf),body,start) is
2656 { 2651 {
@@ -2689,7 +2684,7 @@ define List(Web_arg) @@ -2689,7 +2684,7 @@ define List(Web_arg)
2689 Web_Site_Description desc, 2684 Web_Site_Description desc,
2690 ByteArray body, 2685 ByteArray body,
2691 ByteArray __boundary, 2686 ByteArray __boundary,
2692 - Int32 i, 2687 + Int i,
2693 ) = 2688 ) =
2694 if find(__boundary,body,i) is 2689 if find(__boundary,body,i) is
2695 { 2690 {
@@ -2716,7 +2711,7 @@ define One @@ -2716,7 +2711,7 @@ define One
2716 String host_name, 2711 String host_name,
2717 Web_Site_Description desc, 2712 Web_Site_Description desc,
2718 Connection connection, 2713 Connection connection,
2719 - Int32 ip_addr, 2714 + Word32 ip_addr,
2720 HTTP_RequestLine request_line, 2715 HTTP_RequestLine request_line,
2721 List(HTTP_header) headers, 2716 List(HTTP_header) headers,
2722 ByteArray body, 2717 ByteArray body,
@@ -2805,7 +2800,7 @@ define String @@ -2805,7 +2800,7 @@ define String
2805 strip_port 2800 strip_port
2806 ( 2801 (
2807 String name, 2802 String name,
2808 - Int32 i 2803 + Int i
2809 ) = 2804 ) =
2810 if nth(i,name) is 2805 if nth(i,name) is
2811 { 2806 {
@@ -2882,14 +2877,14 @@ define One @@ -2882,14 +2877,14 @@ define One
2882 One -> String generate_tt 2877 One -> String generate_tt
2883 ) = 2878 ) =
2884 if rqline is request_line(type,uri,qstring) then 2879 if rqline is request_line(type,uri,qstring) then
2885 - with rqline = request_line(type,handle_redirection(redirections(desc),uri,headers),qstring), 2880 + with rqline2 = request_line(type,handle_redirection(redirections(desc),uri,headers),qstring),
2886 if remote_IP_address_and_port(connection) is (ip_addr,_) then 2881 if remote_IP_address_and_port(connection) is (ip_addr,_) then
2887 if get_encoding_type(headers) is 2882 if get_encoding_type(headers) is
2888 { 2883 {
2889 www_url then 2884 www_url then
2890 - www_url_answer(host_name,desc,connection,ip_addr,rqline,headers,body,generate_tt), 2885 + www_url_answer(host_name,desc,connection,ip_addr,rqline2,headers,body,generate_tt),
2891 multipart_form_data then 2886 multipart_form_data then
2892 - multipart_form_data_answer(host_name,desc,connection,ip_addr,rqline,headers,body,generate_tt) 2887 + multipart_form_data_answer(host_name,desc,connection,ip_addr,rqline2,headers,body,generate_tt)
2893 }. 2888 }.
2894 2889
2895 2890
@@ -2991,8 +2986,8 @@ define One @@ -2991,8 +2986,8 @@ define One
2991 Bool is_https, 2986 Bool is_https,
2992 DenialOfService dos 2987 DenialOfService dos
2993 ) = 2988 ) =
2994 - //t0 <- (UTime)now;  
2995 - with start_time = (Int32)now, 2989 + //t0 <- (UTime)unow;
  2990 + with start_time = (Int)now,
2996 sttm <- start_time; 2991 sttm <- start_time;
2997 //println("Request time: " + format_http_date(start_time)); 2992 //println("Request time: " + format_http_date(start_time));
2998 if dos is denial_of_service(mc_v,rld_v,hd_v,ad_v,ld_v,ra_v) then 2993 if dos is denial_of_service(mc_v,rld_v,hd_v,ad_v,ld_v,ra_v) then
@@ -3023,7 +3018,7 @@ define One @@ -3023,7 +3018,7 @@ define One
3023 //print_delta("before send_answer"); 3018 //print_delta("before send_answer");
3024 send_answer(host_name, desc,connection.conn, request_line, headers, body, 3019 send_answer(host_name, desc,connection.conn, request_line, headers, body,
3025 make_generate_trust_ticket(dos)) 3020 make_generate_trust_ticket(dos))
3026 - //with duration = (UTime) now - *t0, 3021 + //with duration = (UTime) unow - *t0,
3027 //println("Request duration: " + utime_to_string(duration)) 3022 //println("Request duration: " + utime_to_string(duration))
3028 //println("BufferRead duration: " + utime_to_string(*t1)); 3023 //println("BufferRead duration: " + utime_to_string(*t1));
3029 //println("next_char duration: " + utime_to_string(*t2)) 3024 //println("next_char duration: " + utime_to_string(*t2))
@@ -3037,7 +3032,7 @@ define One @@ -3037,7 +3032,7 @@ define One
3037 Below are the two tools for constructing the handlers required by 'start_server' and 3032 Below are the two tools for constructing the handlers required by 'start_server' and
3038 'start_ssl_server' (see 'predefined.anubis'). 3033 'start_ssl_server' (see 'predefined.anubis').
3039 3034
3040 -define Bool is_dubious_IP(Int32 ip, DenialOfService dos). 3035 +define Bool is_dubious_IP(Word32 ip, DenialOfService dos).
3041 3036
3042 define Server -> ((RWStream) -> One) 3037 define Server -> ((RWStream) -> One)
3043 make_http_handler 3038 make_http_handler
@@ -3082,8 +3077,8 @@ define One @@ -3082,8 +3077,8 @@ define One
3082 forget(map((FileDescription fd) |-> if fd is 3077 forget(map((FileDescription fd) |-> if fd is
3083 { 3078 {
3084 no_info(name) then forget(remove(dir+name)), 3079 no_info(name) then forget(remove(dir+name)),
3085 - file(name,_,_,d) then if d+600 < now then forget(remove(dir+name)) else unique,  
3086 - link(name,_,_,d) then if d+600 < now then forget(remove(dir+name)) else unique, 3080 + file(name,_,_,d) then if to_Int(d)+600 < now then forget(remove(dir+name)) else unique,
  3081 + link(name,_,_,d) then if to_Int(d)+600 < now then forget(remove(dir+name)) else unique,
3087 directory(name,_,_) then cleanup_directory_10mn(dir+name+"/"), 3082 directory(name,_,_) then cleanup_directory_10mn(dir+name+"/"),
3088 }, 3083 },
3089 directory_full_list(dir,"*","*","*"))). 3084 directory_full_list(dir,"*","*","*"))).
@@ -3094,8 +3089,8 @@ define One @@ -3094,8 +3089,8 @@ define One
3094 ( 3089 (
3095 List(Web_Site_Description) sites, 3090 List(Web_Site_Description) sites,
3096 List(Server) servers, 3091 List(Server) servers,
3097 - Int32 period,  
3098 - Int32 next_time, 3092 + Int period,
  3093 + Int next_time,
3099 ) = 3094 ) =
3100 if mapand(is_down,servers) 3095 if mapand(is_down,servers)
3101 then unique 3096 then unique
@@ -3121,7 +3116,7 @@ public define One @@ -3121,7 +3116,7 @@ public define One
3121 ( 3116 (
3122 List(Web_Site_Description) sites, 3117 List(Web_Site_Description) sites,
3123 List(Server) servers, 3118 List(Server) servers,
3124 - Int32 period 3119 + Int period
3125 ) = 3120 ) =
3126 delegate http_servers_tasks(sites,servers,period,now), 3121 delegate http_servers_tasks(sites,servers,period,now),
3127 unique. 3122 unique.
@@ -3137,7 +3132,7 @@ public define One @@ -3137,7 +3132,7 @@ public define One
3137 define Bool // returns false if the counter cannot be incremented (too many connections) 3132 define Bool // returns false if the counter cannot be incremented (too many connections)
3138 increment_connections_counter 3133 increment_connections_counter
3139 ( 3134 (
3140 - Var(Int32) counter 3135 + Var(Int) counter
3141 ) = 3136 ) =
3142 protect with n = *counter, 3137 protect with n = *counter,
3143 if n >= 100 3138 if n >= 100
@@ -3147,7 +3142,7 @@ define Bool // returns false if the counter cannot be incremented (too many conn @@ -3147,7 +3142,7 @@ define Bool // returns false if the counter cannot be incremented (too many conn
3147 define One 3142 define One
3148 decrement_connections_counter 3143 decrement_connections_counter
3149 ( 3144 (
3150 - Var(Int32) counter 3145 + Var(Int) counter
3151 ) = 3146 ) =
3152 protect counter <- (*counter)-1. 3147 protect counter <- (*counter)-1.
3153 3148
@@ -3161,7 +3156,7 @@ define One @@ -3161,7 +3156,7 @@ define One
3161 define List(DubiousIP) 3156 define List(DubiousIP)
3162 record_dubious_IP 3157 record_dubious_IP
3163 ( 3158 (
3164 - Int32 ip, 3159 + Word32 ip,
3165 List(DubiousIP) l 3160 List(DubiousIP) l
3166 ) = 3161 ) =
3167 if l is 3162 if l is
@@ -3177,7 +3172,7 @@ define List(DubiousIP) @@ -3177,7 +3172,7 @@ define List(DubiousIP)
3177 define One 3172 define One
3178 record_dubious_IP 3173 record_dubious_IP
3179 ( 3174 (
3180 - Int32 dubious_IP, 3175 + Word32 dubious_IP,
3181 Var(List(DubiousIP)) v 3176 Var(List(DubiousIP)) v
3182 ) = 3177 ) =
3183 protect v <- record_dubious_IP(dubious_IP,*v). 3178 protect v <- record_dubious_IP(dubious_IP,*v).
@@ -3186,7 +3181,7 @@ define One @@ -3186,7 +3181,7 @@ define One
3186 define One 3181 define One
3187 record_dubious_IP 3182 record_dubious_IP
3188 ( 3183 (
3189 - Int32 addr, 3184 + Word32 addr,
3190 DenialOfService dos 3185 DenialOfService dos
3191 ) = 3186 ) =
3192 record_dubious_IP(addr,list_of_dubious(dos)). 3187 record_dubious_IP(addr,list_of_dubious(dos)).
@@ -3212,7 +3207,7 @@ public define DenialOfService @@ -3212,7 +3207,7 @@ public define DenialOfService
3212 define Bool 3207 define Bool
3213 is_dubious_IP 3208 is_dubious_IP
3214 ( 3209 (
3215 - Int32 ip, 3210 + Word32 ip,
3216 List(DubiousIP) l 3211 List(DubiousIP) l
3217 ) = 3212 ) =
3218 if l is 3213 if l is
@@ -3228,7 +3223,7 @@ define Bool @@ -3228,7 +3223,7 @@ define Bool
3228 define Bool 3223 define Bool
3229 is_dubious_IP 3224 is_dubious_IP
3230 ( 3225 (
3231 - Int32 ip, 3226 + Word32 ip,
3232 DenialOfService dos 3227 DenialOfService dos
3233 ) = 3228 ) =
3234 if dos is 3229 if dos is
@@ -3247,7 +3242,7 @@ define List(DubiousIP) @@ -3247,7 +3242,7 @@ define List(DubiousIP)
3247 remove_inactive_dubious_IP 3242 remove_inactive_dubious_IP
3248 ( 3243 (
3249 List(DubiousIP) l, 3244 List(DubiousIP) l,
3250 - Int32 ref_time, 3245 + Int ref_time,
3251 ) = 3246 ) =
3252 if l is 3247 if l is
3253 { 3248 {
@@ -3265,7 +3260,7 @@ define One @@ -3265,7 +3260,7 @@ define One
3265 Var(List(DubiousIP)) v 3260 Var(List(DubiousIP)) v
3266 ) = 3261 ) =
3267 protect 3262 protect
3268 - with ref_time = now - 600, // 10 minutes 3263 + with ref_time = (Int)now - 600, // 10 minutes
3269 v <- remove_inactive_dubious_IP(*v,ref_time). 3264 v <- remove_inactive_dubious_IP(*v,ref_time).
3270 3265
3271 3266
@@ -3320,10 +3315,10 @@ define One @@ -3320,10 +3315,10 @@ define One
3320 define StartServerResult 3315 define StartServerResult
3321 start_http_server 3316 start_http_server
3322 ( 3317 (
3323 - Int32 ip_address,  
3324 - Int32 port,  
3325 - Server -> ((RWStream) -> One) handler,  
3326 - Int32 retries, 3318 + Word32 ip_address,
  3319 + Word32 port,
  3320 + Server -> ((RWStream) -> One) handler,
  3321 + Int retries,
3327 DenialOfService dos 3322 DenialOfService dos
3328 ) = 3323 ) =
3329 if start_server(ip_address, 3324 if start_server(ip_address,
@@ -3339,8 +3334,8 @@ define StartServerResult @@ -3339,8 +3334,8 @@ define StartServerResult
3339 public define StartServerResult 3334 public define StartServerResult
3340 start_http_server 3335 start_http_server
3341 ( 3336 (
3342 - Int32 ip_address,  
3343 - Int32 port, 3337 + Word32 ip_address,
  3338 + Word32 port,
3344 List(Web_Site_Description) sites, 3339 List(Web_Site_Description) sites,
3345 DenialOfService dos 3340 DenialOfService dos
3346 ) = 3341 ) =
@@ -3361,11 +3356,11 @@ public define StartServerResult @@ -3361,11 +3356,11 @@ public define StartServerResult
3361 define StartServerResult 3356 define StartServerResult
3362 start_https_server 3357 start_https_server
3363 ( 3358 (
3364 - Int32 ip_address,  
3365 - Int32 port, 3359 + Word32 ip_address,
  3360 + Word32 port,
3366 String certificate_common_name, 3361 String certificate_common_name,
3367 Server -> (SSL_Connection -> One) handler, 3362 Server -> (SSL_Connection -> One) handler,
3368 - Int32 retries, 3363 + Int retries,
3369 DenialOfService dos 3364 DenialOfService dos
3370 ) = 3365 ) =
3371 if start_ssl_server(ip_address, 3366 if start_ssl_server(ip_address,
@@ -3386,8 +3381,8 @@ define StartServerResult @@ -3386,8 +3381,8 @@ define StartServerResult
3386 public define StartServerResult 3381 public define StartServerResult
3387 start_https_server 3382 start_https_server
3388 ( 3383 (
3389 - Int32 ip_address,  
3390 - Int32 port, 3384 + Word32 ip_address,
  3385 + Word32 port,
3391 String certificate_common_name, // of SSL server certificate 3386 String certificate_common_name, // of SSL server certificate
3392 List(Web_Site_Description) sites, 3387 List(Web_Site_Description) sites,
3393 DenialOfService dos 3388 DenialOfService dos
@@ -3415,7 +3410,7 @@ define One @@ -3415,7 +3410,7 @@ define One
3415 ( 3410 (
3416 RWStream conn, 3411 RWStream conn,
3417 String common_name, 3412 String common_name,
3418 - Int32 port 3413 + Word32 port
3419 ) = 3414 ) =
3420 print("Dispatching '"+common_name+"' to port "+port+"\n"); 3415 print("Dispatching '"+common_name+"' to port "+port+"\n");
3421 forget(reliable_write(conn,to_byte_array( 3416 forget(reliable_write(conn,to_byte_array(
@@ -3450,7 +3445,7 @@ define Server -&gt; ((RWStream) -&gt; One) @@ -3450,7 +3445,7 @@ define Server -&gt; ((RWStream) -&gt; One)
3450 DenialOfService dos 3445 DenialOfService dos
3451 ) = 3446 ) =
3452 (Server server) |-> (RWStream conn) |-> 3447 (Server server) |-> (RWStream conn) |->
3453 - with start_time = (Int32)now, 3448 + with start_time = (Int)now,
3454 connection = buffered_connection(tcp(conn), var(constant_byte_array(0, 0)), var(0)), 3449 connection = buffered_connection(tcp(conn), var(constant_byte_array(0, 0)), var(0)),
3455 if read_request_line(connection, start_time+*request_line_delay(dos), dos) is 3450 if read_request_line(connection, start_time+*request_line_delay(dos), dos) is
3456 { 3451 {
@@ -3487,7 +3482,7 @@ define Bool @@ -3487,7 +3482,7 @@ define Bool
3487 ( 3482 (
3488 String info_file_path, 3483 String info_file_path,
3489 Var(List(DispatcherInfo)) info_v, 3484 Var(List(DispatcherInfo)) info_v,
3490 - Var(Int32) info_date_v 3485 + Var(Int) info_date_v
3491 ) = 3486 ) =
3492 if directory_full_list(my_anubis_directory+"/web_sites","dispatcher.info","","") is 3487 if directory_full_list(my_anubis_directory+"/web_sites","dispatcher.info","","") is
3493 { 3488 {
@@ -3496,7 +3491,7 @@ define Bool @@ -3496,7 +3491,7 @@ define Bool
3496 { 3491 {
3497 no_info(n) then false, 3492 no_info(n) then false,
3498 file(n,_,_,d) then if n = "dispatcher.info" 3493 file(n,_,_,d) then if n = "dispatcher.info"
3499 - then (info_date_v <- d; 3494 + then (info_date_v <- to_Int(d);
3500 if (RetrieveResult(List(DispatcherInfo)))retrieve(info_file_path) is 3495 if (RetrieveResult(List(DispatcherInfo)))retrieve(info_file_path) is
3501 { 3496 {
3502 cannot_find_file then false, 3497 cannot_find_file then false,
@@ -3519,7 +3514,7 @@ define One @@ -3519,7 +3514,7 @@ define One
3519 ( 3514 (
3520 String info_file_path, 3515 String info_file_path,
3521 Var(List(DispatcherInfo)) info_v, 3516 Var(List(DispatcherInfo)) info_v,
3522 - Var(Int32) info_date_v 3517 + Var(Int) info_date_v
3523 ) = 3518 ) =
3524 sleep(3000); 3519 sleep(3000);
3525 (if dispatcher_update_data(info_file_path,info_v,info_date_v) 3520 (if dispatcher_update_data(info_file_path,info_v,info_date_v)
@@ -3531,13 +3526,13 @@ define One @@ -3531,13 +3526,13 @@ define One
3531 public define One 3526 public define One
3532 start_web_dispatcher 3527 start_web_dispatcher
3533 ( 3528 (
3534 - Int32 ip_address, // address for listening (typically 0: listen on all interfaces)  
3535 - Int32 http_port, // typically 80 3529 + Word32 ip_address, // address for listening (typically 0: listen on all interfaces)
  3530 + Word32 http_port, // typically 80
3536 DenialOfService dos 3531 DenialOfService dos
3537 ) = 3532 ) =
3538 with info_file_path = my_anubis_directory+"/web_sites/dispatcher.info", 3533 with info_file_path = my_anubis_directory+"/web_sites/dispatcher.info",
3539 info_v = var((List(DispatcherInfo))[]), 3534 info_v = var((List(DispatcherInfo))[]),
3540 - info_date_v = var((Int32)0), 3535 + info_date_v = var((Int)0),
3541 if dispatcher_update_data(info_file_path,info_v,info_date_v) 3536 if dispatcher_update_data(info_file_path,info_v,info_date_v)
3542 then if start_server(ip_address, 3537 then if start_server(ip_address,
3543 http_port, 3538 http_port,
@@ -3573,7 +3568,7 @@ public define One @@ -3573,7 +3568,7 @@ public define One
3573 3568
3574 *** [7.3] Managing the info file. 3569 *** [7.3] Managing the info file.
3575 3570
3576 -define Int32 3571 +define Word32
3577 register_ip_address 3572 register_ip_address
3578 = 3573 =
3579 if ip_address(prompt(" numerical IP address (for HTTP): ")) is 3574 if ip_address(prompt(" numerical IP address (for HTTP): ")) is
@@ -3584,15 +3579,15 @@ define Int32 @@ -3584,15 +3579,15 @@ define Int32
3584 }. 3579 }.
3585 3580
3586 3581
3587 -define Int32 3582 +define Word32
3588 register_ip_port 3583 register_ip_port
3589 = 3584 =
3590 - if string_to_integer(prompt(" IP port (for HTTP): ")) is 3585 + if decimal_scan(prompt(" IP port (for HTTP): ")) is
3591 { 3586 {
3592 failure then print(" *** Error: incorrect IP port.\n"); 3587 failure then print(" *** Error: incorrect IP port.\n");
3593 register_ip_port, 3588 register_ip_port,
3594 success(p) then if (0 =< p & p =< 65535) 3589 success(p) then if (0 =< p & p =< 65535)
3595 - then p 3590 + then truncate_to_Word32(p)
3596 else print(" *** Error: IP port out of bounds.\n"); 3591 else print(" *** Error: IP port out of bounds.\n");
3597 register_ip_port 3592 register_ip_port
3598 }. 3593 }.
@@ -3634,7 +3629,7 @@ define String @@ -3634,7 +3629,7 @@ define String
3634 pad 3629 pad
3635 ( 3630 (
3636 String s, 3631 String s,
3637 - Int32 l 3632 + Int l
3638 ) = 3633 ) =
3639 if length(s) >= l 3634 if length(s) >= l
3640 then s 3635 then s
@@ -3646,7 +3641,7 @@ define One @@ -3646,7 +3641,7 @@ define One
3646 show_sites_1 3641 show_sites_1
3647 ( 3642 (
3648 List(DispatcherInfo) l, 3643 List(DispatcherInfo) l,
3649 - Int32 i 3644 + Int i
3650 ) = 3645 ) =
3651 if l is 3646 if l is
3652 { 3647 {
@@ -3661,7 +3656,7 @@ define One @@ -3661,7 +3656,7 @@ define One
3661 show_sites 3656 show_sites
3662 ( 3657 (
3663 List(DispatcherInfo) l, 3658 List(DispatcherInfo) l,
3664 - Int32 i 3659 + Int i
3665 ) = 3660 ) =
3666 print(" Name Port\n"); 3661 print(" Name Port\n");
3667 print(" --------------------------------------------------------\n"); 3662 print(" --------------------------------------------------------\n");
@@ -3672,7 +3667,7 @@ define List(DispatcherInfo) @@ -3672,7 +3667,7 @@ define List(DispatcherInfo)
3672 ( 3667 (
3673 List(DispatcherInfo) l, 3668 List(DispatcherInfo) l,
3674 String site_name, 3669 String site_name,
3675 - Int32 new_port 3670 + Word32 new_port
3676 ) = 3671 ) =
3677 if l is 3672 if l is
3678 { 3673 {
@@ -3704,7 +3699,7 @@ define One @@ -3704,7 +3699,7 @@ define One
3704 ( 3699 (
3705 Var(List(DispatcherInfo)) info_v, 3700 Var(List(DispatcherInfo)) info_v,
3706 String site_name, 3701 String site_name,
3707 - Int32 old_port 3702 + Word32 old_port
3708 ) = 3703 ) =
3709 print("\n"); 3704 print("\n");
3710 print(" Updating site '"+site_name+"': (currently: "+old_port+")\n"); 3705 print(" Updating site '"+site_name+"': (currently: "+old_port+")\n");
@@ -3742,7 +3737,7 @@ define One @@ -3742,7 +3737,7 @@ define One
3742 [h . t] then 3737 [h . t] then
3743 show_sites(qsort([h . t],compare),1); 3738 show_sites(qsort([h . t],compare),1);
3744 with i1 = prompt(" Choose a site to update [1/.../"+(length(t)+1)+"]: "), 3739 with i1 = prompt(" Choose a site to update [1/.../"+(length(t)+1)+"]: "),
3745 - if string_to_integer(i1) is 3740 + if decimal_scan(i1) is
3746 { 3741 {
3747 failure then print(" *** Error: site number not recognized.\n"); 3742 failure then print(" *** Error: site number not recognized.\n");
3748 update_site(info_v), 3743 update_site(info_v),
@@ -3762,7 +3757,7 @@ define One @@ -3762,7 +3757,7 @@ define One
3762 ( 3757 (
3763 Var(List(DispatcherInfo)) info_v, 3758 Var(List(DispatcherInfo)) info_v,
3764 String site_name, 3759 String site_name,
3765 - Int32 old_port 3760 + Word32 old_port
3766 ) = 3761 ) =
3767 print("\n"); 3762 print("\n");
3768 print(" Deleting site '"+site_name+"': (currently: "+old_port+")\n"); 3763 print(" Deleting site '"+site_name+"': (currently: "+old_port+")\n");
@@ -3786,7 +3781,7 @@ define One @@ -3786,7 +3781,7 @@ define One
3786 [h . t] then 3781 [h . t] then
3787 show_sites(qsort([h . t],compare),1); 3782 show_sites(qsort([h . t],compare),1);
3788 with i1 = prompt(" Choose a site to delete [1/.../"+(length(t)+1)+"]: "), 3783 with i1 = prompt(" Choose a site to delete [1/.../"+(length(t)+1)+"]: "),
3789 - if string_to_integer(i1) is 3784 + if decimal_scan(i1) is
3790 { 3785 {
3791 failure then print(" *** Error: site number not recognized.\n"); 3786 failure then print(" *** Error: site number not recognized.\n");
3792 delete_site(info_v), 3787 delete_site(info_v),
calexium_lib/web/CXM_web_arg_encode.anubis
@@ -45,6 +45,7 @@ public define Maybe($T) @@ -45,6 +45,7 @@ public define Maybe($T)
45 --- That's all for the public part. --------------------------------------------------- 45 --- That's all for the public part. ---------------------------------------------------
46 46
47 read tools/basis.anubis 47 read tools/basis.anubis
  48 +read system/convert.anubis
48 49
49 Our algorithms are copy-pasted from 'base64.anubis' and slightly modified. The point is 50 Our algorithms are copy-pasted from 'base64.anubis' and slightly modified. The point is
50 twofold: 51 twofold:
@@ -68,12 +69,12 @@ read tools/basis.anubis @@ -68,12 +69,12 @@ read tools/basis.anubis
68 define Word8 69 define Word8
69 wa64_alphabet 70 wa64_alphabet
70 ( 71 (
71 - Int32 index // the index is assumed to be >= 0 and < 64 72 + Word32 index // the index is assumed to be >= 0 and < 64
72 ) = 73 ) =
73 - if index < 0 then print("Bad index [" + index + "] in wa64_alphabet()\n"); '_' else  
74 - if index < 26 then truncate_to_word8(index+'A') else  
75 - if index < 52 then truncate_to_word8(index-26+'a') else  
76 - if index < 62 then truncate_to_word8(index-52+'0') else 74 + if index -< 0 then print("Bad index [" + index + "] in wa64_alphabet()\n"); '_' else
  75 + if index -< 26 then truncate_to_Word8(index+'A') else
  76 + if index -< 52 then truncate_to_Word8(index-26+'a') else
  77 + if index -< 62 then truncate_to_Word8(index-52+'0') else
77 if index = 62 then '-' else 78 if index = 62 then '-' else
78 if index = 63 then '_' else 79 if index = 63 then '_' else
79 print("Bad index [" + index + "] in wa64_alphabet()\n"); '_'. 80 print("Bad index [" + index + "] in wa64_alphabet()\n"); '_'.
@@ -82,6 +83,14 @@ define Word8 @@ -82,6 +83,14 @@ define Word8
82 83
83 Transform a group of 3 bytes into a group of 4 wa64 letters. 84 Transform a group of 3 bytes into a group of 4 wa64 letters.
84 85
  86 +
  87 +define Word32
  88 + to_word32
  89 + (
  90 + Word8 x
  91 + ) =
  92 + word32(word16(x,0),0).
  93 +
85 define (Word8,Word8,Word8,Word8) 94 define (Word8,Word8,Word8,Word8)
86 transform_group 95 transform_group
87 ( 96 (
@@ -89,9 +98,9 @@ define (Word8,Word8,Word8,Word8) @@ -89,9 +98,9 @@ define (Word8,Word8,Word8,Word8)
89 Word8 byte2, 98 Word8 byte2,
90 Word8 byte3 99 Word8 byte3
91 ) = 100 ) =
92 - with n1 = word8_to_int32(byte1),  
93 - n2 = word8_to_int32(byte2),  
94 - n3 = word8_to_int32(byte3), 101 + with n1 = to_word32(byte1),
  102 + n2 = to_word32(byte2),
  103 + n3 = to_word32(byte3),
95 ( 104 (
96 wa64_alphabet(n1>>2), 105 wa64_alphabet(n1>>2),
97 wa64_alphabet(((n1&3)<<4)|(n2>>4)), 106 wa64_alphabet(((n1&3)<<4)|(n2>>4)),
@@ -106,12 +115,12 @@ define ByteArray @@ -106,12 +115,12 @@ define ByteArray
106 two_mod_three 115 two_mod_three
107 ( 116 (
108 ByteArray result, 117 ByteArray result,
109 - Int32 result_index, 118 + Int result_index,
110 Word8 byte1, 119 Word8 byte1,
111 Word8 byte2 120 Word8 byte2
112 ) = 121 ) =
113 - with n1 = word8_to_int32(byte1),  
114 - n2 = word8_to_int32(byte2), 122 + with n1 = to_word32(byte1),
  123 + n2 = to_word32(byte2),
115 forget(put(result,result_index ,wa64_alphabet(n1>>2))); 124 forget(put(result,result_index ,wa64_alphabet(n1>>2)));
116 forget(put(result,result_index+1,wa64_alphabet(((n1&3)<<4)|(n2>>4)))); 125 forget(put(result,result_index+1,wa64_alphabet(((n1&3)<<4)|(n2>>4))));
117 forget(put(result,result_index+2,wa64_alphabet((n2&15)<<2))); 126 forget(put(result,result_index+2,wa64_alphabet((n2&15)<<2)));
@@ -126,10 +135,10 @@ define ByteArray @@ -126,10 +135,10 @@ define ByteArray
126 one_mod_three 135 one_mod_three
127 ( 136 (
128 ByteArray result, 137 ByteArray result,
129 - Int32 result_index, 138 + Int result_index,
130 Word8 byte1 139 Word8 byte1
131 ) = 140 ) =
132 - with n1 = word8_to_int32(byte1), 141 + with n1 = to_word32(byte1),
133 forget(put(result,result_index ,wa64_alphabet(n1>>2))); 142 forget(put(result,result_index ,wa64_alphabet(n1>>2)));
134 forget(put(result,result_index+1,wa64_alphabet((n1&3)<<4))); 143 forget(put(result,result_index+1,wa64_alphabet((n1&3)<<4)));
135 forget(put(result,result_index+4,0)); 144 forget(put(result,result_index+4,0));
@@ -141,9 +150,9 @@ define ByteArray @@ -141,9 +150,9 @@ define ByteArray
141 wa64_encode 150 wa64_encode
142 ( 151 (
143 ByteArray ba, 152 ByteArray ba,
144 - Int32 ba_index, // index into byte array 153 + Int ba_index, // index into byte array
145 ByteArray result, 154 ByteArray result,
146 - Int32 result_index 155 + Int result_index
147 ) = 156 ) =
148 if nth(ba_index,ba) is 157 if nth(ba_index,ba) is
149 { 158 {
@@ -181,7 +190,7 @@ define ByteArray @@ -181,7 +190,7 @@ define ByteArray
181 ) = 190 ) =
182 with l = length(ba), 191 with l = length(ba),
183 wa64_encode(ba,0, 192 wa64_encode(ba,0,
184 - constant_byte_array((((l/57)+1)*76)+10,0),0). 193 + constant_byte_array((((l\57)+1)*76)+10,0),0).
185 194
186 195
187 public define String 196 public define String
@@ -202,15 +211,15 @@ public define String @@ -202,15 +211,15 @@ public define String
202 Checking if a character belongs to the wa64 alphabet. If true, the function returns the 211 Checking if a character belongs to the wa64 alphabet. If true, the function returns the
203 index of the character in the alphabet. 212 index of the character in the alphabet.
204 213
205 -define Maybe(Int32) 214 +define Maybe(Word32)
206 is_wa64_char 215 is_wa64_char
207 ( 216 (
208 Word8 c 217 Word8 c
209 ) = 218 ) =
210 - with n = word8_to_int32(c),  
211 - if ('A' =< n & n =< 'Z') then success(n - 'A') else  
212 - if ('a' =< n & n =< 'z') then success(n - 'a' + 26) else  
213 - if ('0' =< n & n =< '9') then success(n - '0' + 52) else 219 + with n = to_word32(c),
  220 + if ('A' +=< n & n +=< 'Z') then success(n - 'A') else
  221 + if ('a' +=< n & n +=< 'z') then success(n - 'a' + 26) else
  222 + if ('0' +=< n & n +=< '9') then success(n - '0' + 52) else
214 if n = '-' then success(62) else 223 if n = '-' then success(62) else
215 if n = '_' then success(63) else 224 if n = '_' then success(63) else
216 failure. 225 failure.
@@ -221,12 +230,12 @@ define Maybe(Int32) @@ -221,12 +230,12 @@ define Maybe(Int32)
221 for reading. The function does not return the character itself, but its index in the 230 for reading. The function does not return the character itself, but its index in the
222 alphabet. 231 alphabet.
223 232
224 -define Maybe((Int32, // next position for reading  
225 - Int32)) // index of character in wa64 alphabet 233 +define Maybe((Int, // next position for reading
  234 + Word32)) // index of character in wa64 alphabet
226 get_next_character 235 get_next_character
227 ( 236 (
228 ByteArray ba, 237 ByteArray ba,
229 - Int32 n 238 + Int n
230 ) = 239 ) =
231 if nth(n,ba) is 240 if nth(n,ba) is
232 { 241 {
@@ -243,7 +252,7 @@ define Maybe((Int32, // next position for reading @@ -243,7 +252,7 @@ define Maybe((Int32, // next position for reading
243 Translating a group of characters into a group of bytes. 252 Translating a group of characters into a group of bytes.
244 253
245 type TranslateGroupResult: 254 type TranslateGroupResult:
246 - three_bytes (Int32 new_pos, Word8 b1, Word8 b2, Word8 b3), 255 + three_bytes (Int new_pos, Word8 b1, Word8 b2, Word8 b3),
247 two_bytes ( Word8 b1, Word8 b2 ), 256 two_bytes ( Word8 b1, Word8 b2 ),
248 one_byte ( Word8 b1 ), 257 one_byte ( Word8 b1 ),
249 zero_bytes, 258 zero_bytes,
@@ -254,7 +263,7 @@ define TranslateGroupResult @@ -254,7 +263,7 @@ define TranslateGroupResult
254 translate_group 263 translate_group
255 ( 264 (
256 ByteArray ba, 265 ByteArray ba,
257 - Int32 n 266 + Int n
258 ) = 267 ) =
259 if get_next_character(ba,n) is 268 if get_next_character(ba,n) is
260 { 269 {
@@ -267,30 +276,30 @@ define TranslateGroupResult @@ -267,30 +276,30 @@ define TranslateGroupResult
267 if get_next_character(ba,n2) is 276 if get_next_character(ba,n2) is
268 { 277 {
269 failure then // we don't check the padding characters 278 failure then // we don't check the padding characters
270 - one_byte(truncate_to_word8((i1<<2)|(i2>>4))), 279 + one_byte(truncate_to_Word8((i1<<2)|(i2>>4))),
271 success(p3) then if p3 is (n3,i3) then 280 success(p3) then if p3 is (n3,i3) then
272 if get_next_character(ba,n3) is 281 if get_next_character(ba,n3) is
273 { 282 {
274 failure then 283 failure then
275 - two_bytes(truncate_to_word8((i1<<2)|(i2>>4)),  
276 - truncate_to_word8(((i2&15)<<4)|(i3>>2))), 284 + two_bytes(truncate_to_Word8((i1<<2)|(i2>>4)),
  285 + truncate_to_Word8(((i2&15)<<4)|(i3>>2))),
277 success(p4) then if p4 is (n4,i4) then 286 success(p4) then if p4 is (n4,i4) then
278 - three_bytes(n4,truncate_to_word8((i1<<2)|(i2>>4)),  
279 - truncate_to_word8(((i2&15)<<4)|(i3>>2)),  
280 - truncate_to_word8(((i3&3)<<6)|i4)) 287 + three_bytes(n4,truncate_to_Word8((i1<<2)|(i2>>4)),
  288 + truncate_to_Word8(((i2&15)<<4)|(i3>>2)),
  289 + truncate_to_Word8(((i3&3)<<6)|i4))
281 } 290 }
282 } 291 }
283 } 292 }
284 }. 293 }.
285 294
286 295
287 -define Int32 // returns the size of the decoded array of bytes 296 +define Int // returns the size of the decoded array of bytes
288 translate_groups 297 translate_groups
289 ( 298 (
290 ByteArray source, 299 ByteArray source,
291 - Int32 n, // position in source 300 + Int n, // position in source
292 ByteArray target, 301 ByteArray target,
293 - Int32 m // position in target 302 + Int m // position in target
294 ) = 303 ) =
295 if translate_group(source,n) is 304 if translate_group(source,n) is
296 { 305 {
calexium_lib/web/counter.anubis
@@ -22,7 +22,7 @@ public define HTML_Off_Form @@ -22,7 +22,7 @@ public define HTML_Off_Form
22 ( 22 (
23 String directory, // where the counter file will be located 23 String directory, // where the counter file will be located
24 String name, // name of counter 24 String name, // name of counter
25 - Int32 text_size // size of characters of counter 25 + Int text_size // size of characters of counter
26 ). 26 ).
27 27
28 28
@@ -50,9 +50,9 @@ define List(Word8) @@ -50,9 +50,9 @@ define List(Word8)
50 zero_pad 50 zero_pad
51 ( 51 (
52 List(Word8) l, 52 List(Word8) l,
53 - Int32 n 53 + Int n
54 ) = 54 ) =
55 - if length(l) < n 55 + if length(l) < to_Int(n)
56 then zero_pad(['0' . l],n) 56 then zero_pad(['0' . l],n)
57 else l. 57 else l.
58 58
@@ -60,8 +60,8 @@ define List(Word8) @@ -60,8 +60,8 @@ define List(Word8)
60 define HTML_Off_Form 60 define HTML_Off_Form
61 web_counter 61 web_counter
62 ( 62 (
63 - Int32 n, // value of counter  
64 - Int32 text_size // size of text 63 + Int n, // value of counter
  64 + Int text_size // size of text
65 ) = 65 ) =
66 with black = rgb(0,0,0), 66 with black = rgb(0,0,0),
67 white = rgb(255,255,255), 67 white = rgb(255,255,255),
@@ -69,8 +69,8 @@ define HTML_Off_Form @@ -69,8 +69,8 @@ define HTML_Off_Form
69 table([border(0,1,0,black),background_color(black)],[row( 69 table([border(0,1,0,black),background_color(black)],[row(
70 [cell([background_color(black),width(2)],text([],"")) . 70 [cell([background_color(black),width(2)],text([],"")) .
71 map((Word8 c) |-> cell([background_color(black),width(8),h_center], 71 map((Word8 c) |-> cell([background_color(black),width(8),h_center],
72 - text([size(text_size),color(white),bold],""+(word8_to_int32(c)-'0'))),  
73 - zero_pad(explode(integer_to_string(n)),8))] 72 + text([size(text_size),color(white),bold],""+(to_Word32(c)-'0'))),
  73 + zero_pad(explode(to_decimal(n)),8))]
74 )]) 74 )])
75 )]). 75 )]).
76 76
@@ -81,9 +81,9 @@ public define HTML_Off_Form @@ -81,9 +81,9 @@ public define HTML_Off_Form
81 ( 81 (
82 String directory, // where the counter file will be located 82 String directory, // where the counter file will be located
83 String name, // name of counter 83 String name, // name of counter
84 - Int32 text_size // size of characters of counter 84 + Int text_size // size of characters of counter
85 ) = 85 ) =
86 - if (RetrieveResult(Int32))retrieve(directory+"/"+name+".counter") is 86 + if (RetrieveResult(Int))retrieve(directory+"/"+name+".counter") is
87 { 87 {
88 cannot_find_file then web_counter(0,text_size), 88 cannot_find_file then web_counter(0,text_size),
89 read_error then web_counter(0,text_size), 89 read_error then web_counter(0,text_size),
@@ -101,12 +101,12 @@ public define One @@ -101,12 +101,12 @@ public define One
101 ) = 101 ) =
102 with path = directory+"/"+name+".counter", 102 with path = directory+"/"+name+".counter",
103 protect 103 protect
104 - if (RetrieveResult(Int32))retrieve(path) is 104 + if (RetrieveResult(Int))retrieve(path) is
105 { 105 {
106 - cannot_find_file then forget(save((Int32)1,path)), 106 + cannot_find_file then forget(save((Int)1,path)),
107 read_error then unique, 107 read_error then unique,
108 type_error then unique, 108 type_error then unique,
109 - ok(n) then forget(save((Int32)(n+1),path)) 109 + ok(n) then forget(save((Int)(n+1),path))
110 }. 110 }.
111 111
112 112