104
73
populate_currencies (void)
106
gpe_currency_table = g_hash_table_new(g_direct_hash, g_direct_equal);
75
qof_currency_table = g_hash_table_new(g_direct_hash, g_direct_equal);
107
76
{ /* Australia 0 100 AU$ AUD */
108
GpeCurrency *c = g_new0(GpeCurrency, 1);
77
QofCurrency *c = g_new0(QofCurrency, 1);
110
79
c->fraction = 100;
111
80
c->symbol = "AU$";
112
81
c->mnemonic = "AUD";
113
82
c->non_utf8 = FALSE;
114
g_hash_table_insert(gpe_currency_table,
83
g_hash_table_insert(qof_currency_table,
115
84
GINT_TO_POINTER(c->pq_code), (gpointer)c);
117
86
{ /* Austria 1 100 € ATS */
118
GpeCurrency *c = g_new0(GpeCurrency, 1);
87
QofCurrency *c = g_new0(QofCurrency, 1);
120
89
c->fraction = 100;
122
91
c->mnemonic = "ATS";
123
92
c->non_utf8 = TRUE;
124
g_hash_table_insert(gpe_currency_table,
93
g_hash_table_insert(qof_currency_table,
125
94
GINT_TO_POINTER(c->pq_code), (gpointer)c);
127
96
{ /* Belgium 2 100 € BEF */
128
GpeCurrency *c = g_new0(GpeCurrency, 1);
97
QofCurrency *c = g_new0(QofCurrency, 1);
130
99
c->fraction = 100;
132
101
c->mnemonic = "BEF";
133
102
c->non_utf8 = TRUE;
134
g_hash_table_insert(gpe_currency_table,
103
g_hash_table_insert(qof_currency_table,
135
104
GINT_TO_POINTER(c->pq_code), (gpointer)c);
137
106
{ /* Brazil 3 100 R$ BRL */
138
GpeCurrency *c = g_new0(GpeCurrency, 1);
107
QofCurrency *c = g_new0(QofCurrency, 1);
140
109
c->fraction = 100;
141
110
c->symbol = "R$";
142
111
c->mnemonic = "BRL";
143
112
c->non_utf8 = FALSE;
144
g_hash_table_insert(gpe_currency_table,
113
g_hash_table_insert(qof_currency_table,
145
114
GINT_TO_POINTER(c->pq_code), (gpointer)c);
147
116
{ /* Canada 4 100 $CN CAD */
148
GpeCurrency *c = g_new0(GpeCurrency, 1);
117
QofCurrency *c = g_new0(QofCurrency, 1);
150
119
c->fraction = 100;
151
120
c->symbol = "$CN";
152
121
c->mnemonic = "CAD";
153
122
c->non_utf8 = FALSE;
154
g_hash_table_insert(gpe_currency_table,
123
g_hash_table_insert(qof_currency_table,
155
124
GINT_TO_POINTER(c->pq_code), (gpointer)c);
157
126
{ /* Denmark 5 100 DKK DKK */
158
GpeCurrency *c = g_new0(GpeCurrency, 1);
127
QofCurrency *c = g_new0(QofCurrency, 1);
160
129
c->fraction = 100;
161
130
c->symbol = "DKK";
162
131
c->mnemonic = "DKK";
163
132
c->non_utf8 = FALSE;
164
g_hash_table_insert(gpe_currency_table,
133
g_hash_table_insert(qof_currency_table,
165
134
GINT_TO_POINTER(c->pq_code), (gpointer)c);
167
136
{ /* Finland 6 100 € FIM */
168
GpeCurrency *c = g_new0(GpeCurrency, 1);
137
QofCurrency *c = g_new0(QofCurrency, 1);
170
139
c->fraction = 100;
172
141
c->mnemonic = "FIM";
173
142
c->non_utf8 = TRUE;
174
g_hash_table_insert(gpe_currency_table,
143
g_hash_table_insert(qof_currency_table,
175
144
GINT_TO_POINTER(c->pq_code), (gpointer)c);
177
146
{ /* France 7 100 € FRF */
178
GpeCurrency *c = g_new0(GpeCurrency, 1);
147
QofCurrency *c = g_new0(QofCurrency, 1);
180
149
c->fraction = 100;
182
151
c->mnemonic = "FRF";
183
152
c->non_utf8 = TRUE;
184
g_hash_table_insert(gpe_currency_table,
153
g_hash_table_insert(qof_currency_table,
185
154
GINT_TO_POINTER(c->pq_code), (gpointer)c);
187
156
{ /* Germany 8 100 € DEM */
188
GpeCurrency *c = g_new0(GpeCurrency, 1);
157
QofCurrency *c = g_new0(QofCurrency, 1);
190
159
c->fraction = 100;
192
161
c->mnemonic = "DEM";
193
162
c->non_utf8 = TRUE;
194
g_hash_table_insert(gpe_currency_table,
163
g_hash_table_insert(qof_currency_table,
195
164
GINT_TO_POINTER(c->pq_code), (gpointer)c);
197
166
{ /* Hong Kong 9 100 HK$ HKD */
198
GpeCurrency *c = g_new0(GpeCurrency, 1);
167
QofCurrency *c = g_new0(QofCurrency, 1);
200
169
c->fraction = 100;
201
170
c->symbol = "HK$";
202
171
c->mnemonic = "HKD";
203
172
c->non_utf8 = FALSE;
204
g_hash_table_insert(gpe_currency_table,
173
g_hash_table_insert(qof_currency_table,
205
174
GINT_TO_POINTER(c->pq_code), (gpointer)c);
207
176
{ /* Iceland 10 100 ISK ISK */
208
GpeCurrency *c = g_new0(GpeCurrency, 1);
177
QofCurrency *c = g_new0(QofCurrency, 1);
210
179
c->fraction = 100;
211
180
c->symbol = "ISK";
212
181
c->mnemonic = "ISK";
213
182
c->non_utf8 = FALSE;
214
g_hash_table_insert(gpe_currency_table,
183
g_hash_table_insert(qof_currency_table,
215
184
GINT_TO_POINTER(c->pq_code), (gpointer)c);
217
186
{ /* Ireland 11 100 € IEP */
218
GpeCurrency *c = g_new0(GpeCurrency, 1);
187
QofCurrency *c = g_new0(QofCurrency, 1);
220
189
c->fraction = 100;
222
191
c->mnemonic = "IEP";
223
192
c->non_utf8 = TRUE;
224
g_hash_table_insert(gpe_currency_table,
193
g_hash_table_insert(qof_currency_table,
225
194
GINT_TO_POINTER(c->pq_code), (gpointer)c);
227
196
{ /* Italy 12 1 EUR ITL */
228
197
/* The Italian Lira had a fraction == 1*/
229
GpeCurrency *c = g_new0(GpeCurrency, 1);
198
QofCurrency *c = g_new0(QofCurrency, 1);
231
200
c->fraction = 100;
232
201
c->symbol = "EUR";
233
202
c->mnemonic = "ITL";
234
203
c->non_utf8 = FALSE;
235
g_hash_table_insert(gpe_currency_table,
204
g_hash_table_insert(qof_currency_table,
236
205
GINT_TO_POINTER(c->pq_code), (gpointer)c);
238
207
{ /* Japan 13 1 ¥ ¥ JPY */
239
GpeCurrency *c = g_new0(GpeCurrency, 1);
208
QofCurrency *c = g_new0(QofCurrency, 1);
243
212
c->mnemonic = "JPY";
244
213
c->non_utf8 = TRUE;
245
g_hash_table_insert(gpe_currency_table,
214
g_hash_table_insert(qof_currency_table,
246
215
GINT_TO_POINTER(c->pq_code), (gpointer)c);
248
217
{ /* Luxembourg 14 100 ˆ € LUF */
249
GpeCurrency *c = g_new0(GpeCurrency, 1);
218
QofCurrency *c = g_new0(QofCurrency, 1);
251
220
c->fraction = 100;
253
222
c->mnemonic = "LUF";
254
223
c->non_utf8 = TRUE;
255
g_hash_table_insert(gpe_currency_table,
224
g_hash_table_insert(qof_currency_table,
256
225
GINT_TO_POINTER(c->pq_code), (gpointer)c);
258
227
{ /* Mexico 15 100 MXP MXP */
259
GpeCurrency *c = g_new0(GpeCurrency, 1);
228
QofCurrency *c = g_new0(QofCurrency, 1);
261
230
c->fraction = 100;
262
231
c->symbol = "MXP";
263
232
c->mnemonic = "MXP";
264
233
c->non_utf8 = FALSE;
265
g_hash_table_insert(gpe_currency_table,
234
g_hash_table_insert(qof_currency_table,
266
235
GINT_TO_POINTER(c->pq_code), (gpointer)c);
268
237
{ /* Netherlands 16 100 € ANG */
269
GpeCurrency *c = g_new0(GpeCurrency, 1);
238
QofCurrency *c = g_new0(QofCurrency, 1);
271
240
c->fraction = 100;
273
242
c->mnemonic = "ANG";
274
243
c->non_utf8 = TRUE;
275
g_hash_table_insert(gpe_currency_table,
244
g_hash_table_insert(qof_currency_table,
276
245
GINT_TO_POINTER(c->pq_code), (gpointer)c);
278
247
{ /* New Zealand 17 100 $NZ NZD */
279
GpeCurrency *c = g_new0(GpeCurrency, 1);
248
QofCurrency *c = g_new0(QofCurrency, 1);
281
250
c->fraction = 100;
282
251
c->symbol = "$NZ";
283
252
c->mnemonic = "NZD";
284
253
c->non_utf8 = FALSE;
285
g_hash_table_insert(gpe_currency_table,
254
g_hash_table_insert(qof_currency_table,
286
255
GINT_TO_POINTER(c->pq_code), (gpointer)c);
288
257
{ /* Norway 18 100 NOK NOK */
289
GpeCurrency *c = g_new0(GpeCurrency, 1);
258
QofCurrency *c = g_new0(QofCurrency, 1);
291
260
c->fraction = 100;
292
261
c->symbol = "NOK";
293
262
c->mnemonic = "NOK";
294
263
c->non_utf8 = FALSE;
295
g_hash_table_insert(gpe_currency_table,
264
g_hash_table_insert(qof_currency_table,
296
265
GINT_TO_POINTER(c->pq_code), (gpointer)c);
298
267
{ /* Spain 19 100 € ESP */
299
GpeCurrency *c = g_new0(GpeCurrency, 1);
268
QofCurrency *c = g_new0(QofCurrency, 1);
301
270
c->fraction = 100;
303
272
c->mnemonic = "ESP";
304
273
c->non_utf8 = TRUE;
305
g_hash_table_insert(gpe_currency_table,
274
g_hash_table_insert(qof_currency_table,
306
275
GINT_TO_POINTER(c->pq_code), (gpointer)c);
308
277
{ /* Sweden 20 100 SEK SEK */
309
GpeCurrency *c = g_new0(GpeCurrency, 1);
278
QofCurrency *c = g_new0(QofCurrency, 1);
311
280
c->fraction = 100;
312
281
c->symbol = "SEK";
313
282
c->mnemonic = "SEK";
314
283
c->non_utf8 = FALSE;
315
g_hash_table_insert(gpe_currency_table,
284
g_hash_table_insert(qof_currency_table,
316
285
GINT_TO_POINTER(c->pq_code), (gpointer)c);
318
287
{ /* Switzerland 21 100 CHF CHF */
319
GpeCurrency *c = g_new0(GpeCurrency, 1);
288
QofCurrency *c = g_new0(QofCurrency, 1);
321
290
c->fraction = 100;
322
291
c->symbol = "CHF";
323
292
c->mnemonic = "CHF";
324
293
c->non_utf8 = FALSE;
325
g_hash_table_insert(gpe_currency_table,
294
g_hash_table_insert(qof_currency_table,
326
295
GINT_TO_POINTER(c->pq_code), (gpointer)c);
328
297
{ /* United Kingdom 22 100 £ GBP */
329
GpeCurrency *c = g_new0(GpeCurrency, 1);
298
QofCurrency *c = g_new0(QofCurrency, 1);
331
300
c->fraction = 100;
333
302
c->mnemonic = "GBP";
334
303
c->non_utf8 = TRUE;
335
g_hash_table_insert(gpe_currency_table,
304
g_hash_table_insert(qof_currency_table,
336
305
GINT_TO_POINTER(c->pq_code), (gpointer)c);
338
307
{ /* United States 23 100 $US USD */
339
GpeCurrency *c = g_new0(GpeCurrency, 1);
308
QofCurrency *c = g_new0(QofCurrency, 1);
341
310
c->fraction = 100;
342
311
c->symbol = "$US";
343
312
c->mnemonic = "USD";
344
313
c->non_utf8 = FALSE;
345
g_hash_table_insert(gpe_currency_table,
314
g_hash_table_insert(qof_currency_table,
346
315
GINT_TO_POINTER(c->pq_code), (gpointer)c);
348
317
{ /* India 24 100 Rs INR */
349
GpeCurrency *c = g_new0(GpeCurrency, 1);
318
QofCurrency *c = g_new0(QofCurrency, 1);
351
320
c->fraction = 100;
352
321
c->symbol = "Rs";
353
322
c->mnemonic = "INR";
354
323
c->non_utf8 = FALSE;
355
g_hash_table_insert(gpe_currency_table,
324
g_hash_table_insert(qof_currency_table,
356
325
GINT_TO_POINTER(c->pq_code), (gpointer)c);
358
327
{ /* Indonesia 25 1 Rp IDR */
359
GpeCurrency *c = g_new0(GpeCurrency, 1);
328
QofCurrency *c = g_new0(QofCurrency, 1);
362
331
c->symbol = "Rp";
363
332
c->mnemonic = "IDR";
364
333
c->non_utf8 = FALSE;
365
g_hash_table_insert(gpe_currency_table,
334
g_hash_table_insert(qof_currency_table,
366
335
GINT_TO_POINTER(c->pq_code), (gpointer)c);
368
337
{ /* Korea 26 100 KRW KRW (South) */
369
GpeCurrency *c = g_new0(GpeCurrency, 1);
338
QofCurrency *c = g_new0(QofCurrency, 1);
371
340
c->fraction = 100;
372
341
c->symbol = "KRW";
373
342
c->mnemonic = "KRW";
374
343
c->non_utf8 = FALSE;
375
g_hash_table_insert(gpe_currency_table,
344
g_hash_table_insert(qof_currency_table,
376
345
GINT_TO_POINTER(c->pq_code), (gpointer)c);
378
347
{ /* Malaysia 27 100 RM MYR */
379
GpeCurrency *c = g_new0(GpeCurrency, 1);
348
QofCurrency *c = g_new0(QofCurrency, 1);
381
350
c->fraction = 100;
382
351
c->symbol = "RM";
383
352
c->mnemonic = "MYR";
384
353
c->non_utf8 = FALSE;
385
g_hash_table_insert(gpe_currency_table,
354
g_hash_table_insert(qof_currency_table,
386
355
GINT_TO_POINTER(c->pq_code), (gpointer)c);
388
357
{ /* P.R.C. // People's Rep. China 28 100 RMB CNY */
389
GpeCurrency *c = g_new0(GpeCurrency, 1);
358
QofCurrency *c = g_new0(QofCurrency, 1);
391
360
c->fraction = 100;
392
361
c->symbol = "RMB";
393
362
c->mnemonic = "CNY";
394
363
c->non_utf8 = FALSE;
395
g_hash_table_insert(gpe_currency_table,
364
g_hash_table_insert(qof_currency_table,
396
365
GINT_TO_POINTER(c->pq_code), (gpointer)c);
398
367
{ /* Phillipines 29 100 P PHP */
399
GpeCurrency *c = g_new0(GpeCurrency, 1);
368
QofCurrency *c = g_new0(QofCurrency, 1);
401
370
c->fraction = 100;
403
372
c->mnemonic = "PHP";
404
373
c->non_utf8 = FALSE;
405
g_hash_table_insert(gpe_currency_table,
374
g_hash_table_insert(qof_currency_table,
406
375
GINT_TO_POINTER(c->pq_code), (gpointer)c);
408
377
{ /* Singapore 30 100 $ SGD */
409
GpeCurrency *c = g_new0(GpeCurrency, 1);
378
QofCurrency *c = g_new0(QofCurrency, 1);
411
380
c->fraction = 100;
413
382
c->mnemonic = "SGD";
414
383
c->non_utf8 = FALSE;
415
g_hash_table_insert(gpe_currency_table,
384
g_hash_table_insert(qof_currency_table,
416
385
GINT_TO_POINTER(c->pq_code), (gpointer)c);
418
387
{ /* Thailand 31 100 BHT THB */
419
GpeCurrency *c = g_new0(GpeCurrency, 1);
388
QofCurrency *c = g_new0(QofCurrency, 1);
421
390
c->fraction = 100;
422
391
c->symbol = "BHT";
423
392
c->mnemonic = "THB";
424
393
c->non_utf8 = FALSE;
425
g_hash_table_insert(gpe_currency_table,
394
g_hash_table_insert(qof_currency_table,
426
395
GINT_TO_POINTER(c->pq_code), (gpointer)c);
428
397
{ /* Taiwan 32 100 NT$ TWD */
429
GpeCurrency *c = g_new0(GpeCurrency, 1);
398
QofCurrency *c = g_new0(QofCurrency, 1);
431
400
c->fraction = 100;
432
401
c->symbol = "NT$";
433
402
c->mnemonic = "TWD";
434
403
c->non_utf8 = FALSE;
435
g_hash_table_insert(gpe_currency_table,
404
g_hash_table_insert(qof_currency_table,
436
405
GINT_TO_POINTER(c->pq_code), (gpointer)c);
438
407
{ /* EU (Euro) 133 100 € EUR */
439
GpeCurrency *c = g_new0(GpeCurrency, 1);
408
QofCurrency *c = g_new0(QofCurrency, 1);
440
409
c->pq_code = 133;
441
410
c->fraction = 100;
443
412
c->mnemonic = "EUR";
444
413
c->non_utf8 = TRUE;
445
g_hash_table_insert(gpe_currency_table,
414
g_hash_table_insert(qof_currency_table,
446
415
GINT_TO_POINTER(c->pq_code), (gpointer)c);