Commit 74601b3660ba73b1a6e5d608e0eb584356b61787

Authored by David René
1 parent a8e3f562

remove extra tab

anubis_dev/library/data_base/alter_table.anubis
... ... @@ -18,187 +18,187 @@ read data_base/sqlite.anubis
18 18 read system/logger.anubis
19 19  
20 20 define One
21   - print_list
22   - (
23   - List(String) l
24   - ) =
25   - if l is
26   - {
27   - [] then print(" <<<\n"),
28   - [h . t] then print(h + ", "); print_list(t)
29   - }.
30   -
  21 + print_list
  22 + (
  23 + List(String) l
  24 + ) =
  25 + if l is
  26 + {
  27 + [] then print(" <<<\n"),
  28 + [h . t] then print(h + ", "); print_list(t)
  29 + }.
  30 +
31 31 define Maybe(One)
32   - my_sql_query
33   - (
34   - SQLite3DataBase db,
35   - String sql,
36   - Logger log
37   - ) =
38   - if sql_query(db, sql) is
39   - {
40   - error(sql_error) then logError(log, "SQL ERROR: " + sql_error.text + "\n ...executing query [" + sql + "]"); failure,
41   - ok(_) then success(unique)
42   - }.
43   -
  32 + my_sql_query
  33 + (
  34 + SQLite3DataBase db,
  35 + String sql,
  36 + Logger log
  37 + ) =
  38 + if sql_query(db, sql) is
  39 + {
  40 + error(sql_error) then logError(log, "SQL ERROR: " + sql_error.text + "\n ...executing query [" + sql + "]"); failure,
  41 + ok(_) then success(unique)
  42 + }.
  43 +
44 44 define Maybe(String)
45   - get_original_query
46   - (
47   - SQLite3DataBase db,
48   - String tableName,
49   - Logger log
50   - ) =
  45 + get_original_query
  46 + (
  47 + SQLite3DataBase db,
  48 + String tableName,
  49 + Logger log
  50 + ) =
51 51 if sql_query(db, "SELECT sql FROM sqlite_master where (type='table') and tbl_name='" + tableName + "'") is
52 52 {
53 53 error(sql_error) then logError(log, "alter_table ERROR '" + sql_error.text + "'"); failure,
54 54 ok(table_cursor) then
55   - if table_cursor(next_row) is
56   - {
57   - error(sql_error) then logError(log, "alter_table ERROR '" + sql_error.text + "'"); failure,
58   - no_more_row then failure, //can't find the table in sqlite_master, because the table is new
59   - row(current) then success(text(current)(0))
60   - }
61   - }.
62   -
  55 + if table_cursor(next_row) is
  56 + {
  57 + error(sql_error) then logError(log, "alter_table ERROR '" + sql_error.text + "'"); failure,
  58 + no_more_row then failure, //can't find the table in sqlite_master, because the table is new
  59 + row(current) then success(text(current)(0))
  60 + }
  61 + }.
  62 +
63 63 define Bool
64   - has_rows
65   - (
66   - SQLite3DataBase db,
67   - String tableName,
68   - Logger log
69   - ) =
  64 + has_rows
  65 + (
  66 + SQLite3DataBase db,
  67 + String tableName,
  68 + Logger log
  69 + ) =
70 70 if sql_query(db, "SELECT count(*) FROM '" + tableName + "'") is
71 71 {
72 72 error(sql_error) then logError(log, "has_rows query ERROR '" + sql_error.text + "'"); false,
73 73 ok(table_cursor) then
74   - if table_cursor(next_row) is
75   - {
76   - error(sql_error) then logError(log, "has_row run ERROR '" + sql_error.text + "'"); false,
77   - no_more_row then false,
78   - row(current) then db_integer(current)(0) /= 0
79   - }
80   - }.
81   -
  74 + if table_cursor(next_row) is
  75 + {
  76 + error(sql_error) then logError(log, "has_row run ERROR '" + sql_error.text + "'"); false,
  77 + no_more_row then false,
  78 + row(current) then db_integer(current)(0) /= 0
  79 + }
  80 + }.
  81 +
82 82 define List(String)
83   - alter_table_extract_columns_list_sub
84   - (
  83 + alter_table_extract_columns_list_sub
  84 + (
85 85 Int32 -> SQLite3Datum row,
86 86 Int32 colIndex
87   - ) =
88   - if row(colIndex) is text(name) then [name . alter_table_extract_columns_list_sub(row, colIndex+1)]
89   - else [].
  87 + ) =
  88 + if row(colIndex) is text(name) then [name . alter_table_extract_columns_list_sub(row, colIndex+1)]
  89 + else [].
90 90  
91 91 define List(String)
92   - alter_table_extract_columns_list
93   - (
  92 + alter_table_extract_columns_list
  93 + (
94 94 SQLite3HeadersOrRow -> SQLite3Row table_cursor,
95   - Logger log
  95 + Logger log
96 96 ) =
97   - if table_cursor(headers) is
98   - {
99   - error(sql_error) then logError(log, "alter_table_extract_columns_list ERROR '" + sql_error.text + "'"); [],
100   - no_more_row then [],
101   - row(headers) then alter_table_extract_columns_list_sub(headers, 0)
102   - }.
  97 + if table_cursor(headers) is
  98 + {
  99 + error(sql_error) then logError(log, "alter_table_extract_columns_list ERROR '" + sql_error.text + "'"); [],
  100 + no_more_row then [],
  101 + row(headers) then alter_table_extract_columns_list_sub(headers, 0)
  102 + }.
103 103  
104 104 define String
105   - alter_table_extract_column_string_sub
106   - (
  105 + alter_table_extract_column_string_sub
  106 + (
107 107 Int32 -> SQLite3Datum row,
108   - Int32 colIndex,
109   - List(String) oldColumns,
110   - Logger log
111   - ) =
112   - if row(colIndex) is text(name) then
113   - with test = (String name2) |-> logDebug(log, "name: " + name + " / name2: " + name2); if name = name2 then true else false,
114   - with colString = alter_table_extract_column_string_sub(row, colIndex+1, oldColumns, log),
115   - if find_element(oldColumns, test) is
116   - {
117   - failure then colString,
118   - success(_) then logDebug(log, "found: " + name);
119   - if is_empty(colString) then name else name + ", " + colString
120   - }
121   - else "".
122   -
  108 + Int32 colIndex,
  109 + List(String) oldColumns,
  110 + Logger log
  111 + ) =
  112 + if row(colIndex) is text(name) then
  113 + with test = (String name2) |-> logDebug(log, "name: " + name + " / name2: " + name2); if name = name2 then true else false,
  114 + with colString = alter_table_extract_column_string_sub(row, colIndex+1, oldColumns, log),
  115 + if find_element(oldColumns, test) is
  116 + {
  117 + failure then colString,
  118 + success(_) then logDebug(log, "found: " + name);
  119 + if is_empty(colString) then name else name + ", " + colString
  120 + }
  121 + else "".
  122 +
123 123 define String
124   - alter_table_extract_column_string
125   - (
  124 + alter_table_extract_column_string
  125 + (
126 126 SQLite3HeadersOrRow -> SQLite3Row table_cursor,
127   - List(String) oldColumns,
128   - Logger log
129   - ) =
130   - if table_cursor(next_row) is
131   - {
132   - error(sql_error) then logError(log, "alter_table_extract_columns_list ERROR '" + sql_error.text + "'"); "",
133   - no_more_row then logDebug(log, "Extract columns answers 'no more row'"); "",
134   - row(row) then
135   - if row(1) is text(name) then
136   - with test = (String name2) |-> logDebug(log, "name: " + name + " / name2: " + name2); if name = name2 then true else false,
137   - with colString = alter_table_extract_column_string(table_cursor, oldColumns, log),
138   - if find_element(oldColumns, test) is
139   - {
140   - failure then colString,
141   - success(_) then logDebug(log, "found: " + name);
142   - if is_empty(colString) then name else name + ", " + colString
143   - }
144   - else ""
145   - }.
  127 + List(String) oldColumns,
  128 + Logger log
  129 + ) =
  130 + if table_cursor(next_row) is
  131 + {
  132 + error(sql_error) then logError(log, "alter_table_extract_columns_list ERROR '" + sql_error.text + "'"); "",
  133 + no_more_row then logDebug(log, "Extract columns answers 'no more row'"); "",
  134 + row(row) then
  135 + if row(1) is text(name) then
  136 + with test = (String name2) |-> logDebug(log, "name: " + name + " / name2: " + name2); if name = name2 then true else false,
  137 + with colString = alter_table_extract_column_string(table_cursor, oldColumns, log),
  138 + if find_element(oldColumns, test) is
  139 + {
  140 + failure then colString,
  141 + success(_) then logDebug(log, "found: " + name);
  142 + if is_empty(colString) then name else name + ", " + colString
  143 + }
  144 + else ""
  145 + }.
146 146  
147 147 public define Maybe(One)
148   - alter_table
149   - (
150   - SQLite3DataBase db,
151   - String tableName,
152   - String newTableQuery,
153   - Logger log
154   - ) =
155   - if get_original_query(db, tableName, log) is
156   - {
157   - failure then
158   - logInfo(log, "Creating table '" + tableName + "'... ");
159   - if sql_query(db, newTableQuery) is error(sql_error)
160   - then logError(log, "ERROR : " + sql_error.text); failure
161   - else logInfo(log, " --> ok."); success(unique),
162   - success(originalTableQuery) then
163   - if originalTableQuery /= newTableQuery then
164   - logInfo(log, "Updating table '" + tableName + "' on database... ");
165   - if has_rows(db, tableName, log) is
166   - {
167   - false then
168   - if my_sql_query(db, "DROP TABLE '" + tableName + "'", log) is failure
169   - then failure
170   - else if my_sql_query(db, newTableQuery, log ) is
171   - {
172   - failure then failure,
173   - success(_) then logInfo(log, " --> ok."); success(unique)
174   - },
175   - true then
176   - with tempNameTable = tableName + "_temp",
177   - forget(sql_query(db, "DROP TABLE '" + tempNameTable + "'"));
178   - if my_sql_query(db, "CREATE TEMP TABLE '" + tempNameTable + "' AS SELECT * from '" + tableName + "'", log) is failure then failure else
179   - if my_sql_query(db, "DROP TABLE '" + tableName + "'", log) is failure then failure else
180   - if my_sql_query(db, newTableQuery , log) is failure then failure else
181   - if sql_query(db, "SELECT * FROM '" + tempNameTable + "'") is
182   - {
183   - error(sql_error) then logError(log, "alter_table: select * tempTable ERROR '" + sql_error.text + "'"); failure,
184   - ok(table_cursor2) then
185   - with oldColumns = alter_table_extract_columns_list(table_cursor2, log),
186   - print_list(oldColumns);
187   - if sql_query(db, "PRAGMA table_info('" + tableName + "')") is
188   - {
189   - error(sql_error) then logError(log, "alter_table: pragma table_info() ERROR '" + sql_error.text + "'"); failure,
190   - ok(table_cursor3) then
191   - with newColumnsStr = alter_table_extract_column_string(table_cursor3, oldColumns, log),
192   - sql = "INSERT INTO '" + tableName + "' (" + newColumnsStr + ") SELECT " + newColumnsStr + " FROM '" + tempNameTable + "'",
193   - if sql_query(db, sql) is
194   - {
195   - error(sql_error) then logError(log, "alter_table ERROR '" + sql_error.text + "'\n\tquery = [" + sql + "]"); failure,
196   - ok(_) then logInfo(log, " --> ok."); success(unique)
197   - }
198   - }
199   - }
200   - }
201   - else
202   - success(unique)
  148 + alter_table
  149 + (
  150 + SQLite3DataBase db,
  151 + String tableName,
  152 + String newTableQuery,
  153 + Logger log
  154 + ) =
  155 + if get_original_query(db, tableName, log) is
  156 + {
  157 + failure then
  158 + logInfo(log, "Creating table '" + tableName + "'... ");
  159 + if sql_query(db, newTableQuery) is error(sql_error)
  160 + then logError(log, "ERROR : " + sql_error.text); failure
  161 + else logInfo(log, " --> ok."); success(unique),
  162 + success(originalTableQuery) then
  163 + if originalTableQuery /= newTableQuery then
  164 + logInfo(log, "Updating table '" + tableName + "' on database... ");
  165 + if has_rows(db, tableName, log) is
  166 + {
  167 + false then
  168 + if my_sql_query(db, "DROP TABLE '" + tableName + "'", log) is failure
  169 + then failure
  170 + else if my_sql_query(db, newTableQuery, log ) is
  171 + {
  172 + failure then failure,
  173 + success(_) then logInfo(log, " --> ok."); success(unique)
  174 + },
  175 + true then
  176 + with tempNameTable = tableName + "_temp",
  177 + forget(sql_query(db, "DROP TABLE '" + tempNameTable + "'"));
  178 + if my_sql_query(db, "CREATE TEMP TABLE '" + tempNameTable + "' AS SELECT * from '" + tableName + "'", log) is failure then failure else
  179 + if my_sql_query(db, "DROP TABLE '" + tableName + "'", log) is failure then failure else
  180 + if my_sql_query(db, newTableQuery , log) is failure then failure else
  181 + if sql_query(db, "SELECT * FROM '" + tempNameTable + "'") is
  182 + {
  183 + error(sql_error) then logError(log, "alter_table: select * tempTable ERROR '" + sql_error.text + "'"); failure,
  184 + ok(table_cursor2) then
  185 + with oldColumns = alter_table_extract_columns_list(table_cursor2, log),
  186 + print_list(oldColumns);
  187 + if sql_query(db, "PRAGMA table_info('" + tableName + "')") is
  188 + {
  189 + error(sql_error) then logError(log, "alter_table: pragma table_info() ERROR '" + sql_error.text + "'"); failure,
  190 + ok(table_cursor3) then
  191 + with newColumnsStr = alter_table_extract_column_string(table_cursor3, oldColumns, log),
  192 + sql = "INSERT INTO '" + tableName + "' (" + newColumnsStr + ") SELECT " + newColumnsStr + " FROM '" + tempNameTable + "'",
  193 + if sql_query(db, sql) is
  194 + {
  195 + error(sql_error) then logError(log, "alter_table ERROR '" + sql_error.text + "'\n\tquery = [" + sql + "]"); failure,
  196 + ok(_) then logInfo(log, " --> ok."); success(unique)
  197 + }
  198 + }
  199 + }
  200 + }
  201 + else
  202 + success(unique)
203 203 }.
204 204  
... ...
anubis_dev/library/data_base/sqlite.anubis
... ... @@ -333,28 +333,28 @@ public define Bool
333 333  
334 334  
335 335 define List(Word8)
336   - db_make_sql_string
337   - (
338   - List(Word8) str
339   - )
340   - =
341   - if str is
342   - {
343   - [ ] then [],
344   - [h . t] then with tail = db_make_sql_string(t),
345   - if h = '\'' then [h . [h . tail]]
346   - else [h . tail]
347   - }.
  336 + db_make_sql_string
  337 + (
  338 + List(Word8) str
  339 + )
  340 + =
  341 + if str is
  342 + {
  343 + [ ] then [],
  344 + [h . t] then with tail = db_make_sql_string(t),
  345 + if h = '\'' then [h . [h . tail]]
  346 + else [h . tail]
  347 + }.
348 348  
349 349 /**
350 350 * Convert to a SQL certified string and add quotes around.
351 351 */
352 352 public define String
353   - db_make_sql_string
354   - (
355   - String str
356   - )
357   - =
358   - "'" + implode(db_make_sql_string(explode(str))) + "'".
  353 + db_make_sql_string
  354 + (
  355 + String str
  356 + )
  357 + =
  358 + "'" + implode(db_make_sql_string(explode(str))) + "'".
359 359  
360 360  
... ...
anubis_dev/library/locale/L3.anubis
... ... @@ -366,10 +366,10 @@ public define Bool
366 366 error(n) then print_db_error(n, "Can't find symbol"); false,
367 367 ok(table_cursor) then
368 368 if table_cursor(next_row) is
369   - {
370   - error(err) then print_db_error(err); false,
371   - no_more_row then false,
372   - row(_) then true
  369 + {
  370 + error(err) then print_db_error(err); false,
  371 + no_more_row then false,
  372 + row(_) then true
373 373 }
374 374 }.
375 375  
... ... @@ -691,10 +691,10 @@ public define String
691 691 {
692 692 failure then
693 693 forget(if l3_put_symbol(l3object, symbolic_name, "undefined", "Symbol automatically added.") then
694   - println("Symbol ["+symbolic_name+ "] added in 'undefined' chapter.")
695   - else
696   - println("Can't add Symbol ["+symbolic_name+ "] in 'undefined' chapter."));
697   - "["+symbolic_name+"]",
  694 + println("Symbol ["+symbolic_name+ "] added in 'undefined' chapter.")
  695 + else
  696 + println("Can't add Symbol ["+symbolic_name+ "] in 'undefined' chapter."));
  697 + "["+symbolic_name+"]",
698 698 success(l3symb) then
699 699 if l3symb is l3Symbol(name, _, _) then "[" + name + "]"
700 700 },
... ...
anubis_dev/library/locale/iso3166-1.anubis
... ... @@ -7,12 +7,12 @@
7 7 * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 8 */
9 9  
10   - This list states the country names (official short names in English) in alphabetical
11   - order as given in ISO 3166-1 and the corresponding ISO 3166-1-alpha-2 code elements.
12   - The list is updated whenever a change to the official code list in ISO 3166-1 is
13   - effected by the ISO 3166/MA. It lists 240 official short names and code elements.
14   - One line of text contains one entry.
15   - A country name and its code element are separated by a semicolon (;).
  10 + This list states the country names (official short names in English) in alphabetical
  11 + order as given in ISO 3166-1 and the corresponding ISO 3166-1-alpha-2 code elements.
  12 + The list is updated whenever a change to the official code list in ISO 3166-1 is
  13 + effected by the ISO 3166/MA. It lists 240 official short names and code elements.
  14 + One line of text contains one entry.
  15 + A country name and its code element are separated by a semicolon (;).
16 16  
17 17 public type L3CountryCode:
18 18 symbolic,
... ... @@ -43,240 +43,240 @@ public define List(L3CountryInfo)
43 43 ].
44 44  
45 45  
46   - ANGOLA;AO
47   - ANGUILLA;AI
48   - ANTARCTICA;AQ
49   - ANTIGUA AND BARBUDA;AG
50   - ARGENTINA;AR
51   - ARMENIA;AM
52   - ARUBA;AW
53   - AUSTRALIA;AU
54   - AUSTRIA;AT
55   - AZERBAIJAN;AZ
56   - BAHAMAS;BS
57   - BAHRAIN;BH
58   - BANGLADESH;BD
59   - BARBADOS;BB
60   - BELARUS;BY
61   - BELGIUM;BE
62   - BELIZE;BZ
63   - BENIN;BJ
64   - BERMUDA;BM
65   - BHUTAN;BT
66   - BOLIVIA;BO
67   - BOSNIA AND HERZEGOVINA;BA
68   - BOTSWANA;BW
69   - BOUVET ISLAND;BV
70   - BRAZIL;BR
71   - BRITISH INDIAN OCEAN TERRITORY;IO
72   - BRUNEI DARUSSALAM;BN
73   - BULGARIA;BG
74   - BURKINA FASO;BF
75   - BURUNDI;BI
76   - CAMBODIA;KH
77   - CAMEROON;CM
78   - CANADA;CA
79   - CAPE VERDE;CV
80   - CAYMAN ISLANDS;KY
81   - CENTRAL AFRICAN REPUBLIC;CF
82   - CHAD;TD
83   - CHILE;CL
84   - CHINA;CN
85   - CHRISTMAS ISLAND;CX
86   - COCOS (KEELING) ISLANDS;CC
87   - COLOMBIA;CO
88   - COMOROS;KM
89   - CONGO;CG
90   - CONGO, THE DEMOCRATIC REPUBLIC OF THE;CD
91   - COOK ISLANDS;CK
92   - COSTA RICA;CR
93   - COTE D'IVOIRE;CI
94   - CROATIA;HR
95   - CUBA;CU
96   - CYPRUS;CY
97   - CZECH REPUBLIC;CZ
98   - DENMARK;DK
99   - DJIBOUTI;DJ
100   - DOMINICA;DM
101   - DOMINICAN REPUBLIC;DO
102   - ECUADOR;EC
103   - EGYPT;EG
104   - EL SALVADOR;SV
105   - EQUATORIAL GUINEA;GQ
106   - ERITREA;ER
107   - ESTONIA;EE
108   - ETHIOPIA;ET
109   - FALKLAND ISLANDS (MALVINAS);FK
110   - FAROE ISLANDS;FO
111   - FIJI;FJ
112   - FINLAND;FI
113   - FRANCE;FR
114   - FRENCH GUIANA;GF
115   - FRENCH POLYNESIA;PF
116   - FRENCH SOUTHERN TERRITORIES;TF
117   - GABON;GA
118   - GAMBIA;GM
119   - GEORGIA;GE
120   - GERMANY;DE
121   - GHANA;GH
122   - GIBRALTAR;GI
123   - GREECE;GR
124   - GREENLAND;GL
125   - GRENADA;GD
126   - GUADELOUPE;GP
127   - GUAM;GU
128   - GUATEMALA;GT
129   - GUERNSEY; GG
130   - GUINEA;GN
131   - GUINEA-BISSAU;GW
132   - GUYANA;GY
133   - HAITI;HT
134   - HEARD ISLAND AND MCDONALD ISLANDS;HM
135   - HOLY SEE (VATICAN CITY STATE);VA
136   - HONDURAS;HN
137   - HONG KONG;HK
138   - HUNGARY;HU
139   - ICELAND;IS
140   - INDIA;IN
141   - INDONESIA;ID
142   - IRAN, ISLAMIC REPUBLIC OF;IR
143   - IRAQ;IQ
144   - IRELAND;IE
145   - ISLE OF MAN;IM
146   - ISRAEL;IL
147   - ITALY;IT
148   - JAMAICA;JM
149   - JAPAN;JP
150   - JERSEY;JE
151   - JORDAN;JO
152   - KAZAKHSTAN;KZ
153   - KENYA;KE
154   - KIRIBATI;KI
155   - KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF;KP
156   - KOREA, REPUBLIC OF;KR
157   - KUWAIT;KW
158   - KYRGYZSTAN;KG
159   - LAO PEOPLE'S DEMOCRATIC REPUBLIC;LA
160   - LATVIA;LV
161   - LEBANON;LB
162   - LESOTHO;LS
163   - LIBERIA;LR
164   - LIBYAN ARAB JAMAHIRIYA;LY
165   - LIECHTENSTEIN;LI
166   - LITHUANIA;LT
167   - LUXEMBOURG;LU
168   - MACAO;MO
169   - MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF;MK
170   - MADAGASCAR;MG
171   - MALAWI;MW
172   - MALAYSIA;MY
173   - MALDIVES;MV
174   - MALI;ML
175   - MALTA;MT
176   - MARSHALL ISLANDS;MH
177   - MARTINIQUE;MQ
178   - MAURITANIA;MR
179   - MAURITIUS;MU
180   - MAYOTTE;YT
181   - MEXICO;MX
182   - MICRONESIA, FEDERATED STATES OF;FM
183   - MOLDOVA, REPUBLIC OF;MD
184   - MONACO;MC
185   - MONGOLIA;MN
186   - MONTSERRAT;MS
187   - MOROCCO;MA
188   - MOZAMBIQUE;MZ
189   - MYANMAR;MM
190   - NAMIBIA;NA
191   - NAURU;NR
192   - NEPAL;NP
193   - NETHERLANDS;NL
194   - NETHERLANDS ANTILLES;AN
195   - NEW CALEDONIA;NC
196   - NEW ZEALAND;NZ
197   - NICARAGUA;NI
198   - NIGER;NE
199   - NIGERIA;NG
200   - NIUE;NU
201   - NORFOLK ISLAND;NF
202   - NORTHERN MARIANA ISLANDS;MP
203   - NORWAY;NO
204   - OMAN;OM
205   - PAKISTAN;PK
206   - PALAU;PW
207   - PALESTINIAN TERRITORY, OCCUPIED;PS
208   - PANAMA;PA
209   - PAPUA NEW GUINEA;PG
210   - PARAGUAY;PY
211   - PERU;PE
212   - PHILIPPINES;PH
213   - PITCAIRN;PN
214   - POLAND;PL
215   - PORTUGAL;PT
216   - PUERTO RICO;PR
217   - QATAR;QA
218   - REUNION;RE
219   - ROMANIA;RO
220   - RUSSIAN FEDERATION;RU
221   - RWANDA;RW
222   - SAINT HELENA;SH
223   - SAINT KITTS AND NEVIS;KN
224   - SAINT LUCIA;LC
225   - SAINT PIERRE AND MIQUELON;PM
226   - SAINT VINCENT AND THE GRENADINES;VC
227   - SAMOA;WS
228   - SAN MARINO;SM
229   - SAO TOME AND PRINCIPE;ST
230   - SAUDI ARABIA;SA
231   - SENEGAL;SN
232   - SERBIA AND MONTENEGRO;CS
233   - SEYCHELLES;SC
234   - SIERRA LEONE;SL
235   - SINGAPORE;SG
236   - SLOVAKIA;SK
237   - SLOVENIA;SI
238   - SOLOMON ISLANDS;SB
239   - SOMALIA;SO
240   - SOUTH AFRICA;ZA
241   - SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS;GS
242   - SPAIN;ES
243   - SRI LANKA;LK
244   - SUDAN;SD
245   - SURINAME;SR
246   - SVALBARD AND JAN MAYEN;SJ
247   - SWAZILAND;SZ
248   - SWEDEN;SE
249   - SWITZERLAND;CH
250   - SYRIAN ARAB REPUBLIC;SY
251   - TAIWAN, PROVINCE OF CHINA;TW
252   - TAJIKISTAN;TJ
253   - TANZANIA, UNITED REPUBLIC OF;TZ
254   - THAILAND;TH
255   - TIMOR-LESTE;TL
256   - TOGO;TG
257   - TOKELAU;TK
258   - TONGA;TO
259   - TRINIDAD AND TOBAGO;TT
260   - TUNISIA;TN
261   - TURKEY;TR
262   - TURKMENISTAN;TM
263   - TURKS AND CAICOS ISLANDS;TC
264   - TUVALU;TV
265   - UGANDA;UG
266   - UKRAINE;UA
267   - UNITED ARAB EMIRATES;AE
268   - UNITED KINGDOM;GB
269   - UNITED STATES;US
270   - UNITED STATES MINOR OUTLYING ISLANDS;UM
271   - URUGUAY;UY
272   - UZBEKISTAN;UZ
273   - VANUATU;VU
274   - VENEZUELA;VE
275   - VIET NAM;VN
276   - VIRGIN ISLANDS, BRITISH;VG
277   - VIRGIN ISLANDS, U.S.;VI
278   - WALLIS AND FUTUNA;WF
279   - WESTERN SAHARA;EH
280   - YEMEN;YE
281   - ZAMBIA;ZM
282   - ZIMBABWE;ZW
  46 + ANGOLA;AO
  47 + ANGUILLA;AI
  48 + ANTARCTICA;AQ
  49 + ANTIGUA AND BARBUDA;AG
  50 + ARGENTINA;AR
  51 + ARMENIA;AM
  52 + ARUBA;AW
  53 + AUSTRALIA;AU
  54 + AUSTRIA;AT
  55 + AZERBAIJAN;AZ
  56 + BAHAMAS;BS
  57 + BAHRAIN;BH
  58 + BANGLADESH;BD
  59 + BARBADOS;BB
  60 + BELARUS;BY
  61 + BELGIUM;BE
  62 + BELIZE;BZ
  63 + BENIN;BJ
  64 + BERMUDA;BM
  65 + BHUTAN;BT
  66 + BOLIVIA;BO
  67 + BOSNIA AND HERZEGOVINA;BA
  68 + BOTSWANA;BW
  69 + BOUVET ISLAND;BV
  70 + BRAZIL;BR
  71 + BRITISH INDIAN OCEAN TERRITORY;IO
  72 + BRUNEI DARUSSALAM;BN
  73 + BULGARIA;BG
  74 + BURKINA FASO;BF
  75 + BURUNDI;BI
  76 + CAMBODIA;KH
  77 + CAMEROON;CM
  78 + CANADA;CA
  79 + CAPE VERDE;CV
  80 + CAYMAN ISLANDS;KY
  81 + CENTRAL AFRICAN REPUBLIC;CF
  82 + CHAD;TD
  83 + CHILE;CL
  84 + CHINA;CN
  85 + CHRISTMAS ISLAND;CX
  86 + COCOS (KEELING) ISLANDS;CC
  87 + COLOMBIA;CO
  88 + COMOROS;KM
  89 + CONGO;CG
  90 + CONGO, THE DEMOCRATIC REPUBLIC OF THE;CD
  91 + COOK ISLANDS;CK
  92 + COSTA RICA;CR
  93 + COTE D'IVOIRE;CI
  94 + CROATIA;HR
  95 + CUBA;CU
  96 + CYPRUS;CY
  97 + CZECH REPUBLIC;CZ
  98 + DENMARK;DK
  99 + DJIBOUTI;DJ
  100 + DOMINICA;DM
  101 + DOMINICAN REPUBLIC;DO
  102 + ECUADOR;EC
  103 + EGYPT;EG
  104 + EL SALVADOR;SV
  105 + EQUATORIAL GUINEA;GQ
  106 + ERITREA;ER
  107 + ESTONIA;EE
  108 + ETHIOPIA;ET
  109 + FALKLAND ISLANDS (MALVINAS);FK
  110 + FAROE ISLANDS;FO
  111 + FIJI;FJ
  112 + FINLAND;FI
  113 + FRANCE;FR
  114 + FRENCH GUIANA;GF
  115 + FRENCH POLYNESIA;PF
  116 + FRENCH SOUTHERN TERRITORIES;TF
  117 + GABON;GA
  118 + GAMBIA;GM
  119 + GEORGIA;GE
  120 + GERMANY;DE
  121 + GHANA;GH
  122 + GIBRALTAR;GI
  123 + GREECE;GR
  124 + GREENLAND;GL
  125 + GRENADA;GD
  126 + GUADELOUPE;GP
  127 + GUAM;GU
  128 + GUATEMALA;GT
  129 + GUERNSEY; GG
  130 + GUINEA;GN
  131 + GUINEA-BISSAU;GW
  132 + GUYANA;GY
  133 + HAITI;HT
  134 + HEARD ISLAND AND MCDONALD ISLANDS;HM
  135 + HOLY SEE (VATICAN CITY STATE);VA
  136 + HONDURAS;HN
  137 + HONG KONG;HK
  138 + HUNGARY;HU
  139 + ICELAND;IS
  140 + INDIA;IN
  141 + INDONESIA;ID
  142 + IRAN, ISLAMIC REPUBLIC OF;IR
  143 + IRAQ;IQ
  144 + IRELAND;IE
  145 + ISLE OF MAN;IM
  146 + ISRAEL;IL
  147 + ITALY;IT
  148 + JAMAICA;JM
  149 + JAPAN;JP
  150 + JERSEY;JE
  151 + JORDAN;JO
  152 + KAZAKHSTAN;KZ
  153 + KENYA;KE
  154 + KIRIBATI;KI
  155 + KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF;KP
  156 + KOREA, REPUBLIC OF;KR
  157 + KUWAIT;KW
  158 + KYRGYZSTAN;KG
  159 + LAO PEOPLE'S DEMOCRATIC REPUBLIC;LA
  160 + LATVIA;LV
  161 + LEBANON;LB
  162 + LESOTHO;LS
  163 + LIBERIA;LR
  164 + LIBYAN ARAB JAMAHIRIYA;LY
  165 + LIECHTENSTEIN;LI
  166 + LITHUANIA;LT
  167 + LUXEMBOURG;LU
  168 + MACAO;MO
  169 + MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF;MK
  170 + MADAGASCAR;MG
  171 + MALAWI;MW
  172 + MALAYSIA;MY
  173 + MALDIVES;MV
  174 + MALI;ML
  175 + MALTA;MT
  176 + MARSHALL ISLANDS;MH
  177 + MARTINIQUE;MQ
  178 + MAURITANIA;MR
  179 + MAURITIUS;MU
  180 + MAYOTTE;YT
  181 + MEXICO;MX
  182 + MICRONESIA, FEDERATED STATES OF;FM
  183 + MOLDOVA, REPUBLIC OF;MD
  184 + MONACO;MC
  185 + MONGOLIA;MN
  186 + MONTSERRAT;MS
  187 + MOROCCO;MA
  188 + MOZAMBIQUE;MZ
  189 + MYANMAR;MM
  190 + NAMIBIA;NA
  191 + NAURU;NR
  192 + NEPAL;NP
  193 + NETHERLANDS;NL
  194 + NETHERLANDS ANTILLES;AN
  195 + NEW CALEDONIA;NC
  196 + NEW ZEALAND;NZ
  197 + NICARAGUA;NI
  198 + NIGER;NE
  199 + NIGERIA;NG
  200 + NIUE;NU
  201 + NORFOLK ISLAND;NF
  202 + NORTHERN MARIANA ISLANDS;MP
  203 + NORWAY;NO
  204 + OMAN;OM
  205 + PAKISTAN;PK
  206 + PALAU;PW
  207 + PALESTINIAN TERRITORY, OCCUPIED;PS
  208 + PANAMA;PA
  209 + PAPUA NEW GUINEA;PG
  210 + PARAGUAY;PY
  211 + PERU;PE
  212 + PHILIPPINES;PH
  213 + PITCAIRN;PN
  214 + POLAND;PL
  215 + PORTUGAL;PT
  216 + PUERTO RICO;PR
  217 + QATAR;QA
  218 + REUNION;RE
  219 + ROMANIA;RO
  220 + RUSSIAN FEDERATION;RU
  221 + RWANDA;RW
  222 + SAINT HELENA;SH
  223 + SAINT KITTS AND NEVIS;KN
  224 + SAINT LUCIA;LC
  225 + SAINT PIERRE AND MIQUELON;PM
  226 + SAINT VINCENT AND THE GRENADINES;VC
  227 + SAMOA;WS
  228 + SAN MARINO;SM
  229 + SAO TOME AND PRINCIPE;ST
  230 + SAUDI ARABIA;SA
  231 + SENEGAL;SN
  232 + SERBIA AND MONTENEGRO;CS
  233 + SEYCHELLES;SC
  234 + SIERRA LEONE;SL
  235 + SINGAPORE;SG
  236 + SLOVAKIA;SK
  237 + SLOVENIA;SI
  238 + SOLOMON ISLANDS;SB
  239 + SOMALIA;SO
  240 + SOUTH AFRICA;ZA
  241 + SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS;GS
  242 + SPAIN;ES
  243 + SRI LANKA;LK
  244 + SUDAN;SD
  245 + SURINAME;SR
  246 + SVALBARD AND JAN MAYEN;SJ
  247 + SWAZILAND;SZ
  248 + SWEDEN;SE
  249 + SWITZERLAND;CH
  250 + SYRIAN ARAB REPUBLIC;SY
  251 + TAIWAN, PROVINCE OF CHINA;TW
  252 + TAJIKISTAN;TJ
  253 + TANZANIA, UNITED REPUBLIC OF;TZ
  254 + THAILAND;TH
  255 + TIMOR-LESTE;TL
  256 + TOGO;TG
  257 + TOKELAU;TK
  258 + TONGA;TO
  259 + TRINIDAD AND TOBAGO;TT
  260 + TUNISIA;TN
  261 + TURKEY;TR
  262 + TURKMENISTAN;TM
  263 + TURKS AND CAICOS ISLANDS;TC
  264 + TUVALU;TV
  265 + UGANDA;UG
  266 + UKRAINE;UA
  267 + UNITED ARAB EMIRATES;AE
  268 + UNITED KINGDOM;GB
  269 + UNITED STATES;US
  270 + UNITED STATES MINOR OUTLYING ISLANDS;UM
  271 + URUGUAY;UY
  272 + UZBEKISTAN;UZ
  273 + VANUATU;VU
  274 + VENEZUELA;VE
  275 + VIET NAM;VN
  276 + VIRGIN ISLANDS, BRITISH;VG
  277 + VIRGIN ISLANDS, U.S.;VI
  278 + WALLIS AND FUTUNA;WF
  279 + WESTERN SAHARA;EH
  280 + YEMEN;YE
  281 + ZAMBIA;ZM
  282 + ZIMBABWE;ZW
... ...
anubis_dev/library/predefined.anubis
... ... @@ -2957,7 +2957,7 @@ public define One
2957 2957 224-239 | à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï |
2958 2958 ---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2959 2959 240-255 | ð | ñ | ò | ó | ô | õ | ö | ÷ | ø | ù | ú | û | ü | ý | þ | ÿ |
2960   - ---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  2960 + ---------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2961 2961  
2962 2962  
2963 2963  
... ... @@ -3644,17 +3644,17 @@ public type SQLite3Datum:
3644 3644 representing an SQLite3 error code (see http://www.sqlite.org for informations).
3645 3645  
3646 3646 public type SQLite3HeadersOrRow:
3647   - headers,
3648   - next_row.
3649   -
  3647 + headers,
  3648 + next_row.
  3649 +
3650 3650 public type SQLite3Row:
3651 3651 error(SQLite3Error),
3652 3652 no_more_row,
3653 3653 row(Int32 -> SQLite3Datum).
3654 3654  
3655 3655 public type SQLite3Result:
3656   - result(Int32 returned_rows,
3657   - Int32 modified_rows,
  3656 + result(Int32 returned_rows,
  3657 + Int32 modified_rows,
3658 3658 SQLite3HeadersOrRow -> SQLite3Row cursor).
3659 3659  
3660 3660 public define Result(SQLite3Error, SQLite3HeadersOrRow -> SQLite3Row)
... ...
anubis_dev/library/system/lists.anubis
... ... @@ -7,24 +7,24 @@
7 7 */
8 8  
9 9 public define Bool
10   - contains
11   - (
12   - List($T) l,
13   - $T val
14   - ) =
15   - if l is
16   - {
17   - [] then false,
18   - [h . t] then
19   - if h = val then true
20   - else contains(t, val)
21   - }.
  10 + contains
  11 + (
  12 + List($T) l,
  13 + $T val
  14 + ) =
  15 + if l is
  16 + {
  17 + [] then false,
  18 + [h . t] then
  19 + if h = val then true
  20 + else contains(t, val)
  21 + }.
22 22  
23 23 public define List($T)
24   - append_once
25   - (
26   - List($T) l,
27   - $T val
28   - ) =
29   - if contains(l, val) then l
30   - else [val . l].
  24 + append_once
  25 + (
  26 + List($T) l,
  27 + $T val
  28 + ) =
  29 + if contains(l, val) then l
  30 + else [val . l].
... ...
anubis_dev/library/system/logger.anubis
... ... @@ -22,17 +22,17 @@ read system/string.anubis
22 22 read system/lists.anubis
23 23  
24 24 public type LogLevel:
25   - logNone,
26   - logCriticalError,
27   - logError,
28   - logWarning,
29   - logInfo,
30   - logDebug,
31   - logTrace.
  25 + logNone,
  26 + logCriticalError,
  27 + logError,
  28 + logWarning,
  29 + logInfo,
  30 + logDebug,
  31 + logTrace.
32 32  
33 33 public type LogMask:
34 34 logMask(String mask).
35   -
  35 +
36 36 public define Int32
37 37 get_log_level_value
38 38 (
... ... @@ -41,8 +41,8 @@ public define Int32
41 41 if level is
42 42 {
43 43 logNone then 0,
44   - logCriticalError then 1,
45   - logError then 2,
  44 + logCriticalError then 1,
  45 + logError then 2,
46 46 logWarning then 3,
47 47 logInfo then 4,
48 48 logDebug then 5,
... ... @@ -92,7 +92,7 @@ public type PrivateLogger:
92 92  
93 93 public type Logger:
94 94 logger(PrivateLogger pl).
95   -
  95 +
96 96 public define String
97 97 logGetName
98 98 (
... ... @@ -137,7 +137,7 @@ public define One
137 137 String mask
138 138 ) =
139 139 al.pl.traceMasks <- append_once(*al.pl.traceMasks, mask).
140   -
  140 +
141 141 public define One
142 142 logSetTraceMask
143 143 (
... ... @@ -145,21 +145,21 @@ public define One
145 145 List(String) masks
146 146 ) =
147 147 al.pl.traceMasks <- masks.
148   -
  148 +
149 149 public define List(String)
150 150 logGetTraceMask
151 151 (
152 152 Logger al
153 153 ) =
154 154 *al.pl.traceMasks.
155   -
  155 +
156 156 public define One
157 157 logClearTraceMask
158 158 (
159 159 Logger al
160 160 ) =
161 161 al.pl.traceMasks <- [].
162   -
  162 +
163 163 public define One
164 164 logSetColoring
165 165 (
... ... @@ -306,16 +306,16 @@ public define Maybe(Logger)
306 306 // ----------------- private implementation ----------------------
307 307  
308 308 define String get_color_tag(LogLevel level) =
309   - if level is
310   - {
311   - logNone then implode([27]) + "[0m",
312   - logCriticalError then implode([27]) + "[4;41;30m",
313   - logError then implode([27]) + "[1;31m",
314   - logWarning then implode([27]) + "[1;33m",
315   - logInfo then implode([27]) + "[1;37m",
316   - logDebug then implode([27]) + "[37m",
317   - logTrace then implode([27]) + "[1;30m",
318   - }.
  309 + if level is
  310 + {
  311 + logNone then implode([27]) + "[0m",
  312 + logCriticalError then implode([27]) + "[4;41;30m",
  313 + logError then implode([27]) + "[1;31m",
  314 + logWarning then implode([27]) + "[1;33m",
  315 + logInfo then implode([27]) + "[1;37m",
  316 + logDebug then implode([27]) + "[37m",
  317 + logTrace then implode([27]) + "[1;30m",
  318 + }.
319 319  
320 320 define One doLogFileError( Logger al, LogLevel level, String msg) =
321 321 if length (al.pl.fileName) > 0 then
... ... @@ -324,7 +324,7 @@ define One doLogFileError( Logger al, LogLevel level, String msg) =
324 324 failure then unique, //nothing to write
325 325 success(st) then
326 326 with currentTime = (UTime)now,
327   - lvlStr = get_log_level_char(level),
  327 + lvlStr = get_log_level_char(level),
328 328 if currentTime is utime(sec,micro) then
329 329 if convert_time(sec) is date_and_time(y, month, d, h, min, s, _, _, _) then
330 330 with finalStr = "[" +integer_to_string(y) +
... ... @@ -384,37 +384,37 @@ define One logConsoleError( Logger al, String logStr, LogLevel lvl)=
384 384 // --------------- UNIT TEST -----------------
385 385  
386 386 define One otherThreadFunction
387   - (
388   - Logger log
389   - )
390   - =
391   - logInfo(log, "Log successfully created.");
392   - logCriticalError(log, "This is a critical error.");
393   - logError(log, "This is a fake error.");
394   - logWarning(log, "The test will exit soon...");
395   - logInfo(log, "This is the end.");
396   - logDebug(log, "Simple debug infos.");
397   - logTrace(log, logMask("NotDisplayed"), "This trace shouldn't be displayed.");
398   - logTrace(log, logMask("Displayed"), "This trace should be displayed.").
399   -
400   -
  387 + (
  388 + Logger log
  389 + )
  390 + =
  391 + logInfo(log, "Log successfully created.");
  392 + logCriticalError(log, "This is a critical error.");
  393 + logError(log, "This is a fake error.");
  394 + logWarning(log, "The test will exit soon...");
  395 + logInfo(log, "This is the end.");
  396 + logDebug(log, "Simple debug infos.");
  397 + logTrace(log, logMask("NotDisplayed"), "This trace shouldn't be displayed.");
  398 + logTrace(log, logMask("Displayed"), "This trace should be displayed.").
  399 +
  400 +
401 401 global define One
402   - test_logger(List(String) args)
403   - =
404   - //print(implode([27]) + "[12C");
405   - //print(implode([27]) + "[12C");
406   - //print(implode([27]) + "[12C");
407   - with log = createLogger("MyLog", "./logger_test_file.log"),
408   - logAddTraceMask(log, "Displayed");
409   - delegate otherThreadFunction(log), unique;
410   - logSetConsoleLevel(log, logTrace);
411   - logInfo(log, "Log successfully created.");
412   - logCriticalError(log, "This is a critical error.");
413   - logError(log, "This is a fake error.");
414   - logWarning(log, "The test will exit soon...");
415   - logInfo(log, "This is the end.");
416   - logDebug(log, "Simple debug infos.");
417   - logTrace(log, logMask("NotDisplayed"), "This trace shouldn't be displayed.");
418   - logTrace(log, logMask("Displayed"), "This trace should be displayed.");
419   - println("Normal text. Test end.").
420   -
  402 + test_logger(List(String) args)
  403 + =
  404 + //print(implode([27]) + "[12C");
  405 + //print(implode([27]) + "[12C");
  406 + //print(implode([27]) + "[12C");
  407 + with log = createLogger("MyLog", "./logger_test_file.log"),
  408 + logAddTraceMask(log, "Displayed");
  409 + delegate otherThreadFunction(log), unique;
  410 + logSetConsoleLevel(log, logTrace);
  411 + logInfo(log, "Log successfully created.");
  412 + logCriticalError(log, "This is a critical error.");
  413 + logError(log, "This is a fake error.");
  414 + logWarning(log, "The test will exit soon...");
  415 + logInfo(log, "This is the end.");
  416 + logDebug(log, "Simple debug infos.");
  417 + logTrace(log, logMask("NotDisplayed"), "This trace shouldn't be displayed.");
  418 + logTrace(log, logMask("Displayed"), "This trace should be displayed.");
  419 + println("Normal text. Test end.").
  420 +
... ...
anubis_dev/library/system/muscle.anubis
... ... @@ -1554,46 +1554,46 @@ public define Message_Send_Result
1554 1554 Int32 ip_address, // where you want to send the data
1555 1555 Int32 ip_port,
1556 1556 )=
1557   - if flatten_message(msg) is
1558   - {
1559   - failure then print("Error flattening identity Message"); flatten_error,
1560   - success(buffer) then
1561   - if create_udp_socket(ip_address) is
1562   - {
1563   - cannot_create_the_socket then network_error,
1564   - ok(socket) then
1565   - //the necessary UDP socket was created, hence we send the Message packet
1566   - with header = host_to_lendian_Int32_ByteArray(length(buffer)) +
1567   - host_to_lendian_Int32_ByteArray(_MUSCLE_MESSAGE_ENCODING_DEFAULT) +
1568   - buffer,
1569   - //send the header + buffer. that header is construct as follow (size of the following message + header mark)
1570   - if udp_send(socket, ip_address, ip_port, header) is
1571   - {
1572   - network_unreachable then network_error,
1573   - packet_sent then ok
1574   - }
1575   - }
1576   - }.
  1557 + if flatten_message(msg) is
  1558 + {
  1559 + failure then print("Error flattening identity Message"); flatten_error,
  1560 + success(buffer) then
  1561 + if create_udp_socket(ip_address) is
  1562 + {
  1563 + cannot_create_the_socket then network_error,
  1564 + ok(socket) then
  1565 + //the necessary UDP socket was created, hence we send the Message packet
  1566 + with header = host_to_lendian_Int32_ByteArray(length(buffer)) +
  1567 + host_to_lendian_Int32_ByteArray(_MUSCLE_MESSAGE_ENCODING_DEFAULT) +
  1568 + buffer,
  1569 + //send the header + buffer. that header is construct as follow (size of the following message + header mark)
  1570 + if udp_send(socket, ip_address, ip_port, header) is
  1571 + {
  1572 + network_unreachable then network_error,
  1573 + packet_sent then ok
  1574 + }
  1575 + }
  1576 + }.
1577 1577  
1578 1578 public define Maybe(Message)
1579   - receive_message_from_io
1580   - (
  1579 + receive_message_from_io
  1580 + (
1581 1581 Data_IO io
1582   - ) =
1583   - if read_Int32(io) is
1584   - {
1585   - failure then print("Can't read data \n"); failure,
1586   - success(data_len) then
1587   - if read_Int32(io) is
1588   - {
1589   - failure then print("Can't read data \n"); failure,
1590   - success(encoding) then
1591   - if encoding = _MUSCLE_MESSAGE_ENCODING_DEFAULT then
1592   - unflatten_message(io)
1593   - else print("Bad header or unknown encoding:" + encoding); failure
1594   - }
1595   - }.
1596   -
  1582 + ) =
  1583 + if read_Int32(io) is
  1584 + {
  1585 + failure then print("Can't read data \n"); failure,
  1586 + success(data_len) then
  1587 + if read_Int32(io) is
  1588 + {
  1589 + failure then print("Can't read data \n"); failure,
  1590 + success(encoding) then
  1591 + if encoding = _MUSCLE_MESSAGE_ENCODING_DEFAULT then
  1592 + unflatten_message(io)
  1593 + else print("Bad header or unknown encoding:" + encoding); failure
  1594 + }
  1595 + }.
  1596 +
1597 1597  
1598 1598 public define Maybe(Int32)
1599 1599 send_buffer
... ... @@ -1623,22 +1623,22 @@ public define Message_Send_Result
1623 1623 RWStream conn,
1624 1624 Message msg
1625 1625 )=
1626   - if flatten_message(msg) is
1627   - {
1628   - failure then println("Error flattening identity Message"); flatten_error,
  1626 + if flatten_message(msg) is
  1627 + {
  1628 + failure then println("Error flattening identity Message"); flatten_error,
1629 1629 success(buffer) then
1630 1630 with header = host_to_lendian_Int32_ByteArray(length(buffer)) +
1631   - host_to_lendian_Int32_ByteArray(_MUSCLE_MESSAGE_ENCODING_DEFAULT),
  1631 + host_to_lendian_Int32_ByteArray(_MUSCLE_MESSAGE_ENCODING_DEFAULT),
1632 1632 //send the header. that header is construct as follow (size of the following message + header mark)
1633 1633 if send_buffer(conn,header, length(header), 0) is
1634 1634 {
1635 1635 failure then network_error,
1636   - success(_) then
1637   - //now we send the real message
  1636 + success(_) then
  1637 + //now we send the real message
1638 1638 if send_buffer(conn, buffer, length(buffer), 0) is
1639 1639 {
1640   - failure then network_error,
1641   - success(len)then ok
  1640 + failure then network_error,
  1641 + success(len)then ok
1642 1642 }
1643 1643 }
1644 1644 }.
... ...
anubis_dev/library/system/parameter/inifile.anubis
... ... @@ -7,7 +7,7 @@
7 7 *Created: 2006 02 22
8 8 *Author* David René
9 9 *Status* Released
10   -
  10 +
11 11 *Overview*
12 12 This file contain some helper functions for the management of well know Windows(tm)
13 13 INI files.
... ...
anubis_dev/library/system/string.anubis
... ... @@ -145,12 +145,12 @@ public define String
145 145 src_str + to_string(constant_byte_array(size - str_size, ch)).
146 146  
147 147 public define Bool
148   - is_white_char
149   - (
150   - Word8 ch
151   - ) =
152   - ch = 32 | ch = 9.
153   -
  148 + is_white_char
  149 + (
  150 + Word8 ch
  151 + ) =
  152 + ch = 32 | ch = 9.
  153 +
154 154 define (List(Word8), List(Word8))
155 155 in_word
156 156 (
... ... @@ -426,9 +426,9 @@ define (Int32, Int32)
426 426 define (Int32, Int32)
427 427 trim
428 428 (
429   - List(Word8) string,
  429 + List(Word8) string,
430 430 Word8 -> Bool is_token,
431   - Int32 current
  431 + Int32 current
432 432 )=
433 433 if string is
434 434 {
... ... @@ -489,18 +489,17 @@ public define String
489 489 }.
490 490  
491 491 public define String
492   - join
493   - (
494   - String sep,
495   - List(String) l
496   - ) =
  492 + join
  493 + (
  494 + String sep,
  495 + List(String) l
  496 + ) =
497 497 if l is
498 498 {
499 499 [ ] then "",
500 500 [h . t] then h + sep + join(sep, t)
501 501 }.
502   -
503   -
  502 +
504 503 // *** COMPARISON
505 504  
506 505 define Bool
... ... @@ -531,51 +530,50 @@ public define Bool
531 530 .
532 531  
533 532 define List(Word8)
534   - _find_and_replace
535   - (
536   - List(Word8) original,
537   - List(Word8) new_string,
538   - List(Word8) looking_for,
539   - List(Word8) replace_with,
540   - Int32 pos,
541   - List(Word8) temp_str,
542   - ) =
543   - if original is
544   - {
545   - [] then new_string,
546   - [h . t] then
547   - if nth(pos, looking_for) is
548   - {
549   - failure then _find_and_replace(t, [h . (temp_str + new_string)], looking_for, replace_with, 0, []),
550   - success(c) then
551   - if h = c then
552   - with temp_str2 = (List(Word8))[h . temp_str],
553   - if length(looking_for) = length(temp_str2) then
554   - _find_and_replace(t, replace_with + new_string, looking_for, replace_with, 0, [])
555   - else
556   - _find_and_replace(t, new_string, looking_for, replace_with, pos + 1, [h . temp_str])
557   - else
558   - if implode(looking_for) = implode(reverse(temp_str)) then
559   - _find_and_replace(t, [h . (replace_with + new_string)], looking_for, replace_with, 0, [])
560   - else
561   - _find_and_replace(t, [h . (temp_str + new_string)], looking_for, replace_with, 0, [])
562   - }
563   - }.
564   -
  533 + _find_and_replace
  534 + (
  535 + List(Word8) original,
  536 + List(Word8) new_string,
  537 + List(Word8) looking_for,
  538 + List(Word8) replace_with,
  539 + Int32 pos,
  540 + List(Word8) temp_str,
  541 + ) =
  542 + if original is
  543 + {
  544 + [] then new_string,
  545 + [h . t] then
  546 + if nth(pos, looking_for) is
  547 + {
  548 + failure then _find_and_replace(t, [h . (temp_str + new_string)], looking_for, replace_with, 0, []),
  549 + success(c) then
  550 + if h = c then
  551 + with temp_str2 = (List(Word8))[h . temp_str],
  552 + if length(looking_for) = length(temp_str2) then
  553 + _find_and_replace(t, replace_with + new_string, looking_for, replace_with, 0, [])
  554 + else
  555 + _find_and_replace(t, new_string, looking_for, replace_with, pos + 1, [h . temp_str])
  556 + else
  557 + if implode(looking_for) = implode(reverse(temp_str)) then
  558 + _find_and_replace(t, [h . (replace_with + new_string)], looking_for, replace_with, 0, [])
  559 + else
  560 + _find_and_replace(t, [h . (temp_str + new_string)], looking_for, replace_with, 0, [])
  561 + }
  562 + }.
565 563  
566 564 public define String
567   - find_and_replace
568   - (
569   - String original,
570   - String looking_for,
571   - String replace_with
572   - ) =
573   - implode(reverse(_find_and_replace(explode(original), [], explode(looking_for), reverse(explode(replace_with)), 0, []))).
  565 + find_and_replace
  566 + (
  567 + String original,
  568 + String looking_for,
  569 + String replace_with
  570 + ) =
  571 + implode(reverse(_find_and_replace(explode(original), [], explode(looking_for), reverse(explode(replace_with)), 0, []))).
574 572  
575 573 global define One
576   - test_find_and_replace
577   - (
578   - List(String) argv
579   - ) =
580   - print(find_and_replace(force_nth(0, argv), force_nth(1, argv), force_nth(2, argv)));
581   - unique.
  574 + test_find_and_replace
  575 + (
  576 + List(String) argv
  577 + ) =
  578 + print(find_and_replace(force_nth(0, argv), force_nth(1, argv), force_nth(2, argv)));
  579 + unique.
... ...
anubis_dev/library/web/mime.anubis
... ... @@ -6,11 +6,13 @@
6 6 *Copyright* Copyright (c) Alain Prouté 2005.
7 7  
8 8  
9   - *Author* Alain Prouté
  9 + *Authors* Alain Prouté
  10 + David René
10 11  
11 12  
12 13 read tools/base64.anubis
13 14 read tools/basis.anubis
  15 +read system/string.anubis
14 16  
15 17 public type MIME:
16 18 mime(String name,
... ...
anubis_dev/vm/src/win32/vm.rc
... ... @@ -28,8 +28,8 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
28 28 //
29 29  
30 30 VS_VERSION_INFO VERSIONINFO
31   - FILEVERSION 1,8,3,2
32   - PRODUCTVERSION 1,8,3,2
  31 + FILEVERSION 1,8,3,10
  32 + PRODUCTVERSION 1,8,3,10
33 33 FILEFLAGSMASK 0x3fL
34 34 #ifdef _DEBUG
35 35 FILEFLAGS 0x1L
... ... @@ -47,14 +47,14 @@ BEGIN
47 47 VALUE "Comments", "Anubis Run Time\0"
48 48 VALUE "CompanyName", "Alain Prouté & David René\0"
49 49 VALUE "FileDescription", "anbexec\0"
50   - VALUE "FileVersion", "1, 8, 3, 2\0""
  50 + VALUE "FileVersion", "1, 8, 3, 10\0""
51 51 VALUE "InternalName", "anbexec\0"
52   - VALUE "LegalCopyright", "Copyright © 2000-2007 Alain Prouté, David René\0""
  52 + VALUE "LegalCopyright", "Copyright © 2000-2007 Alain Prouté, David René, Cédric Ricard\0""
53 53 VALUE "LegalTrademarks", "\0"
54 54 VALUE "OriginalFilename", "anbexec.exe\0"
55 55 VALUE "PrivateBuild", "\0"
56 56 VALUE "ProductName", "anbexec\0"
57   - VALUE "ProductVersion", "1, 8, 3, 2\0""
  57 + VALUE "ProductVersion", "1, 8, 3, 10\0""
58 58 VALUE "SpecialBuild", "\0"
59 59 END
60 60 END
... ...